Click here to Skip to main content
13,056,401 members (114,390 online)
Rate this:
Please Sign up or sign in to 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 31-Oct-11 8:03am
Updated 31-Oct-11 11:27am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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

Form showdialog[^]
Vic91 1-Nov-11 9:41am
Wow, this is much much simpler. Thanks!
Simon_Whale 1-Nov-11 9:43am
your welcome :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Nishant Sivakumar 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.
Nishant Sivakumar 1-Nov-11 9:39am
You're welcome.
Espen Harlinn 31-Oct-11 15:38pm
That should work nicely :)
Philippe Mori 31-Oct-11 18:02pm
Setting correctly the Form owner should suffice.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170728.5 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100