Horror.com Forums - Talk about horror.

Horror.com Forums - Talk about horror. (https://www.horror.com/forum/index.php)
-   Horror.com General Forum (https://www.horror.com/forum/forumdisplay.php?f=2)
-   -   Free programming lessons (https://www.horror.com/forum/showthread.php?t=26249)

Vodstok 11-20-2006 12:43 PM

Free programming lessons
 
Okay, i got a bug up my butt and decided to give a little bit of insight into my professional life. So, for anyone who is interested, i am going to show how to make some simple programs in C# (C-sharp), my language of choice.

for starters, you will need the .net framework. I prefer the 2.0 framework, as it is the latest and greatest, and is required to use Visual Studio express (more on that in a second)
http://www.microsoft.com/downloads/d...displaylang=en

this is the link to get Visual C# express:
http://go.microsoft.com/fwlink/?Link...11&clcid=0x409


you may need a .net passport. Sign up and get one if you dont already have one. Dont worry, Microsoft could care less about you, so its not like they are going to own your soul for signing up.

Install them both, the framework first. Once you have that, we will move on to our first lesson.

Vodstok 11-20-2006 12:56 PM

fire up visual studio (from here on to be called "VCS" for "Visual C# Studio"). complete any config wizards it has. Register it to avoid getting hounded every time you open it.

first off, we are going to start a project.

on the start page, click "Project..." after "Create"

By default, it should have "Windows Application" selected. in the "Name" line, type "Lesson1", then hit "OK". this will make a new programproject called "Lesson1". (crazy how that works....)

VCS will create some fun little files for you, and the main window will have an ugly little box that says "Form 1". you should have a menu that says "Toolbox". In Toolbox, there will be an area called "Common Controls". click on "Button". now click on the ugly little "Form 1". See? There's a button now!


Double-click the button. Dont be scared. this is where you program. you will see something that looks like this:
private void button1_Click(object sender, EventArgs e)
{

}

Make it look like this:

private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("YOU CLICKED A BUTTON!");
}

NOTE: C# is case sensitive, so ANYTHING not inside quotation marks (in this case, anyhing NOT "YOU CLICKED A BUTTON!") HAS to be typed as I have shown.

Did that? Good. now hit "Ctrl-f5" on your keyboard. This will compile and launch your program.

When the new ugly little window pops up, click the button. YAY! see? You just wrote a verrry simple program. Pat yourself on the back.

close your little program and go back to VCS. hit ctrl-shift-S. A save dialogue will come up. just hit "save". This way, your project will still be there if your computer suddenly reboots.

Vodstok 11-21-2006 04:36 AM

Any interest in this, or should i just let it die?

VampiricClown 11-21-2006 07:18 AM

I'm interested in it. I can't start on it today, but possibly tomorrow...

Vodstok 11-21-2006 07:26 AM

I will probably keep posting little lessons even if i get no feedback. I figure its a nice way to get some exposure for people who are curious but dont know where to look.

Phalanx 11-21-2006 08:53 AM

The chick might take you up on it, man...me, I get annoyed with spreadsheets.
Nice idea though.

stygianwitch 11-21-2006 09:42 AM

i'll be giving it a go too, but expect pm's when i don't understand wtf it all means... i'm one of these weird people who have to understand what the instuction will do not just see the end result, so keep ya inbox cleared ;)

Vodstok 11-21-2006 10:14 AM

Quote:

Originally Posted by stygianwitch (Post 512350)
i'll be giving it a go too, but expect pm's when i don't understand wtf it all means... i'm one of these weird people who have to understand what the instuction will do not just see the end result, so keep ya inbox cleared ;)

PM if oyu want, but asking questions publically would be a good idea so that everyone can benefit from the explanation :D

stubbornforgey 11-21-2006 10:16 AM

shit!!
FINALLY..a good thread..nice vodstock..
ppl may not be replying but they are taking notes.

stygianwitch 11-21-2006 10:17 AM

Quote:

Originally Posted by Vodstok (Post 512411)
PM if oyu want, but asking questions publically would be a good idea so that everyone can benefit from the explanation :D

you got a deal, but be warned i can be a real pain in the ass til i understand :o


All times are GMT -8. The time now is 11:12 AM.