Description
At this moment the form layout geometry (or state) information (stored in the registry) can only deleted by either checking the Cleanup option (\"Delete current layout geometry from settings on app exit\") in the Uniface Setup or deleting the corresponding registry key (HKEY_CURRENT_USER\\\\Software\\\\Compuware\\\\Uniface\\\\USYS9\\\\state\\\\{STARTUP_SHELL}). It would be useful if the layout geometry of a form could be reset to its (design time) default values using a 4GL function (e.g. $windowproperties).
Use Case
At this moment it is necessary to use a somewhat difficult to access setup screen and restart the Uniface application in order to reset the form layout geometry. It would be more user friendly if this could be done from 4GL.
Importance
Medium
Type
Proc Code
Operating System
Windows
Status
Open
This should do the trick for all Forms:
variables
string vBase, vList, vItem, vVersion
endvariables
getitem/id vVersion, $about, “version”
if (vVersion >= “9.6.06”)
vBase = “HKEY_CURRENT_USER\Software\Compuware\Uniface\USYS9\State\%%$applname%%%\forms”
else
vBase = “HKEY_CURRENT_USER\Software\Uniface\Uniface\USYS9\State\%%$applname%%%\forms”
endif
vList = $setting(“”, “%%vBase%%%\·*”, “REGKEYS”)
forlist vItem in vList
deletesetting “”, “%%vBase%%%\%%vItem%%%\·*”, “REGVALUES”
deletesetting “”, “%%vBase%%%\%%vItem%%%”, “REGKEYS”
endfor
Or this one for just the current Form:
variables
string vBase
endvariables
getitem/id vVersion, $about, “version”
if (vVersion >= “9.6.06”)
vBase = “HKEY_CURRENT_USER\Software\Compuware\Uniface\USYS9\State\%%$applname%%%\forms”
else
vBase = “HKEY_CURRENT_USER\Software\Uniface\Uniface\USYS9\State\%%$applname%%%\forms”
endif
deletesetting “”, “%%vBase%%%\%%$instancename%%%\·*”, “REGVALUES”
deletesetting “”, “%%vBase%%%\%%$instancename%%%”, “REGKEYS”