Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 22nd, 2003, 05:08 PM
Registered User
 
Join Date: Sep 2003
Location: Santa Monica, CA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jbacha
Default how do I launch a form from treeview in VB.net

I need to launch a form from a treeview
I have designed my treeview
I click on one of the nodes to generate the selected event
how do I find wich node I clicked to run a module.
I tried declaring varible as TreeNode
 event code
sub treeview1_selected()

dim firstNode as TreeNode
dim selectNode as TreeNode
selectNode = me.treeview1.SelectedNode
firstNode=????
if selectNode = firstNode then
    launchForm()
end if
I appreciate any help

Reply With Quote
  #2 (permalink)  
Old October 22nd, 2003, 06:39 PM
Registered User
 
Join Date: Sep 2003
Location: Santa Monica, CA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jbacha
Default

I think i found the answer
use the index property of the treenode.

dim a as treenode = e.node
 if a.index =1 then...



Reply With Quote
  #3 (permalink)  
Old October 23rd, 2003, 10:39 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

better, read the key from the tree.selectedimage.key and do a select case to know wich form you have to launch....

HTH...

Gonzalo Bianchi
Reply With Quote
  #4 (permalink)  
Old October 23rd, 2003, 06:20 PM
Registered User
 
Join Date: Sep 2003
Location: Santa Monica, CA, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jbacha
Default

how do i figure the node index
when there are multiple roots or child root nodes?

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set a form as startup form in vb.net 2.0 mallikalapati .NET Framework 2.0 1 February 21st, 2008 09:19 AM
Migration of treeview from VB6 to VB.NET karveajit General .NET 0 March 27th, 2007 01:34 AM
Migration of Treeview from VB6 to VB.NET karveajit ASP.NET 1.0 and 1.1 Professional 0 March 27th, 2007 01:25 AM
Why does it take so long to launch a VS.NET app? panuvin General .NET 0 December 14th, 2006 07:27 PM
Urgent VB form Migration to VB.net form kvenkat_2k1 Pro VB.NET 2002/2003 1 December 7th, 2005 04:58 PM



All times are GMT -4. The time now is 05:59 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.