Jump to content

cbox


Recommended Posts

Posted (edited)

Here is a tutorial to help you guy to learn VB2008 before moving on to C# And C++!

 

Well First I will explain all of the code listed!

 

If - If a command happens.

 

If Textbox1.Text = "Hello" Then

 

Then - If that happpens then do this command! Heres an Example!

 

If Textbox1.Text = "Hello" Then
MsgBox("What do you want to be in your messagebox?")

 

That is an Example of - Then

 

Now after you put Then.

And your code. When your finished the If Command put End If so it knows when the If Command should stop!

 

So in the end it should look like

 

If Textbox1.Text = "Hello"

 

MsgBox("What do you want to be in your messagebox?")

 

End If

 

And you would put that code in your button or something that you click!...

 

If you just want a Message Box to show you would just go...

 

MsgBox("What do you want in your Messagebox? Enter that here!")

 

If you wanted a more advanced Messagebox you would go! (I Would reccomend learning a bit on the Easy Message box before trying this one!)

 

MessageBox.Show("What Text do you want to appear in the messagebox? Enter that here!","What Text do you want to appear in your Title Bar? Enter That Here!")

 

Lets say if I wanted to make a button so when clicked the form would Close\Exit there are a few ways of doing this!

 

You Could Go:

Me.Close() 
Or
Close()

 

There are a few other but im not goin to list them...

 

What does this mean?:

 

Me - The current application opened!

 

If - If a command happens.

 

Then - If something happens then do this command.

 

End If - To end your If.

 

How about another example:

 

Lets say I wanted to make a Button so when clicked the Text in my Textbox1 That I have placed down will change to what I want!

 

First you would want to type in Textbox1.Text so It know that we are talking aboot the text in my Textbox.

 

So we would go like

 

Textbox1.Text

 

Then we would want to put a = Sign so it knows that we want the text to = Whatever we put in so we would go like

 

Textbox1.Text =

 

Then we would add "" So that is saying that is the text I want to appear in my Textbox1

 

So It would look like:

 

Textbox1.Text = "Whatever Text You Want To Appear in your Textbox1!"

 

Thats All for that!

Edited by Halo117
Posted

it's kind of all over the place.

 

you should make it more visual basic like.. like put the code in vb, take a picture, and crop the code, and post the picture.. you have it all over the place.

 

Thought - 10/10

Appearance - 3/10

Creativity - 7/10

Idea/Conception - 8/10

 

Overall nice idea, more effort into appearance could help.

  • 2 weeks later...
  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...