Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 14th, 2003, 09:08 AM
York1623 York1623 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 8 York1623 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old July 14th, 2003, 02:14 PM
gguoming gguoming is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 5 gguoming User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #3  
Old July 14th, 2003, 05:19 PM
York1623 York1623 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 8 York1623 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yeah, I'll try it out. I appreciate it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Execution to another form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway