Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Differentiating Click Events
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raknarg




PostPosted: Fri Jun 03, 2011 9:45 am   Post subject: Differentiating Click Events

Is there a way to get whether the user is right clicking or left clicking? Is there an event for that or something? I'm doing a minesweeper game, and I wanted a flag to appear when the user right-clicks.
Sponsor
Sponsor
Sponsor
sponsor
2goto1




PostPosted: Fri Jun 03, 2011 10:06 am   Post subject: RE:Differentiating Click Events

Assuming you're developing a Windows Form app, the Click event is only raised with a left mouse button click. You'd have to use MouseDown or MouseUp. See http://www.homeandlearn.co.uk/net/nets10p2.html for details.

The API reference for Control.MouseUp and Control.MouseDown is helpful to review:

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseup.aspx

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mousedown.aspx
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: