Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Form Function Call


Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2002, 10:08 AM
praveensg's Avatar
praveensg praveensg is offline
Junior Contributor
 
Join Date: May 2002
Location: Planet VB
Posts: 359
Default Form Function Call


Hi friends,
I have a form say MainForm thru which im trying to show another form say SubForm...In the subform I have several text boxes which are populated by values taken from a file once the user enters a filename and hits enter (i have put the code in LostFocus of the filename textbox)...

actually the subform is an independent form which im reusing by showing from the Mainform now...

now what i wud want to do is call the Lost_Focus function of the subform from the Mainform so that the textboxes are populated...

how do i activate the Lost_Focus property of a textbox by a call from the MainForm?

Sorry for the confusing question but im confused as well!!!
thanx
praveen
__________________
When the going gets tough, the tough get going!!!
Reply With Quote
  #2  
Old 11-27-2002, 10:12 AM
Mikecrosoft's Avatar
Mikecrosoft Mikecrosoft is offline
Mexican Coder
 
Join Date: Jun 2002
Location: Monterrey, N.L., Mexico
Posts: 2,793
Default

Only change into SubForm

Private Sub YourTextBox_LostFocus()

for

Public Sub YourTextbox_LostFocus()

and then you can call YourTextBox_LostFocus sub from MainForm
__________________
Mikecrosoft.NET
* If I stop to ask I will stop to learn
* Just I know that I don't know nothing
Reply With Quote
  #3  
Old 11-27-2002, 10:14 AM
praveensg's Avatar
praveensg praveensg is offline
Junior Contributor
 
Join Date: May 2002
Location: Planet VB
Posts: 359
Default

thanx Mike
it works
__________________
When the going gets tough, the tough get going!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->