Problem with Splash Screen
Posted by Support Appeon on 19 July 2011 10:06 AM

Question:

In PB the window is centering but in Appeon it is not.  Please not the "center" property is checked.  It seems this property is not taking effect in Appeon. 

Solution:

I am sorry to let you know this center property of window object is unsupported for an MDI frame window. Maybe you can try to add the center code in the open event of the picture window object to work around this issue.

 

opensheet(w_pic,w_mdi,0,Original!)

 

Add those scripts in the open event of the picture window.

 

int   li_screenheight,   li_screenwidth,   li_rc,   li_x=1,   li_y=1

environment lenv_obj

/*     Check   for   a   window   association   with   this   object     */

If   IsNull   (   this   )   Or   Not   IsValid   (   this   )   Then   Return   -1

/*     Get   environment     */

If   GetEnvironment   (   lenv_obj   )   =   -1   Then   Return   -1

/*     Determine   current   screen   resolution   and   validate     */

li_screenheight   =   PixelsToUnits   (   lenv_obj.ScreenHeight,   YPixelsToUnits!   )

li_screenwidth     =   PixelsToUnits   (   lenv_obj.ScreenWidth,   XPixelsToUnits!   )

If   Not   (   li_screenheight   >   0   )   Or   Not   (   li_screenwidth   >   0   )   Then   Return   -1

/*     Get   center   points     */

If   li_screenwidth   >   this.Width   Then

            li_x   =   (   li_screenwidth   /   2   )   -   (   this.Width   /   2   )

End   If

If   li_screenheight   >   this.Height   Then

            li_y   =   (   li_screenheight   /   2   )   -   (   this.Height   /   2   )

End   If

/*     Center   window     */

li_rc   =   this.Move   (   li_x,   li_y   )

If   li_rc   <>   1   Then   Return   -1

 

Return   1

 

(1 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 
 

Please login if you wish to leave a comment about this article.

Help Desk Software by Kayako Fusion