Click here to Skip to main content
11,922,641 members (56,670 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB 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 9:03am
Edited 31-Oct-11 12:27pm
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
Web04 | 2.8.151125.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