Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6(SP6) crashes when my form Unloads

Status
Not open for further replies.

PHANTOMMIKE

Programmer
May 6, 2002
6
ZA
I have an app using demo Crystal XI Developer and Microsoft Access/Jet 2000 where a crash occurs on unloading a form. It happens everytime the order of the FRAMES in a form is changed from the order which applied when VB did not crash. As to why this should be so and what happens to make changing the order of the frames critical, I have absolutely no idea. I have 5 "main" frames on the form which are switched visible/invisible using a TAB control on the form. Each "main" frame contains further frames and other objects. When VB started to crash on exit, I examined the formname.frm file using Notepad and noticed that the order of the BEGIN VB.FRAME framename statements for the "main" frames had changed compared to the previous version which did not crash. Using the form editor in the IDE, I restored the "main" frame order to that which did not crash and the crashing went away! This allows me to enhance the form but the ZOrder (I think it is) must stay the same otherwise VB crashes when the form unloads. The form needs a lot more development so proceeding on this basis - having to restore the sequence of frames - is a pain. Does anybody understand this and might you maybe tell me what I might do to make the real problem go away?

Can you tell me what the filename.frx file is for and can it be used to help diagnose the problem further?

This has happened before in other apps and I "solved" by restoring from backup and was not so constrained by the frame order. I "believe" that the problem of crashing on form unload may be connected with editing code on the fly while VB is running - I am almost but not quite certain that this statement is true.

I found Tek-Tips thread222-977856 but I don't understand if there might be any connection. I do have some multi-line textboxes in the form but they have been running since the early days of the app and have not changed in the last 9 nine months.

Thanks for whatever help you can offer - this is a big app on which I have been busy for about a year.
 
Can you tell me what the filename.frx file is for and can it be used to help diagnose the problem further?

Yes, it's the file that contains the graphic elements for your form, and it's unlikely that it can be used to help diagnose the problem further. If the Crystal that you're talking about is Crystal Reports, you might want to check one of their forums. I've had one experience with Crystal reports, and well, things had a way of crashing.

Bob
 
Hi Bob,

Thanks for your comments.

I have stripped out all Crystal Reports Designers, related VB forms, Components and References - same result.
Maybe Crystal is innocent.

What report writer do you use/recommend?
I have been scratching around and have come across Reportster from Fogle Computing - Does anybody perhaps know the product and can comment? The write up in Hallogram looks very interesting but, at $700, I would like some input from users before buying.

Any further ideas on the crashing?
 
<Maybe Crystal is innocent.

I doubt it! LOL

If I can't write a report from scratch, then yes, Crystal is the best of a bad bunch.

As for the crashing, I would personally start a new project and begin loading and testing my forms one by one.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top