I have written an HMI (Human Machine Interface) program for some kind of machine. The program runs on a touch panel with "Windows Standard Embedded 7". I guess it makes no difference to my problem that it is an embedded version of Windows 7.
- The
WindowState
of the main form of my program is set toNormal
, and the size set to match the resolution of the touch panel (1280x800). - The
FormBorderStyle
is set toNone
. - The
StartPosition
is set toCenterScreen
.
The issue is:
when starting the program directly on the touch screen the program is shown as it should, filling the screen completely from top/left to right/bottom. This is OK!
when the program is NOT running and you log on to the touch panel via Remote Desktop (with a bigger screen, let's say 1920x1200), and THEN start the program (through the rdp session) the program also starts as expected, shown in the middle of the screen with the size of 1280x800. This is OK!
when logging on via rdp WHILE THE PROGRAM IS ALREADY RUNNING the program is shown as maximized, filling up the whole screen (1920x1200). This is not good, as the whole layout of my program is made for 1280x800!
Does anyone have an idea why my program is behaving like this, or is the problem somehow related to the rdp session?
SizeChanged
event fire when you RDP to the application already running? If so.. you could subscribe and re-size the form.. – Adamesedit
button to the left to modify it. – ConversationalistSystem.Windows.Forms.Screen.PrimaryScreen.WorkingArea
instead of actually maximizing it. Might be a complete fix, or if you really want it maximized, it might focus you to the right direction. – Labyrinth