
Transfer Control to another Form
You can show a modal form by:
Form2.Show vbModal
When Show displays a modal form, no subsequent code is executed until the
form is hidden or unloaded.
HTH
John
Quote:
>Hi,
>Thanks in advance for any help.
>I need to program some application with VB ans still quite new to it. I
>wanted to create a Pop-up Form2 that called by one another Form1 which when
>the Pop-up have been called, all the flow control have been tranfer to it.
>Form1 will wait, stop execution next statement and become inactive. Until
>Form2 finished, then control will be return to Form1 - the usual Call
>Subroutine style.
>Because the Event-Driven, when I called Form2, Form1 had still process it
>next line statement. And I could not use what input I get from Pop-up to
>continue process command. I have tried to disable the Form1 by
>enabled=false, the form was inactived but the next statement still be
>processed.
>What I want will look like when we use CommonDialog to open or save file.
>When CommonDialog is activated. All others forms are inactived and halted,
>even VB itself. The Dialog will wait for you until you exit. Then after
>finish Dialog, next statement of the call-from Form will be execute.
>I have tried some more difficult way using API call and Loop check the key
>or mouse. This work out but almost hang-up the computer and still not like
>the CommonDialog. Do I have another easier way and more effective to
>program it with
Visual Basic 's tools, command or Method.
>Thanks,
>Beginner.