I have two radio btuttons which link me to another form but they have failed to likk me to the forms i directhem to link me to.
i dont know if ther is any problem with my code this is the code. some one to help me
Dim one As boolean Dim two As boolean If one = True Then frmone.Show Else If two = True Then frmsec.Show Else me.hide End if
But how you set the value of the boolean variables ?
See if this helps.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If RadioButton1.Checked Then MsgBox("RadioButton1 is Checked.") If RadioButton2.Checked Then MsgBox("RadioButton2 is Checked.") End Sub
First declare your forms in your main form public class.
Dim showForm2 As New Form2 Dim showForm3 As New Form3
Then in your button click event set your if statements to show which form you need.
If RadioButton1.Checked = True Then showForm2.Show() End If If RadioButton2.Checked = True Then showForm3.Show() End If
Declaring a boolean for this project is redundant because the radio button in itself
is a boolean.
Hope this Helps
P.S If you want people to be able to help you to the best of their abilities please
be sure to post as much of your own source Code as possible otherwise it's pretty difficult to understand what you really want.
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged Form2.Show() End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged Form3.Show() End Sub
This would be the simplest one. Just Try this one.
thank you then let me try it out
Am sorry am new to the language so i keep testing my self
thank you the code worked am looking forward to produce the best
I have an automated API with a secure frontend/backend structure where backend object attributes are hidden with frontend proxy classes.
basically, when accessing an object from the frontend, you get ...
I am working on program that will connect to MySQL database, colect data from table and show them in grid. Where user can edit cell, and then on ...
Let say i have purchase 220 Bids for $30.80 , now i am going to place a bid for a product A, With each new bid the price goes up ...