PDA

View Full Version : Visual Basic.net help!?


RoMa5_
04-09-2007, 12:48 PM
how can i creat a messgebox wher the user can enter values... i wanna calculate the average grade of a class... a messgae box pop up the user enter the number of the grades the he enters a grade after the other! i just dont know how to create a message box that contains a text box and a ok buuton! 10x!

Arbizaa
04-09-2007, 02:48 PM
You just need to learn how to use property box for each of the controls that you have in the screen.. go ahead search for some tutorials on net..you can always visit my website for VB and Dot net tutorials and rapidshare links along with exaples.

http://arbizaa-softwareworld.blogspot.com/search/label/VB

http://arbizaa-softwareworld.blogspot.com/search/label/DOT%20NET

http://arbizaa-softwareworld.blo (http://arbizaa-softwareworld.blogspot.com/)

Can G
04-09-2007, 04:00 PM
Do you remember me? I answered your last question about linking forms in Visual Basic. I am the programmer that answered your last question. I have your answer. First add two textboxes to the form1. Insert a label that tells the user to enter the year we are in to the textbox1 and his/her birthday. and add a button to calculate the difference. Add a Label and make its name (lab) Subtract the textboxes heres how to do it :

Dim c as integer
c = textbox1.text
Dim g as integer
g = textbox2.text
lab.text = c - g
If lab.text = "7" then
messagebox.show ("first grade")
end If

If lab.text = "8" then
messagebox.show ("second grade")
end If

If lab.text = "9" then
messagebox.show ("third grade")
end If

So the code for showing a message box is

MessageBox.Show ("The thing you will write")

If you want to show a text that is in a textbox or label or anything for example :

lets have a textbox that user puts his name in it.write this code to the button :

dim name as string
name = TextBox1.text
MessageBox.Show (name)

So when you are showing the user a text in a textbox or something, dont use this ( " )

Note : I added you to my contacts.

Hope I helped !