473,327 Members | 1,936 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,327 software developers and data experts.

mainMenu click

Hi i create some mainItem with code with this method :
AddHandler menuItem.Click, essai_Click

As the menuItem is add with code... with a dataReader from a dataBase
like :
Name1
Name2
Name3

i need to know what name is click in my method !!!

How i can know what index or what text is click in my menuItem ????

Thx a lot

Nov 21 '05 #1
1 1154
Usecase.

Probably three hours ago I would have given you another answer. However
thanks to Herfried who showed this for a button.

\\\
Dim SourceControl As MenuItem = DirectCast(sender, MenuItem)
Select Case True
Case SourceControl Is Me.MenuItem1
'do whatever
Case SourceControl Is Me.MenuItem2
'do something else
End Select
///
I hope this helps,

Cor
Nov 21 '05 #2

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

Similar topics

12
by: yoshimitsu | last post by:
Hi, I have decided to use a MainMenu in my main form. I have a menu item "Open Form". When this item is clicked I want the "newform.frm" to open just below the menu in the main form. How can this...
2
by: Anand Ganesh | last post by:
Hi All, I am trying to create a control - .dll file. In the toolbox the MainMenu tool is disabled. What should I do to invoke it? Why is it disbaled?
3
by: bardo | last post by:
I am running into the following problem would like to know if this a bug or me doing something wrong. Using C# with visual studios 2003. I make a form and add a mainMenu Control. Now I type in...
0
by: ucasesoftware | last post by:
In my mainMenu i have items Copy, cut, paste... I have a form with a lot of textbox In my sub of item copy i have : SendKeys.Send("^c") but if the user select a text in a textbox... click...
5
by: Mitchell Vincent | last post by:
A picture says a thousand words, so here are 2! Design Time: http://www.ksoftware.net/examples/Clip1.jpg Run Time: http://www.ksoftware.net/examples/Clip2.jpg The problems started when I...
2
by: polocar | last post by:
Hi, I'm writing a program using Visual C# 2005 Professional Edition, and I was trying to assign multiple MainMenu objects (one by one, of course) to the same Form (let's suppose 2 MainMenu...
0
by: genojoe | last post by:
Included below are four methods and a Friend that can be inserted directly into a form that already contains Button1, Button2, and MenuStrip1. Button1 populates the MainMenu control, button2...
1
by: Benson | last post by:
I have a MainMenu (MenuStrip) which will be loaded (dynamic by codes) after the program Login form. The first time run is ok. But when I close the MainMenu and go back to Login form, and then go to...
2
by: Academia | last post by:
In an old project I still use MainMenu and ContexMenu. How can I get them to appear in my Toolbox? Thanks
0
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
Whenever I launch an MDI Child, I can add items to the MDI Parent's MainMenu easy enough, but how do I call them from the MDI Child? In the Parent, private void miPrint_Click(object sender,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.