Form1.Show - is it a method?

Reply

Join Date: Apr 2009
Posts: 13
Reputation: TheBrenda is an unknown quantity at this point 
Solved Threads: 0
TheBrenda TheBrenda is offline Offline
Newbie Poster

Form1.Show - is it a method?

 
0
  #1
Apr 6th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 1,109
Reputation: cguan_77 has a little shameless behaviour in the past 
Solved Threads: 91
cguan_77's Avatar
cguan_77 cguan_77 is offline Offline
Veteran Poster

Re: Form1.Show - is it a method?

 
0
  #2
Apr 7th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,096
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 128
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Form1.Show - is it a method?

 
0
  #3
Apr 8th, 2009
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.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 13
Reputation: TheBrenda is an unknown quantity at this point 
Solved Threads: 0
TheBrenda TheBrenda is offline Offline
Newbie Poster

Re: Form1.Show - is it a method?

 
0
  #4
Apr 8th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 140
Reputation: jonifen is an unknown quantity at this point 
Solved Threads: 15
jonifen jonifen is offline Offline
Junior Poster

Re: Form1.Show - is it a method?

 
0
  #5
Apr 8th, 2009
Object Browser within VB6 says:
Sub Show([Modal], [OwnerForm])
Member of VB.Form
Displays an MDIForm or Form object.
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC