Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
AnswerRe: Right Click event producing no result Pin
mike montagne15-May-07 14:31
mike montagne15-May-07 14:31 
AnswerRe: Right Click event producing no result [modified] Pin
mike montagne15-May-07 14:38
mike montagne15-May-07 14:38 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 15:21
mvePIEBALDconsult15-May-07 15:21 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:28
mike montagne15-May-07 15:28 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 15:30
mvePIEBALDconsult15-May-07 15:30 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:38
mike montagne15-May-07 15:38 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:33
mike montagne15-May-07 15:33 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 15:50
mvePIEBALDconsult15-May-07 15:50 
No, I don't write my own controls.

I have a private MouseTrap field in my Form. Then any controls (like Buttons) for which I want to simulate right-clicks I use:

MouseTrap.Add ( button1 ) ;

Which adds the MouseTrap's methods as handlers for the Controls' MouseUp, MouseDown, MouseEnter, and MouseLeave events.

If a Control triggers a MouseDown followed by a MouseUp (with no MouseLeave or MouseEnter in between) then the MouseTrap raises its own MouseClick event.

I write a general MouseClick handler to figure out which Control fired the event, but I may be able to streamline that.

Anyway, this is just something I have been dreaming up for a few weeks and finally waded into today. It may be a while before I have something that's ready for prime time.
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 17:36
mike montagne15-May-07 17:36 
AnswerRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 14:55
mvePIEBALDconsult15-May-07 14:55 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:21
mike montagne15-May-07 15:21 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 15:28
mvePIEBALDconsult15-May-07 15:28 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:40
mike montagne15-May-07 15:40 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:42
mike montagne15-May-07 15:42 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 15:51
mvePIEBALDconsult15-May-07 15:51 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 15:57
mike montagne15-May-07 15:57 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 16:20
mvePIEBALDconsult15-May-07 16:20 
GeneralRe: Right Click event producing no result Pin
Kataric15-May-07 16:27
Kataric15-May-07 16:27 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 17:07
mike montagne15-May-07 17:07 
GeneralRe: Right Click event producing no result Pin
mike montagne15-May-07 17:10
mike montagne15-May-07 17:10 
GeneralRe: Right Click event producing no result Pin
Kataric15-May-07 17:11
Kataric15-May-07 17:11 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 17:23
mvePIEBALDconsult15-May-07 17:23 
GeneralRe: Right Click event producing no result Pin
mike montagne16-May-07 4:43
mike montagne16-May-07 4:43 
GeneralRe: Right Click event producing no result Pin
PIEBALDconsult15-May-07 17:34
mvePIEBALDconsult15-May-07 17:34 
AnswerRe: Right Click event producing no result Pin
PIEBALDconsult16-May-07 9:09
mvePIEBALDconsult16-May-07 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.