Problem with Splash Screen
Posted by Support Appeon on 19 July 2011 10:06 AM
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.
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.
Add those scripts in the open event of the picture window.
int li_screenheight, li_screenwidth, li_rc, li_x=1, li_y=1
/* 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 )
If li_screenheight > this.Height Then
li_y = ( li_screenheight / 2 ) - ( this.Height / 2 )
/* Center window */
li_rc = this.Move ( li_x, li_y )
If li_rc <> 1 Then Return -1