See
Re: Message: API call caused an exception. Thread #
592114 Message #
592524>This problem appears to only be happening with Win98 computers.
>
>The application has a main menu form that is always present. On that form is a timer that tells when the VFP application is in the background so that another process can be implemented. This works well and behaves on Win 98 and Win Xp computers. On Win98 computers when you go to print, sometimes not always, the API call causes a problem creating an error 2028 (API call caused an exception). As long as you don't print everyting works smoothly.
>
>Here's the code for the foreground/background checking.
>
>IF !"FOXTOOLS.FLL" $ UPPER(SET("Library"))
> SET LIBRARY TO "foxtools.fll" ADDITIVE
>ENDIF
>
>DECLARE INTEGER GetForegroundWindow IN Win32API
>
>llForeground = (mainhwnd() == GetForegroundWindow())
>
>
>Any input is appreciated.
>Thanks
>Jon
If it's not broken, fix it until it is.
My Blog