We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,188 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

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
3
Contributors
3
Replies
10 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
gozo12
Light Poster
34 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

What is your problem?

Pgmer
Practically a Posting Shark
881 posts since Apr 2008
Reputation Points: 60
Solved Threads: 158
Skill Endorsements: 1

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

gozo12
Light Poster
34 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
austinp1
Newbie Poster
1 post since Sep 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0619 seconds using 2.68MB