query about adding menu items

  • From: sameer manohtra <sameermanohtra@xxxxxxxxx>
  • To: programmingblind <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 24 Jun 2009 14:50:03 +0530

Guys, you all are fantastic, believe me, you all are great people.
Thanks to everyone who have  landed their hand of help for this
imprudent person.
I can now make a better UI, and I’m sure now, that after a bit of
practice, I will be able to improve it even further.
I can now work efficiently without listening that daunting
notification of “news channel not available”.
No words to express, but just honest feeling of gratitude and appreciation.
Ok, now my next doubt, as I have confirmed in my first post, that
silly looking doubts will keep coming.
While learning Vb.net, we have now moved on to how to add menu items on a form.
my cited counterparts have already completed the same, but I’m lacking a bit.
Here is what the procedure I’ve taken, and then what is the actual problem.
On my form, I have invoked toolbar by alt+control+x.
I have scroll upto menu strip toolbox item, and pressed enter.
I have reach to menuStrip item by pressing tab, and then one more tab
to enter the menu item name as I have been told.
Here, I have pressed enter and in the editBox appeared, typed the name
of menu, I.E.  file.
I have executed the program, and the file menu was there.
then I’ve stopped the program, and gone  to the same editBox and press
one more enter, and here I have entered the name of file menu item
I.E. new.
Press enter, and when executed, it was also there.
Now comes the doubt:
Even though I am able to add the items in the menu bar and their
dropdowns, but found myself unable in adding  some coding in it that
if some click that item, something should happen.
For example, let’s say, I have an item call close in the file menu. I
want, that if user clicks that, the application should close.
I know that we can write
Form1.Close
But, where to write it to make the functionality available for a menu
item call close?
I’ve tried pressing f7 for code window, but did not get the actual
place, as there was just declaration of form1 and below menuStrip.
Could not find any item call close  what I have defined and viewed in
program as well.
So, how to  perform the above mentioned operation?
Your help is highly awaited, I know some one of you will surely help me out.
With deep regards,
Sameer manohtra.
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: