Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Like when you open a dialog box, if you click on the form you called it from the dialog blinks and it wont let you use the form until you close the dialog. I'm declaring a small form like notepad's "go to" and I want it to blink when the mainform is clicked to force the user to close tha go to form first. How could I do that?

Thanks in advance.
Posted
Updated 31-Oct-11 11:27am
v2

Have a look at using the showdialog method of the form i.e. form1.showdialog

Form showdialog[^]
 
Share this answer
 
Comments
Vic91 1-Nov-11 9:41am    
Wow, this is much much simpler. Thanks!
Simon_Whale 1-Nov-11 9:43am    
your welcome :)
 
Share this answer
 
v2
Comments
Vic91 31-Oct-11 14:18pm    
I did run into that but I can't make it work when I click the main form. The main form just activates and the "go to" form stays inactive. I tried it in the main form click and got focus events and nothing.
Nish Nishant 31-Oct-11 14:51pm    
Verify that you are passing in the right HWND.
Vic91 1-Nov-11 9:38am    
I fixed it, yes I was sending the right HWND, just not at the right time. I called it on mainform.activate.
Thanks!
Nish Nishant 1-Nov-11 9:39am    
You're welcome.
Espen Harlinn 31-Oct-11 15:38pm    
That should work nicely :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900