Click here to Skip to main content
11,789,706 members (63,578 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
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
Edited 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 at 1-Nov-11 9:41am
Wow, this is much much simpler. Thanks!
Simon_Whale at 1-Nov-11 9:43am
your welcome :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Vic91 at 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 at 31-Oct-11 14:51pm
Verify that you are passing in the right HWND.
Vic91 at 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 at 1-Nov-11 9:39am
You're welcome.
Espen Harlinn at 31-Oct-11 15:38pm
That should work nicely :)
Philippe Mori at 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
0 OriginalGriff 999
1 Maciej Los 765
2 KrunalRohit 686
3 CPallini 606
4 Richard MacCutchan 430

Advertise | Privacy | Mobile
Web04 | 2.8.1509028.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2015
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