View Full Version : VB GUI Question
mdnealy
12-08-2009, 09:14 PM
I have a list(array) in my program which has three variables. string, string string....I need to load them on my form. how do you load them into three individual text boxes
so i have new package("z001", "tom", "turkey")
and each one has to go into a separte text box. then i have to use buttons next last first previous to move through my list that is loaded...
My main concern is to get the information loaded in the text boxes..
oracleguy
12-08-2009, 10:05 PM
VB6 or VB.NET?
mdnealy
12-08-2009, 10:13 PM
vb.net.....i am just a beginner
brad211987
12-09-2009, 09:40 PM
A bit rusty on VB syntax, but here is the general idea:
The text box on your GUI should have a set method, should be setText or setValue. You can use those methods to set each textbox (e.g. textBox1.setText(array[0]))
You will need to keep an index counter for what the current displayed index is, and increment/decrement that with your previous/next buttons, then update the display again.
If you get it started and post the code, I'll be of more help, its hard to remember the syntax off the top of my head.
RoofRabbit
12-10-2009, 04:32 PM
I don't have any VB.Net programming experience but in VB6 I'd create the first textbox then copy/paste it allowing VB to create an array. You can then update the textbox contents in a simple loop.
Dim i As Integer
For i = 0 to 2
Text1(i).Text = MyWhateverStringArray(i)
Next i
If you can relate vb6 coding to vb.net, I have some helpful source code on this
page. The page is for vb programming help only, there are no advertisements
of any kind on it.
http://roofrabbit.com/vb.html
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.