How to fix blank screen if application is swithed in RDP

427 views Asked by At

Visual FoxPro 9 application wrotes to screen using ? commands

SYS(602 , 1 )
MODIFY WINDOW screen FONT 'Arial',14
_Screen.Themes = .F.
hide menu _msysmenu
ACTIVATE SCREEN
clear

do while .t.
clear
  ?'1 Option1'
  ?'2 Option 2'
  ?'.  Exit'

  wait 'Select ' to valik
clear
...
enddo

If running under RDP after switching to local desktop and back texts writter to screen disappears. Whole screen is blank.

How to fix this so that application screen output is visible after switching back to application ? I tried SYS(602 , 1 ) and SYS(602 , 0 ) but this does not fix blank screen.

1

There are 1 answers

0
GoodWasHere On BEST ANSWER

It happens because screen resolution changed when you connect by an RDP.
On resolution change VFP repaint the _screen and clean all text. (text on screen not stored anywhere)
If you wanna save output you can add some layer on _screen, for example a textbox object.
Its content permanently stored in object.value and saved after repainting.

_screen.AddObject('out', 'textbox')
_screen.out.Visible= .T.
_screen.out.value = 'sometext'

Or you can use set alternate for handle the output.