Name: George Ingram
Using: vb6
OS: Windows 2000

I have created a Splash Screen for my program with a "Dont show this screen again" checkbox. I am using the checkbox value and the Savesetting/Getsetting parms to bypass the Splash Screen if checkbox is checked. It seems to be working correctly, when the checkbox is checked and the program is restarted the getsetting loads the "checked" value. However I assume is going to be there forever. I am still in the testing stage and I am not sure how this will affect the Exe on the Users Computer once its compiled. There is a deletesetting function but I am not sure where or how it is used. Is it a stand-alone or called from within a module. I would like to distribute the program with the value set to unchecked and I need to check the the action on my computer prior to distribution. Here is my code any help will be appreciated.

Thank You


Thanks also for helping solve my prior problem

Option Explicit

Private Sub Check1_Click()
  If Check1.Value = 0 Then Text1.Text = "Unchecked"
  If Check1.Value = 1 Then Text1.Text = "Checked"
End Sub
Rem ********************************************************************************

Public Sub Form_Load()
    Text1.Text = GetSetting("Project2", "textboxes", "text1", "")
    If Text1.Text = "Checked" Then
        Rem call form1.millionairemakerstart ** Skips Splash and goes to Form1
    End If
    If Text1.Text = "Unchecked" Then: Rem ***loads the splash If Not Checked ***
       Image1.Picture = LoadPicture("Form6 Splash.jpg")
       Image1.Visible = True
       Form6.Picture = LoadPicture()
       Image2.Picture = LoadPicture("CLOSEB~1.jpg")
       Image3.Picture = LoadPicture("CLOSEB~2.jpg")
       Image4.Picture = LoadPicture("CLOSEB~1.jpg")
       Image2.Visible = True
       Image2.Tag = "Up"
       Image3.Visible = False
       Image4.Visible = False
    End If
End Sub
Rem ********************************************************************************
Private Sub Form_Unload(Cancel As Integer)

        SaveSetting "Project2", "textboxes", "text1", Text1.Text
End Sub
Rem ********************************************************************************
Private Sub MainPgm()

    If Text1.check = "Checked" Then Check1.Value = 1
    Rem call form1.millionairemakerstart *** Skips Splash and Loads Form1
End Sub
Rem ********************************************************************************
Private Sub Image2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Image2.Tag = "Up" Then
        Image2.Picture = Image3.Picture
        Image2.Tag = "Down"
        Unload Me
        Image2.Picture = Image4.Picture
        Image2.Tag = "Up"
    End If
End Sub

Edited by peter_budo: Keep It On The Site - Do not post asking for an answer to be sent to you via email or PM.

6 Years
Discussion Span
Last Post by vb5prgrmr

Okay, where does your code startup? Sub Main? Form1? Well wherever it does, you can clean your form load up to something as simple as...

Option Explicit

Public Sub Form_Load()

On Error GoTo Form_LoadError

Dim SplashSetting As String

SplashSetting = GetSetting("ProjectName", "Startup", "ShowSplash", "T") 'T/F

If SplashSetting = "T" Then
  Me.Visible = True 'force this form to become visible
  formSplash.Show vbModal, Me 'show splash screen modally/vbModeless=default
End If

Exit Sub

MsgBox "Form1.Form_Load " & Err.Number & ":" & Err.Description 'for debug and beta

End Sub

Then the rest of that code can go into your splash screen form load and form unload.

As for when your program is installed, the savesetting will not have been executed yet so the setting retrieved by the getsetting function will be the default value as I have shown in my little snippet. As for allowing the user to be able to change the splash screen value, you could add that to the options form (formOptions) of your program.

Good Luck

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.