1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Messing with the Registry...

Discussion in 'Software Development' started by asbo, Jan 23, 2002.

Thread Status:
Not open for further replies.
Advertisement
  1. asbo

    asbo Thread Starter

    Joined:
    Sep 21, 2001
    Messages:
    507
    My program saves several settings to the registry... 'Couple questions:

    1. How do I make that, when I do the GetSetting function that a checkbox is checked or what ever?

    2. There is a button that will execute according to these settings... but how do I validate what the setting in the Registry is? Kinda like the first one, but I have tried declaring a variable and If {variable} = GetSetting (App.Title, "Options", "savedir") Then ...

    Can anyone give me some help?

    Thanks & regards
     
  2. asbo

    asbo Thread Starter

    Joined:
    Sep 21, 2001
    Messages:
    507
    Please???
     
  3. TimCottee

    TimCottee

    Joined:
    Oct 10, 2001
    Messages:
    186
    asbo:

    Here is how I would approach both of these issues:

    Dim strValue As String
    Dim intCheckSetting As Integer
    strValue = GetSetting(App.Title, "Options", "savedir","N/A")
    If strValue = "N/A" Then
    'There is no setting so use a default
    intCheckSetting = vbUnchecked 'Unchecked
    Else
    If strValue = "Something" Then 'Where Something is a value you expect to see
    intCheckSetting = vbChecked
    Else
    intCheckSetting = vbUnchecked
    End If
     
  4. asbo

    asbo Thread Starter

    Joined:
    Sep 21, 2001
    Messages:
    507
    Thanks TimCottee.

    I'll try to mess around with tonight and see what happens.

    Thanks again!
     
  5. asbo

    asbo Thread Starter

    Joined:
    Sep 21, 2001
    Messages:
    507
    All clear here! Thanks for your help!
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/66121

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice