Hi John.
>> HOW THE !@## DO YOU GET YOUR APP TO SAVE THE POSITION AND SIZE WHEN THE USER EXITS THE PROGRAM?!?!?! <<
I generally save and restore form positions from an ini file.
You can save the current position to the ini file using something like this:
lcValue = ALLTRIM(STR(MAX(THISFORM.Top,0))) + ',' + ;
ALLTRIM(STR(MAX(THISFORM.Left,0))) + ',' + ;
ALLTRIM(STR(MAX(THISFORM.Height,0))) + ',' + ;
ALLTRIM(STR(MAX(THISFORM.Width,0)))
ENDIF
=WritePrivStr("WindowPositions", lcCaption, ;
lcValue, MyIniFile)
And you can restore the position by reading the value from the ini file:
*-- Read the window position from the INI file
IF GetPrivStr("WindowPositions", lcCaption, "", ;
@lcBuffer, LEN(lcBuffer), ;
MyIniFile) > 0
Of course, you will need to declare these functions to use them like so:
DECLARE INTEGER GetPrivateProfileString IN Win32API AS GetPrivStr ;
String cSection, String cKey, String cDefault, String @cBuffer, ;
Integer nBufferSize, String cINIFile
DECLARE INTEGER WritePrivateProfileString IN Win32API AS WritePrivStr ;
String cSection, String cKey, String cValue, String cINIFile
HTH
Marcia