473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

contextmenu & left mouse click

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!

Nov 20 '05 #1
10 8722
* "Sender" <us**@domain.com> 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>
Nov 20 '05 #2
worked very well. thx.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Sender" <us**@domain.com> 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>

Nov 20 '05 #3
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" <us**@domain.com> wrote in message
news:Or**************@TK2MSFTNGP10.phx.gbl...
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!


Nov 20 '05 #4
"Sender" <us**@domain.com> 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

Nov 20 '05 #5
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

Nov 20 '05 #6
Thanks for you suggestions. So now my id would be 'DON' - how is this?
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uL*************@TK2MSFTNGP10.phx.gbl...
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

Nov 20 '05 #7
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
Nov 20 '05 #8
* "Sender" <us**@domain.com> 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>
Nov 20 '05 #9
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
* "Sender" <us**@domain.com> 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

Nov 20 '05 #10
* "Armin Zingler" <az*******@freenet.de> scripsit:
* "Sender" <us**@domain.com> 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)


ROFL

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

52
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable...
1
by: Ryan Stewart | last post by:
If you don't want to read this post because of its length, I understand. I've spent two and a half days on this problem and have a good deal of information to relate. And this is kind of a long...
1
by: Alexandre Jaquet | last post by:
Hi, I would like to copy and paste a selected item on a web page I already 've a context menu when the user rigth click on an item. I would like to draw a rectangle who carry about current...
0
by: MD | last post by:
I have a ContextMenu that is assigned to 3 RichTextBox's (i.e., if you right-click on any of the 3 RichTextBox's, you get the same ContextMenu). My ContextMenu has 2 items, each of which have their...
0
by: Valerie Hough | last post by:
I have two different cases: 0) I right click the mouse button on a list box on my form, then in the Popup handler for the list box I use SendKeys to send three characters at once (the mnemonics...
3
by: Glen | last post by:
Can anyone tell me if there is a workable method to get the mouse cursor position on the screen or the NotifyIcon position? I need to display a context menu for the NotifyIcon when clicked and I'd...
7
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To...
0
by: Ahmad Jalil Qarshi | last post by:
Hi! I have a NotifyIcon and a ContextMenu attached to it. What I want is to show the ContextMenu when the mouse pointer is over the NotifyIcon and hide the contextMenu when the Mouse pointer...
1
by: [EVA-02]Tseng | last post by:
Hi, got a problem with Contextmenu. I got a ListView and want to have the ContextMenu only shown when the user rightclicks an Element in the Listview. If ther is no element under the mouse cursor...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.