Can I make my Form visible during a debug session?

  • Thread starter Thread starter Jerry Spence1
  • Start date Start date
J

Jerry Spence1

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
 
Jerry said:
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
 
Jerry said:
So why did it work in VB6? What is different?

-Jerry


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 said:
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
 
Jerry Spence1 said:
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.doevents() 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.doevents() statements to your code after anything that changes
the exe form's appearance.

Cheers,
Greg.
 
Greg said:
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.doevents() 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.doevents() statements to your code after anything that changes
the exe form's appearance.

Cheers,
Greg.

When type 'application.doevents' 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
 
Jerry Spence1 said:
When type 'application.doevents' 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.Application.DoEvents()

Cheers,
Greg
 
Greg said:
Are you including the parentheses?
Works fine for me.Try the full path:
System.Windows.Forms.Application.DoEvents()

Cheers,
Greg
If I include System.Windows.Forms.Application.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
 
Back
Top