|
-
Mar 6th, 2002, 04:27 PM
#1
Thread Starter
Hyperactive Member
Remembering size
how would i make the form remember the size it was when it last openend?
-
Mar 6th, 2002, 04:29 PM
#2
Frenzied Member
-
Mar 6th, 2002, 04:33 PM
#3
Stuck in the 80s
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.
-
Mar 6th, 2002, 04:43 PM
#4
Thread Starter
Hyperactive Member
i think it would be easyer if you could give me some but explane it a lil so then i can understand it thanks
-
Mar 6th, 2002, 04:49 PM
#5
Stuck in the 80s
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:
SaveSetting AppName, Section, Key, Value
GetSetting AppName, Section, Key, [Defualt Value]
Hope this helps.
-
Mar 6th, 2002, 05:00 PM
#6
Thread Starter
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|