|
-
Jan 15th, 2010, 02:03 AM
#1
Thread Starter
Junior Member
StatusStrip/ToolStrip Events
I've got a StatusStrip...and I'm trying to initialize some code when it gets focus...so clicking on it should give focus to it right? I've tried the following code:
VB 2008 Code:
Private Sub StatusStrip_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StatusStrip.Enter
MessageBox.Show("Wooh!")
End Sub
VB 2008 Code:
Private Sub StatusStrip_GotFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StatusStrip.GotFocus
MessageBox.Show("Wooh!")
End Sub
The messagebox is just there to let me know it actually worked...but it isn't working...the messagebox isn't showing when I click on the StatusStrip, even when I'm sure it doesn't already have focus...suggestions?
Thanks.
-
Jan 15th, 2010, 02:18 AM
#2
Re: StatusStrip/ToolStrip Events
A StatusStrip control cannot receive focus. What are you actually trying to achieve?
-
Jan 15th, 2010, 02:27 AM
#3
Thread Starter
Junior Member
Re: StatusStrip/ToolStrip Events
Damn...I just need to initialize some code when I click on the status strip...I think you replied to my other thread...where I stated the first click didn't take effect...because I have some buttons on the StatusStrip which I need to work in one click...but the first click removes focus from the currently focus form, and the second click actually works...I need to be able to click the buttons and have them work in one click...it seems to only be anything located on the StatusStrip that needs two clicks...I can instantly activate controls on other forms in one click even when they don't have focus...but not the StatusStrip control...
EDIT: Basically...what I need, is a way to detect when I first click on the StatusStrip...
PS - I've tried using the mousehover event and then using StatusStrip.select(), but it can cause undesired results...like when the use is typing something in another form, and the mouse accidentally moves over the StatusStrip...
Last edited by PSYCHONAUT; Jan 15th, 2010 at 02:41 AM.
Tags for this Thread
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
|