Click to See Complete Forum and Search --> : VB Debugging


Trenchcoat
April 6th, 2001, 02:50 AM
Hi there!

The VB debugger always stops when a new formn is shown. How can I change this?

Thank you in advance for any help!

--------------------------------------------------
Visit our new forum: www.maxcode.com
Feel free to contact me via ICQ# 82806695

Cimperiali
April 9th, 2001, 03:56 AM
What do you mean? Are you debugging a project in ide with breakpoints on source code? To be sure it stops, make a simple project with only a textbox and a timer (interval 2 seconds). In form load event wtite:
Text1.text = "myText"
timer1.enabled = true
in timer event write:

timer1.enabled = false
text1.text = "change text"

Put a breakpoint only, on this statement.
Run the project pressing F5.
Does your project break in load event or in timer event?
Hope this help.


Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.

Cimperiali
April 9th, 2001, 03:58 AM
Whoops... sorry: on a new form displayed! Are you using modal forms?

Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.

Trenchcoat
April 9th, 2001, 04:00 AM
Yes..

Form1.Show vbModal


--------------------------------------------------
Visit our new forum: www.maxcode.com
Feel free to contact me via ICQ# 82806695

Cimperiali
April 9th, 2001, 07:07 AM
When you use a modal form, code in form that calls it stops, until the modal form is closed. Make a try with simple example I post you before, but try it with two istances of same form, first called in non-modal and second in modal way, just to see.
ie:
have two forms: form1 with a commandbutton, form2 with a timer and a textbox
command1 code:
dim f1 as new form2
'comment out one line of the following to make a try
'then comment out the other for next try
f1.show 'non modal calling
f1.show vbmodal 'modal calling

put a breakpoint only in form2 timer event and then look what happens
Best regards,
Cesare Imperiali

Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.