PC Review


Reply
Thread Tools Rate Thread

contextmenu & left mouse click

 
 
Sender
Guest
Posts: n/a
 
      8th Oct 2003
somebody wrote the solution for this many many days ago on this
newsgroup....but I lost the notes..... and everyone knows how hard it is to
search on newgroups (archives).... so here I am asking again.

i have a button: button1 and a contextmenu: contextmenu1.

what's the code to execute (open) contextmenu1 by clicking LEFT button of
the mouse.

thanks in advance!





 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      8th Oct 2003
* "Sender" <(E-Mail Removed)> scripsit:
> somebody wrote the solution for this many many days ago on this
> newsgroup....but I lost the notes..... and everyone knows how hard it is to
> search on newgroups (archives).... so here I am asking again.
>
> i have a button: button1 and a contextmenu: contextmenu1.
>
> what's the code to execute (open) contextmenu1 by clicking LEFT button of
> the mouse.


\\\
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.ContextMenu1.Show(Me.Button1, New Point(0, 0))
End Sub
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Stephen
Guest
Posts: n/a
 
      8th Oct 2003
Dim position As System.Drawing.Point
position.X = Button1.Left
position.Y = Button1.Top + Button1.Height
ContextMenu1.Show(Me, position)

This code will show the menu with its left edge aligned with the left edge
of the button, and its top edge aligned witht the bottom edge of the button.


"Sender" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> somebody wrote the solution for this many many days ago on this
> newsgroup....but I lost the notes..... and everyone knows how hard it is

to
> search on newgroups (archives).... so here I am asking again.
>
> i have a button: button1 and a contextmenu: contextmenu1.
>
> what's the code to execute (open) contextmenu1 by clicking LEFT button of
> the mouse.
>
> thanks in advance!
>
>
>
>
>



 
Reply With Quote
 
Sender
Guest
Posts: n/a
 
      8th Oct 2003
worked very well. thx.


"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:bm20t7$hq2cb$(E-Mail Removed)...
> * "Sender" <(E-Mail Removed)> scripsit:
> > somebody wrote the solution for this many many days ago on this
> > newsgroup....but I lost the notes..... and everyone knows how hard it is

to
> > search on newgroups (archives).... so here I am asking again.
> >
> > i have a button: button1 and a contextmenu: contextmenu1.
> >
> > what's the code to execute (open) contextmenu1 by clicking LEFT button

of
> > the mouse.

>
> \\\
> Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles Button1.Click
> Me.ContextMenu1.Show(Me.Button1, New Point(0, 0))
> End Sub
> ///
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>



 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      8th Oct 2003
"Sender" <(E-Mail Removed)> schrieb
> somebody wrote the solution for this many many days ago on this
> newsgroup....but I lost the notes..... and everyone knows how hard it
> is to search on newgroups (archives).... so here I am asking
> again.


A search on the Sender should help.

> i have a button: button1 and a contextmenu: contextmenu1.
>
> what's the code to execute (open) contextmenu1 by clicking LEFT
> button of the mouse.


I'd check which mouse button was pressed in the mousedown event. If it's the
left button, show the context menu (use it's show method).


--
Armin

 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      8th Oct 2003
Hi Sender,

|| and everyone knows how hard it is
|| to search on newgroups (archives)

Lol. Oh yes they do! Oh no they don't!!

I'll admit I have it easier than Joe Public because I have a Favourite
Link set up for me but it is very easy to search Google Groups for stuff.

Go to Google.
Click on Google Groups.
Type this into the box:
contextmenu left mouse button group:*languages.vb.

Your previous query is the very first one shown!!


Here's a better tip. Don't call yourself Sender. Use something with
imagination - SenderSplendour, for example. Now if you go into Advanced Groups
Search (the link is just above the box in Google Groups), you can enter your
name in the Author box. With your unique name you'll only get your own posts
reported.

My other tip, but you've already picked up on that, is to use a decent
title for your query. "Context menu & left mouse click" pretty much says it
all. But "Beginners question" which you had before is hard to remember once
it's heading into the middle distance. Also general titles like "Threading
question" will produce loads of returns because there are lots of questions
about threading.

So - a unique name and a unique title will help you match keywords.

And using Advanced Groups Search (sort by date, too) will help you limit
the search to just this newsgroup and/or yourself.

Here's the link that I use to get Advanced Groups Search for just this
newsgroup, sorted by date.

http://www.google.co.uk/advanced_gro..._ugroup=*langu
ages.vb.

And here's exactly the same page but using a TinyUrl (so that it won't be
split like the one above)
http://tinyurl.com/q8ks

Regards,
Fergus



 
Reply With Quote
 
Sender
Guest
Posts: n/a
 
      8th Oct 2003
Thanks for you suggestions. So now my id would be 'DON' - how is this?


"Fergus Cooney" <filter-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Sender,
>
> || and everyone knows how hard it is
> || to search on newgroups (archives)
>
> Lol. Oh yes they do! Oh no they don't!!
>
> I'll admit I have it easier than Joe Public because I have a Favourite
> Link set up for me but it is very easy to search Google Groups for stuff.
>
> Go to Google.
> Click on Google Groups.
> Type this into the box:
> contextmenu left mouse button group:*languages.vb.
>
> Your previous query is the very first one shown!!
>
>
> Here's a better tip. Don't call yourself Sender. Use something with
> imagination - SenderSplendour, for example. Now if you go into Advanced

Groups
> Search (the link is just above the box in Google Groups), you can enter

your
> name in the Author box. With your unique name you'll only get your own

posts
> reported.
>
> My other tip, but you've already picked up on that, is to use a decent
> title for your query. "Context menu & left mouse click" pretty much says

it
> all. But "Beginners question" which you had before is hard to remember

once
> it's heading into the middle distance. Also general titles like "Threading
> question" will produce loads of returns because there are lots of

questions
> about threading.
>
> So - a unique name and a unique title will help you match keywords.
>
> And using Advanced Groups Search (sort by date, too) will help you

limit
> the search to just this newsgroup and/or yourself.
>
> Here's the link that I use to get Advanced Groups Search for just this
> newsgroup, sorted by date.
>
>

http://www.google.co.uk/advanced_gro..._ugroup=*langu
> ages.vb.
>
> And here's exactly the same page but using a TinyUrl (so that it won't

be
> split like the one above)
> http://tinyurl.com/q8ks
>
> Regards,
> Fergus
>
>
>



 
Reply With Quote
 
Fergus Cooney
Guest
Posts: n/a
 
      8th Oct 2003
Hi Sender / Don,

Do a search using Don as the author as see how much turns up. Uniqueness
is harder with only three letters. Go wild! ;-)

Regards,
Fergus


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Oct 2003
* "Sender" <(E-Mail Removed)> scripsit:
> Thanks for you suggestions. So now my id would be 'DON' - how is this?


Why not use a real name?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      9th Oct 2003
"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> schrieb
> * "Sender" <(E-Mail Removed)> scripsit:
> > Thanks for you suggestions. So now my id would be 'DON' - how is
> > this?

>
> Why not use a real name?


Don't you know Don Sender? (brother of don't send)


--
Armin

 
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
left mouse click GMG Windows XP Help 2 7th Aug 2007 03:59 PM
How to map the mouse middle click to righ/left click? lichuan.nj@gmail.com Microsoft Windows 2000 3 30th Apr 2007 01:49 AM
Determine right/left mouse click on Click/DoubleClick event cmelnick Microsoft Dot NET 2 3rd Apr 2005 01:09 AM
Right Mouse Click or Left Mouse Click - Detecting Which jcrouse Microsoft VB .NET 5 4th Jul 2004 12:01 PM
ContextMenu will not close after mouse click hsuge@yahoo.com Microsoft Dot NET Framework Forms 0 11th Jul 2003 12:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:29 PM.