contextmenu & left mouse click

  • Thread starter Thread starter Sender
  • Start date Start date
S

Sender

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!
 
* "Sender said:
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
///
 
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.
 
worked very well. thx.


Herfried K. Wagner said:
\\\
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
 
Sender said:
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).
 
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_group_search?hl=en&scoring=d&as_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
 
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
 
Back
Top