Hack Forums
[.NET] Demon's VB.Net Beginner Tutorial 1 - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Demon's VB.Net Beginner Tutorial 1 (/showthread.php?tid=1720122)



Demon's VB.Net Beginner Tutorial 1 - ΔDemon - Sep 13, 2011

First up:

Quote:Enough of shit beginner tutorials, I was a beginner once too.

~ Demon


After we click new project on the main screen, we get:

Spoiler (Click to View)

1. Pick Windows Forms Application.
2. Name it whatever next to Name: where I put project name.
3. Press OK.

^.^ Now we're greeted by:

Spoiler (Click to View)

The Key:

Spoiler (Click to View)

Now let's start our first project. Take a "Button" from the toolbox and put it on the form. It'll look something like:

[img]http://img405.imageshack.us/img405/1473/cacb965306b245a9a53f187.png[/img]

Click it once, or keep it like that with the circles around it and go to the properties. In the properties, change the text to Hello World. So from:

http://img828.imageshack.us/img828/3859/5774e41f4d31488393ffb2f.png

To

[img]http://img809.imageshack.us/img809/4057/a2f30dee266946eea29d009.png[/img]

So the button looks like:

[img]http://img847.imageshack.us/img847/5599/0e9cd77df8cf4aa586e3475.png[/img]

Now we click the button again, look at the properties and click the lightning bolt instead of the page.

[img]http://img24.imageshack.us/img24/2840/26a0ea59d38244eb842466a.png[/img]

From the lightning bolt's properties we pick the Click event and double click the textbox next to click. Which will take us to a code window:

The Click to double click:

[img]http://img29.imageshack.us/img29/9799/12b8ca0e0e794c39be2393a.png[/img]

The code window:

[img]http://img844.imageshack.us/img844/4610/9bc01b5788cc426f90c853a.png[/img]

Where it says Button 1 click, that's the click event. That's where when the user clicks that code is raised. So let's make it show a message saying Hello World, as most coders do their first time.

So in the middle of the click event, where the code is to be executed, let's put:

Code
Msgbox("Hello World")

So it looks like:

[img]http://img717.imageshack.us/img717/954/28ee7f69662e4021994a9d6.png[/img]

Now let's test it:

Debug > Start Debugging

[img]http://img31.imageshack.us/img31/6941/97304f2ec8ff451686e8f87.png[/img]

Now click the button that opens, and it'll show a message saying: "Hello World."

[img]http://img825.imageshack.us/img825/4794/96cee42358e54490b8a062c.png[/img]

Hope you enjoyed your VB.Net Hello World.

Any Questions, please ask.



* - BreastMilk - Sep 13, 2011

Haha, Nice Tut You Have There! I Rather Like It :)


* - ΔDemon - Sep 13, 2011

I'm glad you like it. ^.^ I hope it helps people.


* - BreastMilk - Sep 13, 2011

Yea, I'm Sure It Will, It Actually Gave Me The Idea To Release A Tutorial On How To Code A Rather Easy Program That Everyone Loves. :)


* - ΔDemon - Sep 13, 2011

Awesome, possibly people will make new programs now instead of copy-pasting Email Bombers. Maybe we'll end VB.Net copy-paste on HF for a while for a few users. ^.^


* - Penthos - Sep 13, 2011

(Sep 13, 2011 02:04 AM)ΔDemon Wrote:  Awesome, possibly people will make new programs now instead of copy-pasting Email Bombers. Maybe we'll end VB.Net copy-paste on HF for a while for a few users. ^.^

lol, good basic tut!

I'm just following your Advanced Bot for a Hack Forums Personal (thing), haven't quite decided what yet.. Just want to learn about httpwebrequests!

Thanks Demon


* - ΔDemon - Sep 13, 2011

Thank you and no problem, not sure what tutorial I'll post next. =P