Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I get a nice tutor?
#7
(12-27-2011, 10:03 AM)Mercury Wrote: Visual Basic isn't hard to learn. Here, let's create a simple Hello world. Create a new project (windows form), and put a button.
The code for button1 :
Code:
Msgbox("Hello world!")


(12-27-2011, 08:37 PM)BreShiE Wrote: Try experimenting what this does:

For your Form1 put in a Textbox and a Button, then double click on the button to open the code. Now put this in between the "Button1_Click" and "End Sub":

Code:
If Textbox1.Text = ("Text Here") Then
MsgBox ("Hello World!")
Else
MsgBox Textbox1.Text
End If

Once you've done that, press F5 and find out what happens when you enter text into the Textbox and click the Button. Big Grin

VB.NET is actually quite easy, but I prefer VB6 so I'm not sure if that code will work or not, I've only used .NET a few times but that does work on VB6.

King Wrote:For a .NET equivalent.

Code:
If TextBox1.Text = "Text Here" Then
     MsgBox("Hello World!")
Else
     MsgBox(Textbox1.Text)
End If

Virtually the same. I really just cleaned it up to how I like crap indented. Roflmao

He should be learning the MessageBox.Show() method to get into better habits though.
Reply


Messages In This Thread
Can I get a nice tutor? - by ๖ۣۜHacker™ - 12-14-2011, 08:57 PM
RE: Can I get a nice tutor? - by Mercury - 12-27-2011, 10:03 AM
RE: Can I get a nice tutor? - by King - 12-27-2011, 05:06 PM
RE: Can I get a nice tutor? - by BreShiE - 12-27-2011, 08:37 PM
RE: Can I get a nice tutor? - by King - 12-27-2011, 09:01 PM
RE: Can I get a nice tutor? - by Epeolatry - 12-27-2011, 09:05 PM
RE: Can I get a nice tutor? - by AceInfinity - 12-29-2011, 03:04 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)