473,320 Members | 2,083 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,320 software developers and data experts.

Treeview to behave as a MENU

Hello everyone. My name is Iggie.
I'm new in vb.net and having a hard time trying to figure out how to
accomplish this.

I'm trying to use a treeview as menu. How can i tell the treeview to show
myForm when the user clicks MenuOpt1 or 2, ect. Any suggestions....

Thanks . . .

Menu1
Menu1Opt1
Menu1Opt2
Menu2
Menu2Opt1
Menu2Opt2
Thanks . . .
--
"Many of Life's failures are men who did not
realize how close they were to success when
they give up"
Thomas Edison.
Nov 21 '05 #1
1 937
You should write code in the Treeview's AfterSelect event..

Private Sub TreeView1_AfterSelect(ByVal sender as Object, ByVal e As
System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect

' e.Node - gives the current node that is selected or clicked..

End Sub
VJ

"Ignacio Silva, Jr." <si**********@hotmail.com> wrote in message
news:OS**************@TK2MSFTNGP14.phx.gbl...
Hello everyone. My name is Iggie.
I'm new in vb.net and having a hard time trying to figure out how to
accomplish this.

I'm trying to use a treeview as menu. How can i tell the treeview to
show
myForm when the user clicks MenuOpt1 or 2, ect. Any suggestions....

Thanks . . .

Menu1
Menu1Opt1
Menu1Opt2
Menu2
Menu2Opt1
Menu2Opt2
Thanks . . .
--
"Many of Life's failures are men who did not
realize how close they were to success when
they give up"
Thomas Edison.

Nov 21 '05 #2

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

Similar topics

3
by: Steve | last post by:
Visual Studio 2003 .NET / C# I have a treeview object on a form which acts as the main menu controller for my application. the treeview is always in sight, and the form it is on acts as the...
4
by: Aaron Queenan | last post by:
How can I use the designer to add a context menu to a class which inherits from a control, e.g. treeview, without adding the context menu to a form? For example, to add a context menu with...
1
by: Shailendra Batham | last post by:
Hey guys I am using the IE Web controls treeview control. I popuplate the treeview with XML and it looks fine........... my question is how can I add a right click popup menu to the treeview...
3
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%""...
2
by: Bernie Yaeger | last post by:
I have an mdi app that has a main menu on the parent form. I would like to use a treeview in place of one of the menu options, so that instead of a menu option - say, 'reports' - it would have...
4
by: Andrew Robinson | last post by:
I am using a TreeView to perform navigation and have a few nodes that need to generate a popup menu. For this, I use the SelectedNodeChanged event and then add the relevant "window.open" script to...
3
by: Franky | last post by:
Been having a problem using a treeview. Work great the first time the form containing it is entered but not the second time. Took a while to create a small sample that exhibits the problem, but...
0
by: noneya22 | last post by:
I want to use a TreeView control as a one-level, vertical navigation menu. I'm using this control currently with a SiteMapDataSource and .sitemap file. I've written code that associates an image...
1
by: Mike | last post by:
Here is my scenario. I just took over an existing asp site that is using a treeview menu on the pages. The treeview is an include file that is an include that is on every page. The issue is, when...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.