943,832 Members | Top Members by Rank

Ad:
Apr 6th, 2009
0

Form1.Show - is it a method?

Expand Post »
VB6 - Form1.Show, it is a method? Show is not on the Form Properties nor the Form Event Code. What is SHOW? Can I add code to it?

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TheBrenda is offline Offline
18 posts
since Apr 2009
Apr 7th, 2009
0

Re: Form1.Show - is it a method?

hi brenda, check out this tutorial

http://www.vovisoft.com/vovisoft/tut...op_concept.htm
Last edited by cguan_77; Apr 7th, 2009 at 3:10 am.
Reputation Points: 19
Solved Threads: 115
Nearly a Posting Virtuoso
cguan_77 is offline Offline
1,317 posts
since Apr 2007
Apr 8th, 2009
0

Re: Form1.Show - is it a method?

The SHOW method is used to SHOW (make it visible) the form at run time.
Last edited by debasisdas; Apr 8th, 2009 at 6:10 am.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Apr 8th, 2009
0

Re: Form1.Show - is it a method?

I understand what SHOW does. I want the terminology of what it is. In Visual FoxPro, both SHOW and LOAD were considered event methods and they both gave the programmer the ability to add custom code. VB only allows me to add custom code to LOAD. So ... I am wondering what is SHOW if it is not an Event Method.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
TheBrenda is offline Offline
18 posts
since Apr 2009
Apr 8th, 2009
0

Re: Form1.Show - is it a method?

Object Browser within VB6 says:
Quote ...
Sub Show([Modal], [OwnerForm])
Member of VB.Form
Displays an MDIForm or Form object.
Quote ...
Event Load()
Member of VB.Form
Occurs when a form is loaded.
Say (for example's sake) I have a form called frmMainWindow.
I want to open the form as it is and display it onscreen, so I would do
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. frmMainWindow.Show
I can make it modal (i.e. it becomes the foremost window of the VB application I created by doing
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. frmMainWindow.Show vbModal
instead.

Now, if I had the same form (frmMainWindow), but wanted to pass some information into the form which I intend on using when displaying the form onscreen (and the data controls on it for example), I would first load the form
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Load frmMainWindow
and then I would have exposed the public properties/subs/functions within the form so I can use them where I am.
Example:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Load frmMainWindow
  2. frmMainWindow.ExampleProperty = "blah"
  3. frmMainWindow.ExampleSub
  4. bTest = frmMainWindow.ExampleFunction("info",1)
  5. frmMainWindow.Show vbModal
There, I have loaded the form into memory, then used an example property, sub and function before displaying the form using .Show

I hope that has helped? If I have just pretty much repeated what you already knew, then I apologise
Reputation Points: 13
Solved Threads: 17
Junior Poster
jonifen is offline Offline
152 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Check Box Control Array Problem
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Reading file names from a zip file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC