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

Top Level Form - 2 In Top Level Form

Status
Not open for further replies.

SteveDingle

Programmer
Jul 26, 2004
254
GB
Heya All,

Situation - Top Level Form calls a MODAL In Top Level Form (it a wizard or pick list type form). Then an error occurs in my MODAL "In Top Level Form" which call my error manager object (property in _SCREEN) calling my Message Form which is also an MODAL "In Top Level Form".

Problem - The Message form always shows up behind the 1st MODAL "In Top Level Form" and I have to task manager out.

What I need to happen is somehow force the Message Window to the front.

Any thoughts?





Toodles,
Steve Dingle
D&S Business Solutions Ltd
 
Steve,

The way I've done this in the past is to set the form's AlwaysOnBottom to .T., then immediately set its AlwaysOnTop to .T. I'm not sure why it works that way, but it seems to succeed.

However, I don't think it would work with a top-level form, as there's no other form for it to be in front of (if you see what mean).

I wonder if you could do it by calling the ShowWindow() API, passing the message window's HWnd as the first param?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Your message box could be behind if it looses focus.

Jim Rumbaugh
 
Sorry, I wasn't paying attention. You said the forms are both MODAL. I agree with Mike, check the AllwaysOnTop and AllwaysOnBottom values.

Jim Rumbaugh
 
Heya Guys,

Sorry for the delay, never got a email notification. I'll try the 'switching' value and also the showWindow().

Thanks Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top