Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Uses GetSetting registry function to retrieve the ...
Author:
Justin Manley
Submitted:
1/3/2000
Version:
VB5
Compatibility:
VB5,6
Category:
Windows Registry
Views:
22184
Uses GetSetting registry function to retrieve the size of a form from the registry so that the form size persists each time the application is loaded.
Declarations:
none
Code:
Private Sub Form_Load() Dim MyHeight As Integer, MyWidth As Integer MyHeight = GetSetting("TestRegistrySettings", "Startup", "Height", cStr(Screen.Height / 2)) MyWidth = GetSetting("TestRegistrySettings", "Startup", "Width", cStr(Screen.Width / 2)) Me.Height = MyHeight Me.Width = MyWidth End Sub Private Sub Form_Unload(Cancel As Integer) SaveSettings "TestRegistrySettings", "Startup", "Height", CStr(Me.Height) SaveSettings "TestRegistrySettings", "Startup", "Width", CStr(Me.Width) End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement