Re: How to reset Screen State automatically #ria #xpa

Steven Blank


One way to address this issue would be to specify a fixed initial position and size for the MDI.

To force the MDI to always open with the top-left corner at the (x,y) screen coordinates (0,0), and with an initial size of 640 by 480 pixels, that is, with the bottom-right corner at (640,480), add the following to the MAGIC.INI file's [MAGIC_ENV] section:

MDIleft = 0
MDItop = 0
MDIright = 640
MDIbottom = 480

With these settings added to the MAGIC.INI file, the application will always startup in the same position and at the same size. BTW, these settings only affect the MDI – all other child screens' positions and sizes will be persisted as before, and the user, of course, is free to move, resize, max, and min the MDI as they desire.


Steve Blank

P.S. There are more such settings that you might want to play with, some documented, some not. The complete library (AFAIK) of such settings are as follows:

MDIClientEdge = Y|N
MDIClientImageFile =
MDIClientImageStyle =
MDIleft = 88
MDItop = 109
MDIright = 379
MDIbottom = 394
;MDIMinX = -1
;MDIMinY = -1
;MDIShow = 1
;MDIFlags = 0
;xScreen = 726
;yScreen = 80

On 5/21/2020 6:42 PM, Darren wrote:

Hello Everyone,

As of now we all know that most of our users are working from home.
And there is 1 issue that keeps occurring. That is the window tends to be missing and nowhere to be found but the application is already opened in the taskbar and in the task manager also. This is because our users used to have a second display at the office and at home they only have 1 display.

I resolve this by asking the user to close the application and delete the files on this folder:  %userprofile%\AppData\Roaming\MSE
I tried making a function insde XPA but it just keeps creating them because the application is still open.

Is there any way to do this automatically? Or is there any other way to reset the Screen State?

Best Regards,

Join to automatically receive all group messages.