Form won't open anymore?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CAM

    #1

    Form won't open anymore?

    Hello,

    I am using Visual Basic.Net 2008 I have created about 3 forms working OK in
    the past, but now I doesn't work anymore. When I try to start to
    run/debugging the program it starts to open the form in a second and close
    quickly. I don't know why this is happening. I add a treeview control, but
    I don't think that is the problem. I just don't know what I did. Any tips
    will be appreciated. Thank you in advance.

    Cheers.

  • Cor Ligthert[MVP]

    #2
    Re: Form won't open anymore?

    Cam,

    Can it be that you have inserted somewhere End instead of completely End If
    or something?

    It sounds like this.

    Cor


    "CAM" <alex_martinez@ ca.rr.comwrote in message
    news:4A5859ED-FF2D-401C-8C45-731E838A7282@mi crosoft.com...
    Hello,
    >
    I am using Visual Basic.Net 2008 I have created about 3 forms working OK
    in the past, but now I doesn't work anymore. When I try to start to
    run/debugging the program it starts to open the form in a second and close
    quickly. I don't know why this is happening. I add a treeview control,
    but I don't think that is the problem. I just don't know what I did. Any
    tips will be appreciated. Thank you in advance.
    >
    Cheers.

    Comment

    • kimiraikkonen

      #3
      Re: Form won't open anymore?

      On Oct 30, 7:19 am, "CAM" <alex_marti...@ ca.rr.comwrote:
      Hello,
      >
      I am using Visual Basic.Net 2008 I have created about 3 forms working OK in
      the past, but now I doesn't  work anymore.  When I try to start to
      run/debugging the program it starts to open the form in a second and close
      quickly.  I don't know why this is happening.  I add a treeview control, but
      I don't think that is the problem.  I just don't know what I did.  Any tips
      will be appreciated.  Thank you in advance.
      >
      Cheers.
      I recommend you to check your startup form's load event. There might
      be some code that closes your form because of conditional statements,
      or another program on your system may be killing your application.

      Plus you can use a technique to catch close reason by putting in your
      FormClosing event as follows:


      Private Sub Form1_FormClosi ng(ByVal sender As Object, _
      ByVal e As System.Windows. Forms.FormClosi ngEventArgs) _
      Handles Me.FormClosing

      ' See close reason on exit
      Msgbox(e.CloseR eason.ToString)

      End Sub


      Hope this helps,

      Onur G.

      Comment

      • CAM

        #4
        Re: Form won't open anymore?

        Thanks kimiraikkonen I will look into that I appreciated the tip.


        "kimiraikko nen" <kimiraikkonen8 5@gmail.comwrot e in message
        news:4902884f-5ba4-46aa-a3d6-859bd11a2cab@s5 0g2000hsb.googl egroups.com...
        On Oct 30, 7:19 am, "CAM" <alex_marti...@ ca.rr.comwrote:
        Hello,
        >
        I am using Visual Basic.Net 2008 I have created about 3 forms working OK
        in
        the past, but now I doesn't work anymore. When I try to start to
        run/debugging the program it starts to open the form in a second and close
        quickly. I don't know why this is happening. I add a treeview control, but
        I don't think that is the problem. I just don't know what I did. Any tips
        will be appreciated. Thank you in advance.
        >
        Cheers.
        I recommend you to check your startup form's load event. There might
        be some code that closes your form because of conditional statements,
        or another program on your system may be killing your application.

        Plus you can use a technique to catch close reason by putting in your
        FormClosing event as follows:


        Private Sub Form1_FormClosi ng(ByVal sender As Object, _
        ByVal e As System.Windows. Forms.FormClosi ngEventArgs) _
        Handles Me.FormClosing

        ' See close reason on exit
        Msgbox(e.CloseR eason.ToString)

        End Sub


        Hope this helps,

        Onur G.

        Comment

        • CAM

          #5
          Re: Form won't open anymore?

          I think I may have done that. Thanks for the tip. I appreciate the help.


          "Cor Ligthert[MVP]" <Notmyfirstname @planet.nlwrote in message
          news:%23B4HBRlO JHA.3496@TK2MSF TNGP04.phx.gbl. ..
          Cam,
          >
          Can it be that you have inserted somewhere End instead of completely End
          If or something?
          >
          It sounds like this.
          >
          Cor
          >
          >
          "CAM" <alex_martinez@ ca.rr.comwrote in message
          news:4A5859ED-FF2D-401C-8C45-731E838A7282@mi crosoft.com...
          >Hello,
          >>
          >I am using Visual Basic.Net 2008 I have created about 3 forms working OK
          >in the past, but now I doesn't work anymore. When I try to start to
          >run/debugging the program it starts to open the form in a second and
          >close quickly. I don't know why this is happening. I add a treeview
          >control, but I don't think that is the problem. I just don't know what I
          >did. Any tips will be appreciated. Thank you in advance.
          >>
          >Cheers.
          >

          Comment

          • James Hahn

            #6
            Re: Form won't open anymore?

            Don't forget that you can start the debugger using Step Into (F8). That
            enables you to trace the execution from the very first command, before the
            form is shown.

            "CAM" <alex_martinez@ ca.rr.comwrote in message
            news:4A5859ED-FF2D-401C-8C45-731E838A7282@mi crosoft.com...
            Hello,
            >
            I am using Visual Basic.Net 2008 I have created about 3 forms working OK
            in the past, but now I doesn't work anymore. When I try to start to
            run/debugging the program it starts to open the form in a second and close
            quickly. I don't know why this is happening. I add a treeview control,
            but I don't think that is the problem. I just don't know what I did. Any
            tips will be appreciated. Thank you in advance.
            >
            Cheers.

            Comment

            • CAM

              #7
              Re: Form won't open anymore?

              Thanks James for the tip.

              "James Hahn" <jhahn@yahoo.co mwrote in message
              news:OUF4ObuOJH A.1148@TK2MSFTN GP05.phx.gbl...
              Don't forget that you can start the debugger using Step Into (F8). That
              enables you to trace the execution from the very first command, before the
              form is shown.
              >
              "CAM" <alex_martinez@ ca.rr.comwrote in message
              news:4A5859ED-FF2D-401C-8C45-731E838A7282@mi crosoft.com...
              >Hello,
              >>
              >I am using Visual Basic.Net 2008 I have created about 3 forms working OK
              >in the past, but now I doesn't work anymore. When I try to start to
              >run/debugging the program it starts to open the form in a second and
              >close quickly. I don't know why this is happening. I add a treeview
              >control, but I don't think that is the problem. I just don't know what I
              >did. Any tips will be appreciated. Thank you in advance.
              >>
              >Cheers.
              >

              Comment

              Working...