Making a Form the Active Form 
Author Message
 Making a Form the Active Form

I have an application that brings forms up in a
sequentail, wizard like (modal, showdialog) fashion.
Everything works OK but if a user goes back and forth
between forms multiple times the form will not be made the
active form.

I'm using a forms collection to store refrences to the
forms. Is there a way to make a form the active form?

Thanks!



Wed, 27 Jul 2005 21:27:52 GMT  
 Making a Form the Active Form
Use the Activate method?
I would not use multiple forms for a wizard. I would use a single form with
either a tab control or multiple containers.
If you really want to have a separate form structure for each page of the
wizard, why not define each as a UserControl and display those in your
form? You could create instances dynamically (if necessary), or simply keep
them in an array.

Cheers,
  Jason

Quote:

> I have an application that brings forms up in a
> sequentail, wizard like (modal, showdialog) fashion.
> Everything works OK but if a user goes back and forth
> between forms multiple times the form will not be made the
> active form.

> I'm using a forms collection to store refrences to the
> forms. Is there a way to make a form the active form?

> Thanks!



Wed, 27 Jul 2005 22:02:24 GMT  
 Making a Form the Active Form
Thanks for the response. Activate does not work. I may re-
write at some point and user controls might be the fix.
Thnaks
Quote:
>-----Original Message-----
>Use the Activate method?
>I would not use multiple forms for a wizard. I would use
a single form with
>either a tab control or multiple containers.
>If you really want to have a separate form structure for
each page of the
>wizard, why not define each as a UserControl and display
those in your
>form? You could create instances dynamically (if

necessary), or simply keep
Quote:
>them in an array.

>Cheers,
>  Jason


>> I have an application that brings forms up in a
>> sequentail, wizard like (modal, showdialog) fashion.
>> Everything works OK but if a user goes back and forth
>> between forms multiple times the form will not be made
the
>> active form.

>> I'm using a forms collection to store refrences to the
>> forms. Is there a way to make a form the active form?

>> Thanks!
>.



Wed, 27 Jul 2005 23:08:53 GMT  
 Making a Form the Active Form
Have you tried setting that form as the defualt startup form?


Quote:
> Thanks for the response. Activate does not work. I may re-
> write at some point and user controls might be the fix.
> Thnaks
> >-----Original Message-----
> >Use the Activate method?
> >I would not use multiple forms for a wizard. I would use
> a single form with
> >either a tab control or multiple containers.
> >If you really want to have a separate form structure for
> each page of the
> >wizard, why not define each as a UserControl and display
> those in your
> >form? You could create instances dynamically (if
> necessary), or simply keep
> >them in an array.

> >Cheers,
> >  Jason


> >> I have an application that brings forms up in a
> >> sequentail, wizard like (modal, showdialog) fashion.
> >> Everything works OK but if a user goes back and forth
> >> between forms multiple times the form will not be made
> the
> >> active form.

> >> I'm using a forms collection to store refrences to the
> >> forms. Is there a way to make a form the active form?

> >> Thanks!
> >.



Thu, 28 Jul 2005 00:15:14 GMT  
 Making a Form the Active Form
Did you try Form.Select()?

HTH
Alex


Quote:
> Thanks for the response. Activate does not work. I may re-
> write at some point and user controls might be the fix.
> Thnaks
> >-----Original Message-----
> >Use the Activate method?
> >I would not use multiple forms for a wizard. I would use
> a single form with
> >either a tab control or multiple containers.
> >If you really want to have a separate form structure for
> each page of the
> >wizard, why not define each as a UserControl and display
> those in your
> >form? You could create instances dynamically (if
> necessary), or simply keep
> >them in an array.

> >Cheers,
> >  Jason


> >> I have an application that brings forms up in a
> >> sequentail, wizard like (modal, showdialog) fashion.
> >> Everything works OK but if a user goes back and forth
> >> between forms multiple times the form will not be made
> the
> >> active form.

> >> I'm using a forms collection to store refrences to the
> >> forms. Is there a way to make a form the active form?

> >> Thanks!
> >.



Thu, 28 Jul 2005 00:37:06 GMT  
 Making a Form the Active Form
Hello,

Quote:
> Thanks for the response. Activate does not work. I may re-
> write at some point and user controls might be the fix.
> Thnaks

I don't know what do you do with your windows, but there is
a way to say "restore". Make a "Message" with you Form.Handle
WM_SYSCOMMAND and SC_RESTORE and call the WndProc.
I think it could help to solve your problem. It's the same if you want
restore a minimized Wiindow.

Regards

Holger



Thu, 28 Jul 2005 06:11:25 GMT  
 Making a Form the Active Form
Hi SeeGuy,

Instead of using multiple forms, you can try Panels. You can go "Next" and
"Back" by setting the Panel.Visibility property accordingly.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:
>Content-Class: urn:content-classes:message


>Subject: Making a Form the Active Form
>Date: Sat, 8 Feb 2003 05:27:52 -0800
>Lines: 10

>MIME-Version: 1.0
>Content-Type: text/plain;
>    charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcLPdeGF9UULVYcCQB2lTrz6gJksxg==
>Newsgroups: microsoft.public.dotnet.languages.vb
>Path: cpmsftngxa06
>Xref: cpmsftngxa06 microsoft.public.dotnet.languages.vb:89043
>NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>I have an application that brings forms up in a
>sequentail, wizard like (modal, showdialog) fashion.
>Everything works OK but if a user goes back and forth
>between forms multiple times the form will not be made the
>active form.

>I'm using a forms collection to store refrences to the
>forms. Is there a way to make a form the active form?

>Thanks!



Fri, 29 Jul 2005 16:18:59 GMT  
 Making a Form the Active Form


Quote:
> I have an application that brings forms up in a
> sequentail, wizard like (modal, showdialog) fashion.
> Everything works OK but if a user goes back and forth
> between forms multiple times the form will not be made the
> active form.

> I'm using a forms collection to store refrences to the
> forms. Is there a way to make a form the active form?

> Thanks!

Have you tried just calling the Showdialog method again?

--
If you don't like lunchmeat, please remove it from my e-mail address to
send me an e-mail



Fri, 29 Jul 2005 22:33:19 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Making a form a child form of an MDI form

2. Making a form a child form of an MDI form

3. Q.Setting hwnd for a subform and making it the active form

4. open form without making application active

5. Making another mdichild form active

6. Question about making first field active on a VB form

7. visible=true/Form.Show makes Form.Location change!

8. Making a form pop-up form a button

9. making a mdi form a form during run time with click event

10. Making a child form much bigger than the parent MDI form

11. Close forms by VBA-prcedure except active and start form

12. determining active form from multiple instances of a form

 

 
Powered by phpBB® Forum Software