Click here to Skip to main content
15,915,328 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Dave Kreskowiak30-Jun-10 12:39
mveDave Kreskowiak30-Jun-10 12:39 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Andraw Tang1-Jul-10 3:32
Andraw Tang1-Jul-10 3:32 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Dave Kreskowiak1-Jul-10 3:42
mveDave Kreskowiak1-Jul-10 3:42 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Andraw Tang1-Jul-10 3:59
Andraw Tang1-Jul-10 3:59 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Andraw Tang1-Jul-10 4:03
Andraw Tang1-Jul-10 4:03 
AnswerRe: How can I detect child form close action in VB.NET 2005 Pin
William Winner30-Jun-10 9:38
William Winner30-Jun-10 9:38 
GeneralRe: How can I detect child form close action in VB.NET 2005 Pin
Andraw Tang30-Jun-10 10:11
Andraw Tang30-Jun-10 10:11 
AnswerRe: How can I detect child form close action in VB.NET 2005 [modified] Pin
Аslam Iqbal13-Jul-10 5:55
professionalАslam Iqbal13-Jul-10 5:55 
I think you'll say the following code is better solution of your problem:

VB
Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick

        Select Case e.Node.Text
            Case "Node0"
                Dim frm As New Form1
                frm.Name = "Form1"

                frm.MdiParent = Me
                'Following Conditions make single Instance of form1
                Dim OldForm = System.Windows.Forms.Application.OpenForms(frm.Name)
                If IsNothing(OldForm) Then

                    OldForm = frm
                End If

                If Not OldForm.Visible Then

                    frm.Show()
                Else

                    OldForm.Show()
                    OldForm.Focus()
                End If



            Case "Node1"
                'Not Single Instance. to make single instance add above code
                Dim frm As New Form2

                frm.Name = "Form2"

                frm.MdiParent = Me
                frm.Show()
            Case Else

                MsgBox("None")
        End Select

    End Sub

Use <pre lang="vb"> Visual Basic Code Here.</pre>



QuestionCommunication via Serial Port on PPC Pin
Dominick Marciano29-Jun-10 15:13
professionalDominick Marciano29-Jun-10 15:13 
AnswerRe: Communication via Serial Port on PPC Pin
tiggerc1-Jul-10 5:04
tiggerc1-Jul-10 5:04 
GeneralRe: Communication via Serial Port on PPC Pin
Dominick Marciano1-Jul-10 13:11
professionalDominick Marciano1-Jul-10 13:11 
GeneralRe: Communication via Serial Port on PPC Pin
tiggerc2-Jul-10 3:57
tiggerc2-Jul-10 3:57 
QuestionHow can I trace an AddIn's startup error? Pin
Sonhospa29-Jun-10 13:01
Sonhospa29-Jun-10 13:01 
AnswerRe: How can I trace an AddIn's startup error? Pin
Luc Pattyn29-Jun-10 13:15
sitebuilderLuc Pattyn29-Jun-10 13:15 
NewsRe: How can I trace an AddIn's startup error? Pin
Sonhospa30-Jun-10 0:01
Sonhospa30-Jun-10 0:01 
GeneralRe: How can I trace an AddIn's startup error? Pin
Dave Kreskowiak30-Jun-10 1:35
mveDave Kreskowiak30-Jun-10 1:35 
GeneralRe: How can I trace an AddIn's startup error? Pin
Sonhospa30-Jun-10 3:07
Sonhospa30-Jun-10 3:07 
GeneralRe: How can I trace an AddIn's startup error? Pin
Dave Kreskowiak30-Jun-10 3:27
mveDave Kreskowiak30-Jun-10 3:27 
GeneralRe: How can I trace an AddIn's startup error? Pin
Sonhospa30-Jun-10 6:26
Sonhospa30-Jun-10 6:26 
GeneralRe: How can I trace an AddIn's startup error? Pin
Luc Pattyn30-Jun-10 7:03
sitebuilderLuc Pattyn30-Jun-10 7:03 
GeneralRe: How can I trace an AddIn's startup error? Pin
Dave Kreskowiak30-Jun-10 7:13
mveDave Kreskowiak30-Jun-10 7:13 
QuestionDatagridview and Bindingsource Pin
Nielvh29-Jun-10 1:48
Nielvh29-Jun-10 1:48 
AnswerRe: Datagridview and Bindingsource Pin
DaveAuld29-Jun-10 2:05
professionalDaveAuld29-Jun-10 2:05 
GeneralRe: Datagridview and Bindingsource Pin
Nielvh29-Jun-10 3:14
Nielvh29-Jun-10 3:14 
GeneralRe: Datagridview and Bindingsource [modified] Pin
DaveAuld29-Jun-10 3:28
professionalDaveAuld29-Jun-10 3:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.