Solved

options

Posted on 1998-06-14
2
160 Views
Last Modified: 2010-05-03
i have a form with two check boxes witch are both unchecked and i was wondering if possible how would i save these options on exit so if one or both are checked on exit  the form would start with the check boxes checked and if both where unchecked the form would start with the boxes unchecked
0
Comment
Question by:p400
2 Comments
 
LVL 4

Accepted Solution

by:
Chizl earned 50 total points
Comment Utility
Save to registry..   If you go to http://www.karland.com/OurProducts/RegSet32/ and download the FREE OCX file, you then will be able to write, read, and delete registry entry with ease.

The call to make your entry would be like this:

Private Const REG_NONE = 0                       ' No value type
Private Const REG_SZ = 1                         ' Unicode nul terminated string
Private Const REG_EXPAND_SZ = 2                  ' Unicode nul terminated string
Private Const REG_BINARY = 3                     ' Free form binary
Private Const REG_DWORD = 4                      ' 32-bit number
Private Const REG_DWORD_LITTLE_ENDIAN = 4        ' 32-bit number (same as REG_DWORD)
Private Const REG_DWORD_BIG_ENDIAN = 5           ' 32-bit number
Private Const REG_LINK = 6                       ' Symbolic Link (unicode)
Private Const REG_MULTI_SZ = 7                   ' Multiple Unicode strings
Private Const REG_RESOURCE_LIST = 8              ' Resource list in the resource map
Private Const REG_FULL_RESOURCE_DESCRIPTOR = 9   ' Resource list in the hardware description
Private Const REG_RESOURCE_REQUIREMENTS_LIST = 10

Private Const HKEY_CLASSES_ROOT = &H80000000
Private Const HKEY_CURRENT_USER = &H80000001
Private Const HKEY_LOCAL_MACHINE = &H80000002
Private Const HKEY_USERS = &H80000003
Private Const HKEY_PERFORMANCE_DATA = &H80000004
Private Const HKEY_CURRENT_CONFIG = &H80000005
Private Const HKEY_DYN_DATA = &H80000006

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    RegSettings1.CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\YOUR COMPANY NAME\Program Name"
    RegSettings1.SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\YOUR COMPANY NAME\Program Name", "CheckBox1", Check1.Value, REG_DWORD
    RegSettings1.SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\YOUR COMPANY NAME\Program Name", "CheckBox2", Check2.Value, REG_DWORD
End Sub

0
 

Author Comment

by:p400
Comment Utility
thanks for the help
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now