how would i make the form remember the size it was when it last openend?:confused:
Printable View
how would i make the form remember the size it was when it last openend?:confused:
text file or registry!
I'd through my vote in for registry. You can use VB's built in SaveSetting() and GetSetting() functions, or find some better registry code on the net somewhere. Or I can give you some if you want it.
i think it would be easyer if you could give me some but explane it a lil so then i can understand it thanks
If you just want to use the built in vb functions then:
VB Code:
Private Sub Form_Load() Me.Width = GetSetting("MyApp", "General", "Width", Me.Width) Me.Height = GetSetting("MyApp", "General", "Height", Me.Height) End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) SaveSetting "MyApp", "General", "Width", Me.Width SaveSetting "MyApp", "General", "Height", Me.Height End Sub
The syntax for the functions look like this:
Hope this helps.Quote:
SaveSetting AppName, Section, Key, Value
GetSetting AppName, Section, Key, [Defualt Value]
ok thanks that helps