Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

Catch and abort exit of Microstation

$
0
0

I have an mdl application where a user enters data in forms and on the drawing.  I am trying to find a way to catch the event when a person exits from Microstation using the X and prompt the user to save.  If the user picks cancel or cannot save due to data errors, I want to abort the exit of Microstation.  I can do this from the exit menu command but not when a user uses the X or closes from the task bar.

I have set a function for the SYSTEM_UNLOAD_PROGRAM event and with that I can catch the SYSTEM_TERMINATED_SHUTDOWN (-2) flag, but from what I've read, returning a non-zero value does nothing to prevent the unload.  If the flag is less than zero, the application cannot abort the unload.

I searched in Communities but could not find anything helpful.  I would seem that this is something that other people would need to do and perhaps I'm just missing something very obvious.

Any suggestions?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>