Main Board > Thin Client/WindX

MS Window Size

(1/2) > >>

Skip.Dahl:
How do I keep the application window size of pxplus static when a user restarts the program? It resets to default size rather than remembering what the user had previously dragged it to.


Mike King:
Try adding a

CALL "*winpnl"

to your START_UP program.

Skip.Dahl:
I added the call *winpnl within the startup program and PVX still opens in
a smaller window.   Not sure if any of this makes a difference but
ProvideX is on a Linux server running a character based software.
attached is a screen shot of the initial window.

Mike King:
The call to *winpnl is designed to save/recall window sizes for Nomads -- the graphical environment -- which is what we assumed since you are running WindX.

For Text mode the issue is the PxPlus container which when PxPlus first came out was intended to be a container for your windows thus its size is controlled by the user, however the following logic can be used to adjust it.


--- Code: ---  read data from fin(0,"XYPOS"),sep="," to X,Y,WD,HI
  read data from fin(0,"XYCLIENT"),sep="," to CHILDWD,CHILDHI
  X$=str(X)+","+str(Y)+","+str(X+CHILDWD+16)+","+str(Y+CHILDHI+110)
  print 'option'("XYRECT",X$),

--- End code ---

Now those value +16 and +110 are somewhat arbitrary but work for Windows 10 which includes the shadow of the window in the actual window size.  There is an API call you can use to get the exact value but for simplicity I would use these.

Put this code in the start of your application and the system should set the outer window frame to match the inner frame and its font size.

Thomas Bock:
We use the parameter "-hd" when starting a new PxPlus process. For CUI sessions we omit it, which makes PxPlus save the location and size in the pvx.ini for later use.

Navigation

[0] Message Index

[#] Next page

Go to full version