|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Minimized form through first oneI have one form with a command button. When the user click on that button, it will call a second form (which borderstyle = none) where I must enter the password. But it happens that when I minimized the first form, the second form (borderstyle = 0) still remains in the screen. I would like to know if I can control this situation, I mean, when I minimized the first form, the second form will follow the first one, it will minimized too. Cheers! Claudi *** Sent via Developersdex http://www.developersdex.com *** Claudia Fong wrote:
> Hello, Place code in the first form's Resize event, and check for the form's> > I have one form with a command button. When the user click on that > button, it will call a second form (which borderstyle = none) where I > must enter the password. But it happens that when I minimized the > first form, the second form (borderstyle = 0) still remains in the > screen. > > I would like to know if I can control this situation, I mean, when I > minimized the first form, the second form will follow the first one, > it will minimized too. WindowState property being vbMinimized -- Regards, Michael Cole
Show quote
"Michael Cole" <no***@hansen.com> wrote in message Well, that'd be the "hard" way. It'd be much easier, and better, to just news:usGmLkqVFHA.3280@TK2MSFTNGP09.phx.gbl... > Claudia Fong wrote: >> Hello, >> >> I have one form with a command button. When the user click on that >> button, it will call a second form (which borderstyle = none) where I >> must enter the password. But it happens that when I minimized the >> first form, the second form (borderstyle = 0) still remains in the >> screen. >> >> I would like to know if I can control this situation, I mean, when I >> minimized the first form, the second form will follow the first one, >> it will minimized too. > > Place code in the first form's Resize event, and check for the form's > WindowState property being vbMinimized specify the first form as the owner of the second form. Private Sub Command1_Click() Form2.Show vbModeless, Me End Sub When the first form is minimized, the second form will automatically hide. When the first form gets restored, so will the second form. -- Mike Microsoft MVP Visual Basic "Claudia Fong" <cdolphi***@yahoo.co.uk> wrote If I understand your question correctly, you would use:> I have one form with a command button. When the user click on that > button, it will call a second form (which borderstyle = none) where I > must enter the password. But it happens that when I minimized the first > form, the second form (borderstyle = 0) still remains in the screen. > > I would like to know if I can control this situation, I mean, when I > minimized the first form, the second form will follow the first one, it > will minimized too. Form2.Show vbModeless, Me LFS |
|||||||||||||||||||||||