|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Execution to another form
I have two forms to my program right now. I have a command on my first form that opens up the second form and is "supposed" to load a txt file into a listbox. But the command still wants to load that txt file on my first form and not my second. How do I make it so the command notifies that my listbox is in another form?
|
|
#2
|
|||
|
|||
|
Hi,
When you load the Form2, you can put LoadTxt function to load the string to Form1.ListBox. ----Form2 sub Form2_load Form1.List1.AddItem("Hello") Form1.List1.AddItem("Welcome") End sub For the Visual Basic, when you want to call other object form's subobject or function, you just call like this: Object.Subobject.Method() So, you call Form2's object or method from Form1. also you can call form1's object or method from Form2. you can go to the MSDN Library or Microsoft wb site Online MSDN to the detail info. Hope it helps. Jim Guo |
|
#3
|
|||
|
|||
|
Yeah, I'll try it out. I appreciate it.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Execution to another form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|