Solved

options

Posted on 1998-06-14
2
165 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Chizl earned 50 total points
ID: 1463276
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
ID: 1463277
thanks for the help
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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