You mentioned VFP 9 SP1. Have you tried this with VFP 9 SP2? Maybe the crash is already resolved in SP2 and you're beating your head against the wall for nothing.
I'm not sure what else to tell you. This is way too complex for me to diagnose and fix without having a repro. I use XFRX and I do remember having to make a few minor fixes to avoid C5 crashes with their previewer. If you try to change the icon property on their previewer, it crashes .. so I don't bother changing the icon. The other thing I had to do was turn off our inherited form code that restores a window position because their previewer crashes when the .LEFT property is touched. We can't fix it, but we can avoid the crash by not touching the property. We also had trouble with their previewer not actually releasing the form if the form is modal and the user closes the form with the toolbar Quit button. We just had to add a RELEASE WINDOW (ThisForm.Name) to their Quit method and all is well. Cathy > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > Behalf Of Ken Dibble > Sent: Friday, January 16, 2009 12:25 PM > To: [email protected] > Subject: Report Preview C5 Crashes > > 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 > > > > [excessive quoting removed by server] _______________________________________________ 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/002c01c97a4b$1364d180$3a2e74...@com ** 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.

