MapPoint and window zorder

reinier
03-10-2008, 10:13 PM
Hi, I'm using the mappoint control object in VB6 and in delphi but everytime I set a map by calling NewMap, the other forms in my application goes behind the other windows instead of coming to the front. The mappoint object in both compilers do the same thing. Calling CloseMap makes my windows act normal again.

I've found that this only happens on WinXP if you enable Extended support for advance text services. (Control Panel -> Regional and Language options -> Languages -> Details -> Advanced.

Whenever I watch my list of windows (by zorder) I see a bunch of "Default IME" (one was for my application) and calling NewMap creates another instance of "Default IME" in my application and sends my forms between the two and mixes up the zorder.

Modal windows go behind the form that called it and is causing problems.
WinXP had a workaround by disabling extended support for advance text services but Vista always has this on.

I was just wondering if anybody else ran into this and knew of a fix.

julior
05-14-2008, 08:40 AM
Hi,

I'm suffering a similar situation with my app. Time to time when I call NewMap is opening in an external window, instead of being embeded on my application. Using VS 2003 I never had this problem, but now with VS2005 it's happening randomly. I don't know how to solve it by now.

I'll keep you informed if I find the solution.

Cheers,

Julio

johnrboren
06-26-2008, 10:44 PM
Did you ever find a workaround? I'm having the same problem in Vista.

Hi, I'm using the mappoint control object in VB6 and in delphi but everytime I set a map by calling NewMap, the other forms in my application goes behind the other windows instead of coming to the front. The mappoint object in both compilers do the same thing. Calling CloseMap makes my windows act normal again.

I've found that this only happens on WinXP if you enable Extended support for advance text services. (Control Panel -> Regional and Language options -> Languages -> Details -> Advanced.

Whenever I watch my list of windows (by zorder) I see a bunch of "Default IME" (one was for my application) and calling NewMap creates another instance of "Default IME" in my application and sends my forms between the two and mixes up the zorder.

Modal windows go behind the form that called it and is causing problems.
WinXP had a workaround by disabling extended support for advance text services but Vista always has this on.

I was just wondering if anybody else ran into this and knew of a fix.

Wilfried
06-27-2008, 02:58 AM
Hi,

I had this once years ago (also in Delphi) and it was because somewhere in the appliction a windows handle was overwritten by another. Difficult to find as this gives never an error (of course).

johnrboren
06-27-2008, 09:24 AM
Thanks. I ended up doing this on my ShowModal forms, which were the forms that kept getting stuck behind the window after I launched MapPoint embedded in my app.

1. Create the form in code - not automatically.
MyModalForm:=TMyModalForm.Create(Calling Owner Form);

2. Before the ShowModal statement, do:

PopupMode:=pmExplicit;
PopupParent:=Self;
Showmodal; // Need modal display

3. Make sure the form is set to StayOnTop.
4. Free the form after every use.

It's an ugly workaround, but I had to do this even with BDS 2006.

 
Web mp2kmag.com
mapforums.com