User Profile

Collapse

Profile Sidebar

Collapse
Jeff G
Jeff G
Last Activity: Nov 21 '07, 07:59 PM
Joined: Sep 15 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Jeff G
    replied to Use a variable name as a control
    Thanks,

    This is starting to make some sense to me.

    You idea should let me accomplish what I'm trying to do.
    See more | Go to post

    Leave a comment:


  • Jeff G
    replied to Use a variable name as a control
    I think my example might have been too simple and I did not explain enough.

    I have a tabControl with a treeView on each tab.
    Each tree will have a name like treeXXXXX (see names() in code sample). There is a data file for each tree with the same name as the tree.
    I will read a text file for each tree to get the data to populate the trees.
    The code is more like this: (I am new to VB. I realize my read & loop code...
    See more | Go to post

    Leave a comment:


  • Jeff G
    started a topic Use a variable name as a control

    Use a variable name as a control

    Hi,
    How can I use a variable as a control name?
    I'll try to make sample code very simple.

    Code:
     names(1)='treeOrders'
    names(2)='treeProducts'
    names(3)='treeInvoices'
     
    for i = 1 to 3 
    	tv='frmMainMenu' & names(i)
    	tv.node.add='abc'
    	tv.node.add='123'
    next i
    My problem is that I do not know how to make "tv" a valid control.
    See more | Go to post

  • Jeff G
    replied to How to capture all double clicks
    Got it!

    The problem was needing to loop through all controls at every level.

    Thanks for all the help.
    See more | Go to post

    Leave a comment:


  • Jeff G
    replied to How to capture all double clicks
    Everything I've read says AddHandler is the answer, BUT I still can not get it to work. Here is what I have so far:

    Code:
     
    Private Sub frmMainMenu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    	 Dim ctrl As Control 
    	 For Each ctrl In Me.Controls
    		 AddHandler ctrl.DoubleClick, AddressOf AnyTree_DoubleClick
    	 Next
    End Sub
     
    Public Sub AnyTree_DoubleClick(ByVal
    ...
    See more | Go to post

    Leave a comment:


  • I think it would also depend on your mail server. I maintain a server that keeps a copy of ALL incoming and outgoing mail.

    So even if you can not get it, the admin probably can!
    See more | Go to post

    Leave a comment:


  • Jeff G
    replied to How to capture all double clicks
    OK. I've gotten almost all of it figured out. (It only took the repsonses from this forum, about 3 hours of Google searches and 100 websites!)

    Just one more question on this subject.

    Here is my sample code.

    Code:
     
     
    Private Sub AnyTree_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TreeView1.DoubleClick, TreeView2.DoubleClick, TreeView3.DoubleClick
    	 Dim b As
    ...
    See more | Go to post

    Leave a comment:


  • Jeff G
    replied to How to capture all double clicks
    Thanks for the 2 replys.
    I am not sure if I fully understand the control array issue but, the link got me in the right direction. From the article I got this:

    Code:
     
    Private Sub AnyTree_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView1.DoubleClick, TreeView2.DoubleClick, TreeView3.DoubleClick
    	Dim drQuit As DialogResult 
    	drQuit = MessageBox.Show(TreeView1.SelectedNode.Tag, TreeView1.SelectedNode.Text,
    ...
    See more | Go to post

    Leave a comment:


  • Jeff G
    replied to How to capture all double clicks
    Thanks for the quick reply, but thats not the part I have a problem with.

    I'll try to clarify what I meant.

    I have 10 treeViews with 20 nodes (or more) on each.
    Each tree is named "treeXXXX" where XXXX is different for each.

    I don't want to write the same event for each node.
    I would like to write just one event that responds to a double click on any tree on the form and returns...
    See more | Go to post

    Leave a comment:


  • Jeff G
    started a topic How to capture all double clicks

    How to capture all double clicks

    Hi. I am very new to VB. Using VB 2005.

    I have worked for 25 years with procedural progamming, but never object or event driven.

    I have a form with a tab control and 10 tabs. Each tab has a tree. Each branch of the tree is a menu selection. The parameter for a generic subroutine is contained in the node tag.

    I would like to capture ANY double click from ANY tree with a single piece of code.
    Something...
    See more | Go to post
No activity results to display
Show More
Working...