I have a program below that I want to display when checkbox is checked and hide when unchecked. I created a Message Label for it but the thing is that when its unchecked, my messagelabel and message displays.... Pls is there a way I can hide the message without the message label disappearing too?

This is the code i have already.

 CheckboxMsgLabel.Text = "All Members Receive a 10% Discount"
        CheckboxMsgLabel.Visible = MembersbeneCheckBox.Checked

From the code above:

    Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            CheckboxMsgLabel.Visible = True
            CheckboxMsgLabel.Text = "All Members Receive a 10% Discount"
        Else
            CheckboxMsgLabel.Visible = False
        End If
    End Sub

Thanks for ur help. With Label border, you will notice the difference when checked and unchecked... I hope you understand what i mean? I want "all members receive a 10% discount" to hide and the message label still show. Again, I'm trying to clear radiobutton and the message label at the same time... only one works. Pls

Visible property will all of solve that, just have a try in your own. First example given, gave you a guide already.

I got it fixed... thanks of ur helps

Sorry for my post by the way, I'm in hurry during that time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.