Solved

This may seam like a dum question: im trying to learn vb.net and i dont know how to do menus it used to be select case index,case 1 etc

Posted on 2004-09-25
6
146 Views
Last Modified: 2010-04-23
im trying to learn vb.net and cant seam to understand how a menu works


it used to be select index
case 1' text
'do work for textselected menu option
case 2 'excel
'do work for excel selected menu option
end select

i dont understand how to do it now..(man its hard for a basic coder to understand all this jumbo)it like learning chinnese(no offence)

dang really confuzzled
Johnny
aka Pern
0
Comment
Question by:Johnny
6 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 300 total points
ID: 12153226
Add menu and write your code under menu click event

    Private Sub Mymenu_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Mymenu.Click

        TextBox1.Text = "Menu is clicked"

    End Sub
0
 

Author Comment

by:Johnny
ID: 12153242
what about multi tiered menus like


tools
.. inport
.. export
....text
....excel

i dont understand how to get the area for text and excel as its a submenu of export and tools

??????
thx
0
 
LVL 28

Expert Comment

by:iboutchkine
ID: 12153254
Add menu to the form and you will see how to do menu and submenu
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 5

Assisted Solution

by:tzxie2000
tzxie2000 earned 50 total points
ID: 12153938
put a mainmenu or contextmenu on the form
add menuitem to it
double-click the item and then you can write code like

 Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
......
    End Sub

VB.Net set each menuitem as an component(object) and the mainmenu as container
so we can write event for menuitem
the full action is doing by event process know as button click event
0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 150 total points
ID: 12155008
Each menuitem has its own Click event (unless you handle them all with the same method). You can add code to each menu item click event.
0
 

Author Comment

by:Johnny
ID: 12155134
emoreau explaned it best,

tzxie2000 gave insight

and iboutchkine i didnt understand till others piped in but had answered the question

thanks i didnt make a menu past one item so i never saw the way it made them.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now