PC Review


Reply
Thread Tools Rate Thread

How do I invoke a "Right-Click" Programmtically?

 
 
the_grove_man@yahoo.com
Guest
Posts: n/a
 
      25th Aug 2006


How do I invoke a "Right-Click" Programmtically?

John

 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      25th Aug 2006
You call the method that the Click event handler would call if the right
mouse button was clicked.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> How do I invoke a "Right-Click" Programmtically?
>
> John
>



 
Reply With Quote
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      25th Aug 2006
You don't. A right-click is a mousebutton event, and the MouseEventArgs
class has properties that will enable you to tell if its was a right-button
click. Your event handling code can then react to this programmatically.

What's the goal here?

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"(E-Mail Removed)" wrote:

>
>
> How do I invoke a "Right-Click" Programmtically?
>
> John
>
>

 
Reply With Quote
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      25th Aug 2006
It depends what you mean by this.
Do you want to simulate mouse clicks and movements or you just want to fire
the events of some particular control?


--
Stoitcho Goutsev (100)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> How do I invoke a "Right-Click" Programmtically?
>
> John
>



 
Reply With Quote
 
the_grove_man@yahoo.com
Guest
Posts: n/a
 
      25th Aug 2006
I don't want to trigger any event, I just access to a right-click. It's
a long story why I want this, but is it possible with or without win32
API?


Stoitcho Goutsev (100) wrote:
> It depends what you mean by this.
> Do you want to simulate mouse clicks and movements or you just want to fire
> the events of some particular control?
>
>
> --
> Stoitcho Goutsev (100)
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> >
> > How do I invoke a "Right-Click" Programmtically?
> >
> > John
> >


 
Reply With Quote
 
Matthias Heise
Guest
Posts: n/a
 
      26th Aug 2006
Hello,

I think I haven't understood you right. But

a) If you want to invoke a system event that is a mouse right-click you
need to use the Win32 API via DLL p/Invoke.

b) If you just need to catch the event hook on the MouseClick or
MouseDown or MouseUp event and react to the member Button given by the
event:

public void OnMouseClick(object sender,
System.Windows.Forms.MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
// place your code here
}
}

Bye

Matthias


(E-Mail Removed) schrieb:
> I don't want to trigger any event, I just access to a right-click. It's
> a long story why I want this, but is it possible with or without win32
> API?
>
>
> Stoitcho Goutsev (100) wrote:
>> It depends what you mean by this.
>> Do you want to simulate mouse clicks and movements or you just want to fire
>> the events of some particular control?
>>
>>
>> --
>> Stoitcho Goutsev (100)
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>
>>> How do I invoke a "Right-Click" Programmtically?
>>>
>>> John
>>>

>

 
Reply With Quote
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      28th Aug 2006
John,

Forgive me for saying this, but it is really hard to understand your
question. That's why I asked for more info.

"...access to a right-click.." doesn't makes sense to me.

Please try to explain with more words your problem.


--
Stoitcho Goutsev (100)
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I don't want to trigger any event, I just access to a right-click. It's
> a long story why I want this, but is it possible with or without win32
> API?
>
>
> Stoitcho Goutsev (100) wrote:
>> It depends what you mean by this.
>> Do you want to simulate mouse clicks and movements or you just want to
>> fire
>> the events of some particular control?
>>
>>
>> --
>> Stoitcho Goutsev (100)
>>
>> <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >
>> >
>> > How do I invoke a "Right-Click" Programmtically?
>> >
>> > John
>> >

>



 
Reply With Quote
 
the_grove_man@yahoo.com
Guest
Posts: n/a
 
      24th Sep 2006
Hi Stoitcho,
I apologize for not responding more promptly. I actually solved what I
was trying to do, sorry for any ambiguity .

John


Stoitcho Goutsev (100) wrote:
> John,
>
> Forgive me for saying this, but it is really hard to understand your
> question. That's why I asked for more info.
>
> "...access to a right-click.." doesn't makes sense to me.
>
> Please try to explain with more words your problem.
>
>
> --
> Stoitcho Goutsev (100)
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I don't want to trigger any event, I just access to a right-click. It's
> > a long story why I want this, but is it possible with or without win32
> > API?
> >
> >
> > Stoitcho Goutsev (100) wrote:
> >> It depends what you mean by this.
> >> Do you want to simulate mouse clicks and movements or you just want to
> >> fire
> >> the events of some particular control?
> >>
> >>
> >> --
> >> Stoitcho Goutsev (100)
> >>
> >> <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> >
> >> >
> >> > How do I invoke a "Right-Click" Programmtically?
> >> >
> >> > John
> >> >

> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I have "Shift-Click" or "Ctrl-Click" Code on Form List? =?Utf-8?B?TWlrZVp6?= Microsoft Excel Programming 1 13th Jun 2007 11:39 AM
"Simulate"/Invoke Click event minimega Microsoft Dot NET Compact Framework 2 2nd May 2006 08:57 AM
Outlook XP - viewing contacts when click on "To" or "cc" or "BCC:" - address book is emty be Microsoft Outlook Contacts 1 18th Jan 2004 10:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 AM.