|
-
Jul 2nd, 2002, 02:29 AM
#1
Thread Starter
Junior Member
System Tray Problems
Hi all,
I'm having problems with putting my program in the system tray and all. I'm using the code from http://www.vb-world.net/api/tip61.html
When the system tray icon is clicked, I want my form to pop up. My problem is that instead of popping up, it just blinks and flashes in the taskbar...
Anyone had this problem and solved it? Thnx in advance.
-
Jul 2nd, 2002, 02:40 AM
#2
Banned
What is the code you use in the MouseMove event to popup your form?
-
Jul 2nd, 2002, 02:51 AM
#3
Thread Starter
Junior Member
Code:
X = X / Screen.TwipsPerPixelX
Select Case X
Case WM_LBUTTONDOWN
Caption = "Left Click"
Case WM_RBUTTONDOWN
Caption = "Right Click"
Case WM_MOUSEMOVE
Caption = "Move"
Case WM_LBUTTONDBLCLK
Me.Show
Me.SetFocus
Caption = "Double Click"
End Select
-
Jul 2nd, 2002, 02:59 AM
#4
Banned
Perhaps this works:
VB Code:
Me.Show
Me.WindowState = vbNormal
Me.Setfocus
-
Jul 2nd, 2002, 03:12 AM
#5
New vbForums styleeeeeee!
Have a look at this project...not finished yet, but it'll do the trick...
System tray code. Allows you to add image lists and the ability to use animation in the system tray 
Oh, and it doesn't piggy back off the MouseMove event either, full subclassing...
-
Jul 2nd, 2002, 12:52 PM
#6
Thread Starter
Junior Member
Thanks Wokawidget, that was exactly what I was looking for
-
Jul 2nd, 2002, 01:11 PM
#7
Lively Member
What's the problem with "piggy backing" off the MouseMove event really? I've been using that solution for a while now and still haven't run into any problems. Will I run into problems with it in the future or is it safe enough to use?
-
Jul 3rd, 2002, 02:15 AM
#8
G b...Lalalala...Woof...More drugs please? NO!
Errr...I used to piggy back of the MouseMove event, but then some VB experts here, can't remember who, although I think it was users like Hack etc, said that SubClassing was the way to do it correctly, which makes sense since what happens if you need to use the MouseMove event, for a mousemove command???
Think that's what they told me...can anyone else enlighten us?
Oh, with the project above, DO NOT terminate your app with the END statement, and do not use the STOP button in VB's IDE, always close the app properly or VB with die on it's arse 
Forgot to mention that...Not bad programming, just that while it's subclassed it's best if you unsubclass and close the app correctly...
Woka
-
Jul 3rd, 2002, 02:55 AM
#9
Lively Member
Well, I'm not gonna use the mousemove event for anything else, so it should be ok then I guess 
I'll try to use subclassing in my next project, but for now I guess this will do just nicely.
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
|