CTRL+Break does not stop code on message box in VB6

I've been programming in VB6 for years...but I switched to a Latitude D620 laptop. Now for some reason when I'm programming in the VB6 IDE, have a message box appear, then press CTRL+BREAK on my keyboard, the message box disappears but the code does not break in VB6 like it used to.

I tried the Microsoft on-screen keyboard (command line = 'osk'), but it had the same affect.

HELP!!!
bitoboyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BrianVSoftCommented:
VB has never handled stepping and 'Ctrl+Break' well when a modal was involved..
(and Message box modals are one of the worst offenders)
Over 10 years and many PCs, I have seen dozens of truly weird situations.
I don't think there is anything particular about the DELL D620 model, it is more likely specific to your machine. I don't think there is a "solution" to your problem..
It might help to mention what OS you are running.. (Vista and VB6 don't get along too well)
0
Antagony1960Commented:
I noticed the exact same problem when I updated my old laptop to XP (from W2K) so I think it's probably OS related. I've since run VB6 successfully on several XP and Vista machines and none of them operated a break properly from modal objects.

To get around this problem I created a global constant (bcStopsEnabled), which I set to True when I might need the break. Then I put conditional stops after critical message boxes etc. (If bcStopsEnabled Then Stop). In some larger apps I also have a function which returns True if the app is running in the IDE and I use that to set a global variable (bIDERun) which can be added to the condition to ensure that stops will not be encountered in the compiled app. (If bcStopsEnabled And bIDERun Then Stop). Let me know if you want the function, bitoboy. It's only small but it uses a couple of API functions.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bitoboyAuthor Commented:
I forgot to mention the OS I am using is windows XP Pro SP2.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

bitoboyAuthor Commented:
Also, I have not changed OS's...been using XP Pro the whole time...it seems like there must be an explanation why this particular computer with it's software is causing the problem.
0
Antagony1960Commented:
bitoboy, I think it could be something to do with keyboard configuration. After playing around with the on-screen-keyboard (Start|Run|osk), I've discovered that Ctrl+Shift+Break breaks to the IDE as you'd like but Ctrl+Break just closed the message box and continues execution. Although I only have a Vista PC to try it on at the moment as I've left my old XP laptop back at the office.
0
bitoboyAuthor Commented:
Sadly, CTRL+SHIFT+Break doesn't work, either with the keyboard or OSK. Thx.
0
Antagony1960Commented:
Hmm... I don't know what else to suggest then. I've played around with it a bit more on my Vista PC and it seems to be completely erratic as to what action will occur after Ctrl+Break closes a message box. This seems to indicate a timing issue and leads me to wonder whether there is a compatibility problem between the VB6 IDE, modern keyboard hardware and/or the modern OS handling thereof.

A quick Google search has revealed that this problem has been around for years and no easy solution is available... sorry.
0
bitoboyAuthor Commented:
Well bugger...OK I guess I have to give up and get clever with the breaks and stops.
0
Antagony1960Commented:
Thanks for the points and the grade. I just wish I could have offered you a definitive solution.
0
bitoboyAuthor Commented:
That's what I get for using a 10 year old programming environment!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.