Re: Displaying forms
- From: "Melvin" <marvwade@xxxxxxxxxxxxxxx>
- Date: Thu, 11 Jun 2009 15:47:13 -0400
"dpb" <none@xxxxxxx> wrote in message news:h0ri66$qii$1@xxxxxxxxxxx
Melvin wrote:I have continuing difficulty understand just how and when a form is displayed. The specifics this time is as follows:...
I have two forms. Form1 and Form2
Form1 is displayed and at some point, based on user input ,I want to hide Form 1, switch to Form 2, display it and run the only procedure (GetPrices) contained in it then unload it and return to Form 1 and make it visible and continue processing.
There is no user input on Form2, only a label with fixed data.
Not sure _why_ you would choose to do it this way, but...
The one thing you'll have to be sure to do is to have the function that calls the second form redisplay the form that _does_ have some user interaction on it or you'll be stuck showing that label until kill the app.
Add a command button to Form1 and a Label to Form2 in a project and paste into their respective forms..
Private Sub Command1_Click()
Dim PauseTime, Start
Form1.Hide
Form2.Show
Form2.Form2Sub
PauseTime = 5 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents
Loop
Form2.Hide
Form1.Show
End Sub
Sub Form2Sub()
Form2.Label1 = "New Text From Form2"
End Sub
--
Please see my reply to Larry above. Maybe this would help you understand why I believed this way the only way to do what I am attempting to do.
Mel
.
- References:
- Displaying forms
- From: Melvin
- Re: Displaying forms
- From: dpb
- Displaying forms
- Prev by Date: Re: Displaying forms
- Next by Date: Re: Use an Addin to automatically add date/time stamp to each edited line of VB6 code?
- Previous by thread: Re: Displaying forms
- Next by thread: VB writing image to MS Word doc
- Index(es):
Relevant Pages
|