Can I make my Form visible during a debug session?

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

    #1

    Can I make my Form visible during a debug session?

    One of the things I have always missed from VB6 days is that whilst I am
    debugging code which writes to my form, I could always task switch to the
    form and see the results as I went. With VB.Net you just get an hour glass
    over a completely blank screen. I was hoping the VB 2005 would be better but
    it isn't. Why is this? Why can't it be like it was in VB6 days?

    -Jerry


  • Chris

    #2
    Re: Can I make my Form visible during a debug session?

    Jerry Spence1 wrote:
    One of the things I have always missed from VB6 days is that whilst I am
    debugging code which writes to my form, I could always task switch to the
    form and see the results as I went. With VB.Net you just get an hour glass
    over a completely blank screen. I was hoping the VB 2005 would be better but
    it isn't. Why is this? Why can't it be like it was in VB6 days?
    >
    -Jerry
    >
    >
    You can not see the screen because since you are in debug mode and the
    code has stopped the program can not run the Paint code.

    Chris

    Comment

    • Jerry Spence1

      #3
      Re: Can I make my Form visible during a debug session?

      So why did it work in VB6? What is different?

      -Jerry

      "Chris" <no@spam.comwro te in message
      news:%23TesBjCq GHA.3700@TK2MSF TNGP05.phx.gbl. ..
      Jerry Spence1 wrote:
      >One of the things I have always missed from VB6 days is that whilst I am
      >debugging code which writes to my form, I could always task switch to the
      >form and see the results as I went. With VB.Net you just get an hour
      >glass over a completely blank screen. I was hoping the VB 2005 would be
      >better but it isn't. Why is this? Why can't it be like it was in VB6
      >days?
      >>
      >-Jerry
      >
      You can not see the screen because since you are in debug mode and the
      code has stopped the program can not run the Paint code.
      >
      Chris

      Comment

      • Chris

        #4
        Re: Can I make my Form visible during a debug session?

        Jerry Spence1 wrote:
        So why did it work in VB6? What is different?
        >
        -Jerry
        >
        "Chris" <no@spam.comwro te in message
        news:%23TesBjCq GHA.3700@TK2MSF TNGP05.phx.gbl. ..
        >Jerry Spence1 wrote:
        >>One of the things I have always missed from VB6 days is that whilst I am
        >>debugging code which writes to my form, I could always task switch to the
        >>form and see the results as I went. With VB.Net you just get an hour
        >>glass over a completely blank screen. I was hoping the VB 2005 would be
        >>better but it isn't. Why is this? Why can't it be like it was in VB6
        >>days?
        >>>
        >>-Jerry
        >You can not see the screen because since you are in debug mode and the
        >code has stopped the program can not run the Paint code.
        >>
        >Chris
        >
        >

        VB6 didn't allow you to do painting yourself. You can override the
        onpaint event or override the paint method and do whatever you want in
        them. In vb6 you didn't have this control, so the system would still
        run the paint events even if debug. Now your thread that is stopped
        can't run the painting.

        chris

        Comment

        • Jerry Spence1

          #5
          Re: Can I make my Form visible during a debug session?


          "Chris" <no@spam.comwro te in message
          news:eEOw9MGqGH A.4996@TK2MSFTN GP05.phx.gbl...
          Jerry Spence1 wrote:
          >So why did it work in VB6? What is different?
          >>
          >-Jerry
          >>
          >"Chris" <no@spam.comwro te in message
          >news:%23TesBjC qGHA.3700@TK2MS FTNGP05.phx.gbl ...
          >>Jerry Spence1 wrote:
          >>>One of the things I have always missed from VB6 days is that whilst I
          >>>am debugging code which writes to my form, I could always task switch
          >>>to the form and see the results as I went. With VB.Net you just get an
          >>>hour glass over a completely blank screen. I was hoping the VB 2005
          >>>would be better but it isn't. Why is this? Why can't it be like it was
          >>>in VB6 days?
          >>>>
          >>>-Jerry
          >>You can not see the screen because since you are in debug mode and the
          >>code has stopped the program can not run the Paint code.
          >>>
          >>Chris
          >>
          >>
          >
          >
          VB6 didn't allow you to do painting yourself. You can override the
          onpaint event or override the paint method and do whatever you want in
          them. In vb6 you didn't have this control, so the system would still run
          the paint events even if debug. Now your thread that is stopped can't run
          the painting.
          >
          chris
          Chris
          >You can override the onpaint event or override the paint method and do
          >whatever you want in them
          So can I make it behave as it did in the VB6 days?

          -Jerry


          Comment

          • Greg

            #6
            Re: Can I make my Form visible during a debug session?

            "Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
            news:44b8f5a6$0 $69355$ed2619ec @ptn-nntp-reader01.plus.n et...
            One of the things I have always missed from VB6 days is that whilst I am
            debugging code which writes to my form, I could always task switch to the
            form and see the results as I went. With VB.Net you just get an hour glass
            over a completely blank screen. I was hoping the VB 2005 would be better
            but it isn't. Why is this? Why can't it be like it was in VB6 days?
            >
            -Jerry
            If you've stopped the code via a breakpoint then resize your code form and
            the exe form so that they both appear on your screen at the same time
            without overlapping. Your exe form will be blank. In the code form, type
            application.doe vents() in the Immediate Window. Hey presto! Your exe form is
            now populated.

            If your code is running and the exe form is blank then just add
            application.doe vents() statements to your code after anything that changes
            the exe form's appearance.

            Cheers,
            Greg.


            Comment

            • Jerry Spence1

              #7
              Re: Can I make my Form visible during a debug session?


              "Greg" <Greg@no-reply.okwrote in message
              news:e9f8iv$am6 $1@mws-stat-syd.cdn.telstra .com.au...
              "Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
              news:44b8f5a6$0 $69355$ed2619ec @ptn-nntp-reader01.plus.n et...
              >One of the things I have always missed from VB6 days is that whilst I am
              >debugging code which writes to my form, I could always task switch to the
              >form and see the results as I went. With VB.Net you just get an hour
              >glass over a completely blank screen. I was hoping the VB 2005 would be
              >better but it isn't. Why is this? Why can't it be like it was in VB6
              >days?
              >>
              >-Jerry
              >
              If you've stopped the code via a breakpoint then resize your code form and
              the exe form so that they both appear on your screen at the same time
              without overlapping. Your exe form will be blank. In the code form, type
              application.doe vents() in the Immediate Window. Hey presto! Your exe form
              is now populated.
              >
              If your code is running and the exe form is blank then just add
              application.doe vents() statements to your code after anything that changes
              the exe form's appearance.
              >
              Cheers,
              Greg.
              When type 'application.do events' in the immediate window I get
              'DoEvents' is not a member of 'MyApplication'

              and yet the strange thing is that I can use it in my program code OK.

              -Jerry




              Comment

              • Greg

                #8
                Re: Can I make my Form visible during a debug session?

                "Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
                news:44bb375b$0 $22089$ed2619ec @ptn-nntp-reader01.plus.n et...
                >
                "Greg" <Greg@no-reply.okwrote in message
                news:e9f8iv$am6 $1@mws-stat-syd.cdn.telstra .com.au...
                >"Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
                >news:44b8f5a6$ 0$69355$ed2619e c@ptn-nntp-reader01.plus.n et...
                >>One of the things I have always missed from VB6 days is that whilst I am
                >>debugging code which writes to my form, I could always task switch to
                >>the form and see the results as I went. With VB.Net you just get an hour
                >>glass over a completely blank screen. I was hoping the VB 2005 would be
                >>better but it isn't. Why is this? Why can't it be like it was in VB6
                >>days?
                >>>
                >>-Jerry
                >>
                >If you've stopped the code via a breakpoint then resize your code form
                >and the exe form so that they both appear on your screen at the same time
                >without overlapping. Your exe form will be blank. In the code form, type
                >application.do events() in the Immediate Window. Hey presto! Your exe form
                >is now populated.
                >>
                >If your code is running and the exe form is blank then just add
                >application.do events() statements to your code after anything that
                >changes the exe form's appearance.
                >>
                >Cheers,
                >Greg.
                >
                When type 'application.do events' in the immediate window I get
                'DoEvents' is not a member of 'MyApplication'
                >
                and yet the strange thing is that I can use it in my program code OK.
                >
                -Jerry
                Are you including the parentheses?
                Works fine for me.Try the full path:
                System.Windows. Forms.Applicati on.DoEvents()

                Cheers,
                Greg


                Comment

                • Jerry Spence1

                  #9
                  Re: Can I make my Form visible during a debug session?


                  "Greg" <Greg@no-reply.okwrote in message
                  news:e9h5pg$317 $1@mws-stat-syd.cdn.telstra .com.au...
                  "Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
                  news:44bb375b$0 $22089$ed2619ec @ptn-nntp-reader01.plus.n et...
                  >>
                  >"Greg" <Greg@no-reply.okwrote in message
                  >news:e9f8iv$am 6$1@mws-stat-syd.cdn.telstra .com.au...
                  >>"Jerry Spence1" <jerry.spence@s omewhere.comwro te in message
                  >>news:44b8f5a6 $0$69355$ed2619 ec@ptn-nntp-reader01.plus.n et...
                  >>>One of the things I have always missed from VB6 days is that whilst I
                  >>>am debugging code which writes to my form, I could always task switch
                  >>>to the form and see the results as I went. With VB.Net you just get an
                  >>>hour glass over a completely blank screen. I was hoping the VB 2005
                  >>>would be better but it isn't. Why is this? Why can't it be like it was
                  >>>in VB6 days?
                  >>>>
                  >>>-Jerry
                  >>>
                  >>If you've stopped the code via a breakpoint then resize your code form
                  >>and the exe form so that they both appear on your screen at the same
                  >>time without overlapping. Your exe form will be blank. In the code form,
                  >>type application.doe vents() in the Immediate Window. Hey presto! Your
                  >>exe form is now populated.
                  >>>
                  >>If your code is running and the exe form is blank then just add
                  >>application.d oevents() statements to your code after anything that
                  >>changes the exe form's appearance.
                  >>>
                  >>Cheers,
                  >>Greg.
                  >>
                  >When type 'application.do events' in the immediate window I get
                  >'DoEvents' is not a member of 'MyApplication'
                  >>
                  >and yet the strange thing is that I can use it in my program code OK.
                  >>
                  >-Jerry
                  >
                  Are you including the parentheses?
                  Works fine for me.Try the full path:
                  System.Windows. Forms.Applicati on.DoEvents()
                  >
                  Cheers,
                  Greg
                  If I include System.Windows. Forms.Applicati on.DoEvents() then, yes it does
                  take it OK. However, now I can't get to the form at all! (I'm using VB2005
                  BTW)

                  -Jerry


                  Comment

                  Working...