Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can not speak English but maybe i can tell my problem to you.



VB
If  button held down  Then

Label1.text= Mouse Clicked(held down)

end if


I want the truth of the above code. And works When the form is not active (while minimize)

Thank You
Emre
Posted

Not simple I'm afraid: you need to install global mouse hooks to detect the button clicks.
This may help: Processing Global Mouse and Keyboard Hooks in C#[^]
 
Share this answer
 
SOLVED
Form Load Event;
timer1.interval ="10"

Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Select Case MouseButtons
Case Windows.Forms.MouseButtons.Left
MessageBox.Show("Left button pressed")
Case Windows.Forms.MouseButtons.Right
MessageBox.Show("Right button pressed")
Case Windows.Forms.MouseButtons.Middle
MessageBox.Show("Middle button pressed")

Case Windows.Forms.MouseButtons.Left + Windows.Forms.MouseButtons.Right
MessageBox.Show("Left & Right are pressed")
End Select
End Sub


Thanks...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900