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

OnExit from a frame

Status
Not open for further replies.

TimSNL

Programmer
Sep 11, 2001
119
AU
Hello,

I have written a frame to handle input of addresses for my application which can now be used on any form.

I need to use the OnExit event of the frame to make sure the data is saved to the address table before the user continues editing the rest of the main form.

There seems to be a problem here, the OnExit of the frame seems to disrupt the transfer of focus to the component which has been selected on the main form, producing some strange side effects. Example, if you are using the frame and then press a button on the main form, the OnExit of the frame executes normally and focus moves to the button on the main form but the button does not press in, it has to be pressed again with the mouse.

Any ideas on how I can stop these side effects occuring?

Tim Dover
SNL Computing
 
The only way I can make this happen when exiting a frame to a button on a main form, is to add a messagebox to the Frame exit procedure. This results in the problem you describe. Removing the messagebox remedies this. If your not using a messagebox of any kind then reply with the frame exit code and Im sure somebody will know whats going wrong!
 
Thanks for your reply bit I'm not sure what you mean. Which property do I use to get the 'frame exit code'?
 
Well, I have something thats kinda like what you discribe Tim!

I always write away all the setting to a ini- or textfile.
I do this when I exit, then as the frame closes set the active component and I call a procedure in the main frame
to load the settings.

This works perfectly for me.

I hope this helps, BobbaFet

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com

&quot;<beer brand> is like making love in a cano...
it's <f-word + ing> close to water !!!&quot;
- Monty Python's Flying Circus, 1969/70
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top