Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - ZOrder problem and windows effects
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ZOrder problem and windows effects

 Post Reply Post Reply
Author
Message
fciccardini View Drop Down
Newbie
Newbie


Joined: 11 March 2009
Location: Uruguay
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fciccardini Quote  Post ReplyReply Direct Link To This Post Topic: ZOrder problem and windows effects
    Posted: 11 March 2009 at 9:48am

I have an application with 3 forms, all using the Ribbon Control.
The form1 show modal the second form and the second show modal the third form.

In order to reproduce the problem I run the application, open the forms and then I open other application (ie browser, better maximized).
Then change to my app without minimize the browser, and close the third form.
The effect is that the browser brings to front for a few seconds and then its go back.

If someone knows how to void this effect, bring me the solution please.
Thanks

This is the sample:
 
fabrizio ciccardini
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2009 at 2:05am
Hi,
 
You have too old version - I believe it was fixed already - try last evaluation version.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
neversaid View Drop Down
Newbie
Newbie


Joined: 12 March 2009
Location: Germany
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote neversaid Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2009 at 7:26am
Hi Oleg,

i've almost a similar problem in my Application.
I just bought the newest Codejock Version last week, and here the problem occurs to.

Language: MS Visual FoxPro 9 (All SP's installed)

Description:
We're using CommandBars / Ribbon with EnableFrameTheme enabled.
After setting everything and configuring the whole Ribbon we Attach the Current HWND to the commandbar.
On a Form displayed ("In Screen") in Foxpro, everything works perfect, but when we use "As Top Level Form" the Ribbon and Titlebar / Statusbar
disappears.
With Spy++ we discovered that the Commandbars perhaps lie on a wrong "ZOrder" caus when we use "bring to front" in Spy++ on the HWNDs of the Bars (Statusbar, Ribbonbar, Toolbar) they appear correctly.
A Strange thing is, that the left and right borders where rendered correctly in the "Office Style" but all Controls (Ribbon, Statusbar, Titlebar) where on the right place (you see the empty spaces) but won't be displayed.
We need a fix for this.
I've attached a screenshot.
If you need further assistance please let me know.

Thanks
Bernhard

uploads/20090312_072556_errorocx_vfp_ri.zip

Edit:
This Problem looks like mine:
https://forum.codejock.com/forum_posts.asp?TID=13630
But if i set SetMDIClient to the HWND of my VFP Form the Application Crashes


Edit2 / Workaround:
With some SPY++ investigations i found out, that the VFP Form layes on the top and the Ribbonbar behind the Form (invisible).
A small hack in the Refresh Method of the form helped me (its better to do an thisform.refresh() also in the activate).
Don't call this form the Paint or Draw method - you'll get a bad flicker on your controlbars!

DECLARE INTEGER SetWindowPos IN user32;
    INTEGER hwnd,;
    INTEGER hWndInsertAfter,;
    INTEGER x,;
    INTEGER y,;
    INTEGER cx,;
    INTEGER cy,;
    INTEGER wFlags

DECLARE INTEGER FindWindowEx IN user32;
  INTEGER hwndParent,       ;
  INTEGER hwndChildAfter,   ;
  STRING lpszClassName,    ;
  STRING lpszWindowCaption

** this.oRibbon = CommandBars ActiveX

IF Vartype(this.oRibbon) = "O" THEN
  ** If you have an Statusbar set it topmost
  SetWindowPos(this.oRibbon.StatusBar.hWnd,0,0,0,0,0,0)
ENDIF

lnHWnd = FindWindowEx(thisform.hwnd,0,"XTPDockBar","xtpBarTop")
IF lnHWND > 0 THEN
  ** Now set the formborder and controllbars to front / top
   SetWindowPos(lnhWnd,0,0,0,0,0,0)
ENDIF

** At the and the bar must be redraw (only this works fully)
IF Vartype(thisform.oRibbon) = "O" THEN
  thisform.oRibbon.ActiveMenuBar.RecalcLayout
ENDIF


But it would be nice to see an bugfix of this problem or an correction of my started code.
Further i think this will be also work with my disappearing CommandBarsFramed but i'll check out and report.

Back to Top
fciccardini View Drop Down
Newbie
Newbie


Joined: 11 March 2009
Location: Uruguay
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fciccardini Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2009 at 10:06am

Hi,
Thanks for your answer. The project was compiled using version 11.2.
I downloaded version 13.0 and recompiled the project and the effect is the same.

The problem is when I close the third form, the contents of the other application brings to front and then back.

fabrizio ciccardini
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.168 seconds.