label click event only works with right mouse click 
Author Message
 label click event only works with right mouse click
New to vb, not to programming.
I'm building a simple form to display a running clock.
I want to click the label box (showing the time display itself) to
toggle between having the seconds displayed or not.
It works, but with the right mouse click, not the left as I expected.
If I add a command button to toggle the clock display, it
works as expected with a left mouse click. Is there a property
somewhere for labels that I'm overlooking? I'm baffled.
Can you point me to the answer? Thanks.



Tue, 25 Feb 2003 13:02:18 GMT  
 label click event only works with right mouse click


Quote:
> New to vb, not to programming.
> I'm building a simple form to display a running clock.
> I want to click the label box (showing the time display itself) to
> toggle between having the seconds displayed or not.
> It works, but with the right mouse click, not the left as I
expected.
> If I add a command button to toggle the clock display, it
> works as expected with a left mouse click. Is there a property
> somewhere for labels that I'm overlooking? I'm baffled.

Me too.  I assume you are using the Label's Click event?  This is
fired for labels (as for everything) by either the left or right
buttons, so it should work either way.

I would suggest temporarily using the Label's MouseDown event instead.
This event allows you to detect which button has been depressed.  You
can arrange only to respond to the left button.  See if this works.

Maybe the best bet is to post the relevant code here, it may be you
have overlooked something.

Chrisitna

--
Christina West



Tue, 25 Feb 2003 20:13:05 GMT  
 label click event only works with right mouse click
If you're using the click event it doesn't matter which button you
click as it doesn't discriminate between the two. However if you're
using either mousedown or mouseup then the button variable tells you
which button you've clicked. Might be worth you posting the code
module involved (including the sub and end sub lines) so we can
have a better idea of what you've done.
Quote:

> New to vb, not to programming.
> I'm building a simple form to display a running clock.
> I want to click the label box (showing the time display itself) to
> toggle between having the seconds displayed or not.
> It works, but with the right mouse click, not the left as I expected.
> If I add a command button to toggle the clock display, it
> works as expected with a left mouse click. Is there a property
> somewhere for labels that I'm overlooking? I'm baffled.
> Can you point me to the answer? Thanks.



Tue, 25 Feb 2003 22:06:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to include an ordinairy mouse-click in a right-click

2. Right Click Event for VB label?

3. Right click mouse events

4. Context Menu's and right mouse click event

5. listbox event for right mouse click?

6. Creating Right Mouse Click Events

7. Mouse Right Click Event

8. Left Click vs. Right Click

9. Right-click same as left-click in textbox

10. Right Button Click emulating Left Button Click

11. Double Click or Right Click in TreeView

12. How to detect when a Label Control receives a right click

 

 
Powered by phpBB® Forum Software