1.11M Members

splash screen check if settings of checkbox was checked true or false in form1

 
0
 

in form1 there is a checkbox witch when you click , it will save checked value in xml file

in splash screen its has a label1.text = "welcome "
what i want is ,when splashscreen loading up check if settings of form1.checkbox1.checked if true then
do
[splashscreen]
me.text ="your not welcome"

Private Sub SplashScreen1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.form1_checkbox = Form1.Checkbox1.checked Then
            Label1.Text = "your not welcome"
        Else
            Label1.Text = "welcome"
        End If
    End Sub
 
0
 

What is your problem?

 
0
 

in form1 there is a checkbox1.checked=true witch it saved in xml file so
i want in load even of splash screen . it read the checked value from form1.Checkbox1
settings if its true or not

is there a way to do it ?


i want splash screen read the checked value of form1.checkbox1 xml settings file and check if its true or not
thats all !


witch that code dose not work

 
0
 

If I understand right: change the type of the setting "form1_checkbox" to Boolean
change the if statement to:

Private Sub SplashScreen1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Settings.form1_checkbox = False Then
            Label1.Text = "your not welcome"
        Else
            Label1.Text = "welcome"
        End If
    End Sub

Not sure how to do xml but somewhere in the code I would add a sub with something like:

Public Sub checkxml()
dim ischkboxchecked as Boolean = false
' Parse the XML to read it and set the ischkboxchecked to the result
My.settings.form1_checkbox = ischkboxchked
end sub
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article