|
-
Mar 28th, 2001, 11:14 PM
#1
Thread Starter
New Member
Ok guys... here's something heavy... Guess I won't receive any answer, but well, I'll try Try to make some new project with a full screen form, no border, in any res you want, and add a tray icon [http://www.vb-world.net/api/tip61.html] (with some API call) for it... when it starts (The form shows), it change your resolution automatically [http://www.andreavb.f2s.com/tip090004.html] (another API call...) with the project (ie: 800x600)... make some button that when you click on, it hide the form and change your res to your initial configuration (ie: 1024x768)... now check at the mouseon_event of the picturebox that your tray icon uses... the "Case WM_LBUTTONDBLCLK" will change your res back to 800x600 and show the form again.. but the form wont get any focus: you need to click on it before... why??? when you make some menu and your dbl click call it, instead of showing off the form, the form gets focus! Can someone experienced help me please?
-
Mar 29th, 2001, 06:24 AM
#2
Frenzied Member
Aaaaaa! Whoa! Slow down and explain this a little better...then maybe someone can help you.
-
Mar 30th, 2001, 03:20 AM
#3
Member
If all you want is to set the focus to your program, there is an API call that'll do that.
Code:
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
SetForeGroundWindow Me.hWnd
That should do it...
-Patrick
Visual Basic 6 SP5
Master Programmer Wannabe
Check out the API-Guide for all your API needs!
--Soli Deo Gloria--
-
Mar 30th, 2001, 10:53 AM
#4
Thread Starter
New Member
Doesn't work
I've already tried SteForeGroundWindow... But it doesn't work Really... it's an enigma...
-
Mar 30th, 2001, 03:50 PM
#5
Is there any specific window that is always getting the focus over yours?
-
Mar 30th, 2001, 06:49 PM
#6
Thread Starter
New Member
Well...
Well... There's something that must get focus over my window, cause I really need to click somewhere on the form to get his focus... But what I think is strange is the fact that my form wont get focus only if I double click on the tray icon, and only if the resolution is changed immediately after this click... If my form keeps the same res, everything will be ok... And if I show my form within a call in some menu (in my project: called with right click on the tray icon), everythin is'all right... again... This is very strange... Could this be my windows system? I think I'm gonna post some sample code...
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
|