Click here to Skip to main content
Rate this: bad
good
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 9:03am
Vic91421
Edited 31-Oct-11 12:27pm
v2
Rate this: bad
good
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[^]
  Permalink  
Comments
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
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v2
Comments
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.
Thanks!
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 341
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 220
3 Praneet Nadkar 197
4 Shweta N Mishra 161
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2014
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