|
-
Mar 29th, 2001, 01:13 PM
#1
Thread Starter
New Member
Why does a form being shown after a resolution modification issued by a double click on a tray icon doesn't get focus? Can someone help me please? Sorry for my last post... Sometimes my englih sucks...
-
Mar 29th, 2001, 02:18 PM
#2
Use the SetForegroundWindow API function.
Code:
Private Declare Function SetForegroundWindow _
Lib "user32" (ByVal hwnd As Long) As Long
-
Mar 29th, 2001, 03:45 PM
#3
Thread Starter
New Member
Thanks a lot...
Thanks a lot! That's exactly what I was looking for
-
Mar 29th, 2001, 04:02 PM
#4
Thread Starter
New Member
Finally..
Finally... it works for the keypress event but not for clicks... like the click event of my image box... why? Do you think you can help me again please?
-
Mar 29th, 2001, 04:14 PM
#5
What do you mean? This code works for me.
Code:
Private Sub Image1_Click()
SetForegroundWindow Form2.hwnd
End Sub
-
Mar 29th, 2001, 05:17 PM
#6
Thread Starter
New Member
...
No... I mean... Not when you click on the image. See:
my project is a fullscreen form 800x600... to see it fullscreen i make it change resolution (ie: I'm in 1024x768 it'll change for 800x600, to see the whole form) and when it starts it put some icon into tray, ok?
I've made a button on this form (some image box) that hide it on_click... so it set res back to 1024x768... when you double click on the tray icon, the form shows again, set back the res to 800x600, but it don't seem to get focus! I've tried a lot of thing: SetForegroundWindow, Form1.SetFocus, Form1.Show... Nothing work! I don't understand what is the problem... And it's only on Left double or simple click on tray icon! Cause I've made a menu called with Right click, and everything is fine! (Hard huh? ) Can some1 help me to understand what it is? HELP!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|