Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to trap error 52
Message
From
16/01/2001 05:09:16
 
 
To
15/01/2001 11:16:54
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00463728
Message ID:
00464119
Views:
18
Hi!

There are 2 workarounds.

1 is tremendous and raser old-style. Use KEYBOARD "{ESCAPE}" command to put ESC key into keyboard buffer. When dialog box appears, Cancel will be pressed automatically by keyboard buffer. Note that you require to SET ESCAPE OFF and disable any ON KEY LABLEL ESCAPE to use that. After your program finished use KEYBOARD "" CLEAR to clear out extra keys from buffer. Note also thet in error handle your equire to use KEYBOARD "{ESCAPE}" again since previous key in buffer alreade released.

2-nd, and I like it the most, is to use API functions. In Windows you can define hooks that handle all events for application. Temporarily you can set up a hook that will catch window creation events. More, you can disable it! So, when VFP tries to open dialog box it just do not open. Usually this is treated as pressing of Cancel button in dialog box.
Note that above way is approved to hide compilation progress window in run-time. I did not used it for dialog boxes, so I don't know about effects. Note also that you require to know a lot about API to use them. Better to make mentioned hook in C++ or Delphi because in VFP it is a bit messy.

>Vlad,
>Thanks for the answer, but I don't like it. There has to be some way around this. I have been plagued by this as I am writing a conversion program. I finally was able to pin it down to a typeo. The problem was it occured on about the 8000th time thru a loop. Debugging is hard under those circumstances.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform