Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Need help with visual basic please
I've tried so hard by myself and I've just ended up confusing myself as it's my first time using vb.
I didn't want to waste anyones time but I'm sorry I just don't know what to do..
How would I code this?
I want to make a progress bar that runs when a button is clicked.
However there is also a checkbox and textbox that affect the whole thing.
If the checkbox is checked and there are characters in the text box, the button works and starts the progress bar.
If the checkbox isn't checked and/or the textbox is empty, an error message comes up when the button is pressed.
I can almost code it but I get stuck at[code] Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If String.IsNullOrEmpty(TextBox1.Text) Then
Button1.Enabled = False
Button1.Enabled = True
If CheckBox1.Checked = False Then
Button1_Click(MsgBox("Error. The checkbox must be ticked"))[/code]
As you probably know, that isn't right but I just don't know what to do next
Please help thankyou so much.
0 · ·