Home All Groups Group Topic Archive Search About

Can I make my Form visible during a debug session?

Author
15 Jul 2006 2:03 PM
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

Author
15 Jul 2006 4:07 PM
Chris
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
Author
15 Jul 2006 10:00 PM
Jerry Spence1
So why did it work in VB6? What is different?

-Jerry

Show quoteHide quote
"Chris" <no@spam.com> wrote in message
news:%23TesBjCqGHA.3700@TK2MSFTNGP05.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
Author
15 Jul 2006 11:05 PM
Chris
Jerry Spence1 wrote:
Show quoteHide quote
> So why did it work in VB6? What is different?
>
> -Jerry
>
> "Chris" <no@spam.com> wrote in message
> news:%23TesBjCqGHA.3700@TK2MSFTNGP05.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
Author
16 Jul 2006 8:51 AM
Jerry Spence1
Show quote Hide quote
"Chris" <no@spam.com> wrote in message
news:eEOw9MGqGHA.4996@TK2MSFTNGP05.phx.gbl...
> Jerry Spence1 wrote:
>> So why did it work in VB6? What is different?
>>
>> -Jerry
>>
>> "Chris" <no@spam.com> wrote in message
>> news:%23TesBjCqGHA.3700@TK2MSFTNGP05.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
Author
17 Jul 2006 5:52 AM
Greg
"Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
news:44b8f5a6$0$69355$ed2619ec@ptn-nntp-reader01.plus.net...
> 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.
Author
17 Jul 2006 7:08 AM
Jerry Spence1
Show quote Hide quote
"Greg" <G***@no-reply.ok> wrote in message
news:e9f8iv$am6$1@mws-stat-syd.cdn.telstra.com.au...
> "Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
> news:44b8f5a6$0$69355$ed2619ec@ptn-nntp-reader01.plus.net...
>> 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.

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
Author
17 Jul 2006 11:17 PM
Greg
Show quote Hide quote
"Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
news:44bb375b$0$22089$ed2619ec@ptn-nntp-reader01.plus.net...
>
> "Greg" <G***@no-reply.ok> wrote in message
> news:e9f8iv$am6$1@mws-stat-syd.cdn.telstra.com.au...
>> "Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
>> news:44b8f5a6$0$69355$ed2619ec@ptn-nntp-reader01.plus.net...
>>> 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.
>
> 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
Author
20 Jul 2006 7:25 AM
Jerry Spence1
Show quote Hide quote
"Greg" <G***@no-reply.ok> wrote in message
news:e9h5pg$317$1@mws-stat-syd.cdn.telstra.com.au...
> "Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
> news:44bb375b$0$22089$ed2619ec@ptn-nntp-reader01.plus.net...
>>
>> "Greg" <G***@no-reply.ok> wrote in message
>> news:e9f8iv$am6$1@mws-stat-syd.cdn.telstra.com.au...
>>> "Jerry Spence1" <jerry.spe***@somewhere.com> wrote in message
>>> news:44b8f5a6$0$69355$ed2619ec@ptn-nntp-reader01.plus.net...
>>>> 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.
>>
>> 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
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