Hey Cathy, are you out there? I've been trying to avoid having to create my own preview window... just didn't want to have to put in the time when the native one is supposed to work.
But for reasons I don't completely understand I've run into problems. I know to some extent this has to do with VFP's issue of getting mixed up between modal and modeless windows. I can't do NOWAIT for many of my previews because I have routines that allow users to generate multiple reports at once and preview each, going to the next one by closing the preview window. In VFP 9 SP 1, I discovered that if a user had a modal (no NOWAIT) native VFP report preview window open in my application and clicked on the preview surface, and then clicked on the main menu, they'd get a C5 crash. This happens in my homemade framework. The framework has a form manager that handles form creation commands and stores object references to forms. My previews are called from within forms, sometimes from a second modal form when two modal forms are open, sometimes from modeless forms, all of which are handled by the form manager. My menu has a dynamic "Window" pad that uses code I found on a newsgroup to keep a list of open windows. In short, I can't create a simple repro to make these crashes happen. So after trying several things, I finally settled on code to get rid of the main menu while a report preview window is open. That works, but a user has just discovered that if they maximize the preview window under these circumstances, it takes over the whole application. That is, the main program window no longer seems to exist. There is only one title bar, and one set of min/max/close buttons, and they belong to the report preview window. The application does still register on the task bar, but its Close option in the pop-up menu is disabled. Once the user does this, the only way to close the preview window and regain access to the rest of the application is to use the close preview button on the preview toolbar. However, if the user has closed the preview toolbar, she's sunk. The only way out is to click stuff until a C5 occurs (or use the Task Manager to shut down the program). One way to cause this crash is to click on the disabled Close option in the taskbar button's context menu, then click in the preview window. I understand how to use the resource file to modify the preview toolbar, but removing its close button isn't an option. Do you have any thoughts on how I can deal with this without having to create my own preview window? Thanks very much! Ken Dibble www.stic-cil.org _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

