[Gambas-user] How Settings.Read works?
bagoneo at libero.it
Thu Sep 29 13:43:58 CEST 2022
Il 29/09/22 13:19, Benoit Minisini ha scritto:
> Le 29/09/2022 à 12:29, gian via User a écrit :
>> the issue is simple: either I have not understood how Settings.Read
>> works, or Settings.Read does not work completely.
>> Public Sub Form_Open()
>> ' If Settings.Exist("FMain/Geometry") Then '
>> <------------------this works
>> ' Settings.Read(Me)
>> ' Else
>> ' Me.X = 100
>> ' Me.Y = 100
>> ' Endif
>> Settings.Read(Me, "Geometry", [100, 100, 512, 512, 0, 0]) '
>> <---this *not* works, also with key "FMain/Geometry" or nothing key
>> Public Sub Form_Close()
>> Regards & Thanks
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> Settings class has special support for windows (and controls having a
> Settings property).
> So, for windows, you just have to write 'Settings.Write(Me)' to save its
> geometry, and 'Settings.Read(Me)' to restore it.
> You can't use the default value argument in that case, as you can't
> guess the format used for storing the window data.
Hi Benoit and Bruce,
thank you very much for your answers
More information about the User