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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal error using zorder?

Status
Not open for further replies.

Transcend

Programmer
Sep 29, 2002
858
AU
Hi everyone

I have a shortcut key on a form that basically hides and shows a utility panel. However sometimes (usually at the 2nd or third hide) it causes a fatal error and the program just crashes entirely. When i debug it it happens when setting a controls zorder, and gives a "memory could not be read" error.

It's confusing because it works but usually after you've ctrl-u'd a couple of time it crashes.

Does anyone have any ideas of what on earth might be going on?

Thanks in advance

Transcend
[gorgeous]
 
What other code happens as a result of the dialog getting/losing the focus?
Try commenting it all out and see if the problem recurs.

Perhaps some interesting drawing code, or an OCX control on the dialog?
Does the same thing happen if you show and hide an otherwise empty dialog instead of the real one?
 
Hi thanks for your reply,

when i'm back at work monday i'll check out whether any code is executed on the lost focus. It's an application that i've inherited so i don't know this off the top off my head!

The possibility that it's some interesting drawing code is extremely likely, as the dialog box is positioned next to an image when displayed. When it is hidden the image would have to be resized to fill the gap left my the utility panel.

Thanks again will let you know how i go

Transcend
[gorgeous]
 
Ok i've been looking and looking at this problem and it doesn't really do anything special that I can see when it loses the focus.
It really just seems to crash when the zorder is set! It's actually an ElasticOne control from SizerOne that the zorder is being set on.

Any more ideas?

Transcend
[gorgeous]

 
Seems the third party control was the problem ..

ended up replacing them all with frames and manually writing the resize code.

Transcend
[gorgeous]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top