All Forums >> [Scripting] >> WSH & Client Side VBScript >> I need to do a VB project in school Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Hello, I need to do a VB project in school. I'm 13 years old and the project has to be based on While wend, list box, add/subtract, changing color of the form. It doesn't have to include all of them but as many of them as possible. I'm finding it really hard to come up with a project because I find the coding very complicated. The project is worth 25 marks and I have to give it my Monday. Can someone give me a useful script? Please? And tell me what needs to be inserted in the form? If I don't come online please email me at tywien_90@hotmail.com Thanks!
_____________________________
Knowledge is knowing that the tomato is a fruit, wisdom is not putting it in a fruit salad
This will display 10 different message boxes displaying the numbers 0 thru 9 (i think)
for a listbox you would basically refer to the object by its name listbox1 for example. If you want to add an item to the box, you would type something like listbox1.additem "SOME STRING" or listbox1.additem SOMEVARIABLEREPRESENTINGASTRING
changing the color of the form would be done by accessing the background property of the form object. I am not 100% sure if it is called bgcolor or background or whatever, but basically it would look like this...
form1.bgcolor =
if you look on the property list in Visual basic you can see the codes for the colors, they look something like &afh0000000 something like that, i am not really sure offhand.
I am not really sure what you mean by add/subtract, but basically you could do something like this...
Dim X,Y X=10 Y=50 msgbox(y-x)
This will display a messagebox hopefully with the number 40.
If you need anymore help, just try to be as specific as possible...
That's quite helpful but maybe you could give a program which shows the result of the addition or subtraction of two numbers inserted by the user in a message box.
Or maybe you could give me a while wend program that shows the multiples of 50 or summat in a text box?
If you have MSN or YIM maybe I could add you, to be more specific, it's hard like this. Thanks a lot, I really appreciate your help.