MessageBoxButtons.YesNo
Publicado por Yis (1 intervención) el 29/09/2007 18:09:12
Deseo saber de visual Basic.net 2005 como se programa el MessageBoxButtons.YesNo para que Yes me lleve a un ToolStripMenuItem.Click el código es el siguiente
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim opci As DialogResult
Cont += 1
Puntuacion = Cont * 1
TextBox1.Text = Puntuacion
If Puntuacion = 4 Then
Button1.Visible = False
MessageBox.Show("Eres un Asecin@! Felicidades ")
opci = MessageBox.Show("Desea seguir al siguiente nivel ", opc, MessageBoxButtons.YesNo)
MessageBox.Show(opci.ToString)
End If
End Sub
y quiero q me sirva con lo q sique:
Private Sub PrincipianteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrincipianteToolStripMenuItem.Click
tiempo = 0
TextBox2.Text = life
Timer1.Enabled = True
Timer1.Interval = 1000
Cont = 0
Puntuacion = 0
Button1.Visible = True
Clickno = 0
End Sub
Private Sub IntermedioToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IntermedioToolStripMenuItem.Click
tiempo = 0
Timer1.Enabled = True
Timer1.Interval = 500
TextBox2.Text = life
Cont = 0
Puntuacion = 0
Clickno = 0
Button1.Visible = True
End Sub
Private Sub ExpertoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExpertoToolStripMenuItem.Click
tiempo = 0
Timer1.Enabled = True
Timer1.Interval = 250
TextBox2.Text = life
Puntuacion = 0
Cont = 0
Clickno = 0
Button1.Visible = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim opci As DialogResult
Cont += 1
Puntuacion = Cont * 1
TextBox1.Text = Puntuacion
If Puntuacion = 4 Then
Button1.Visible = False
MessageBox.Show("Eres un Asecin@! Felicidades ")
opci = MessageBox.Show("Desea seguir al siguiente nivel ", opc, MessageBoxButtons.YesNo)
MessageBox.Show(opci.ToString)
End If
End Sub
y quiero q me sirva con lo q sique:
Private Sub PrincipianteToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrincipianteToolStripMenuItem.Click
tiempo = 0
TextBox2.Text = life
Timer1.Enabled = True
Timer1.Interval = 1000
Cont = 0
Puntuacion = 0
Button1.Visible = True
Clickno = 0
End Sub
Private Sub IntermedioToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IntermedioToolStripMenuItem.Click
tiempo = 0
Timer1.Enabled = True
Timer1.Interval = 500
TextBox2.Text = life
Cont = 0
Puntuacion = 0
Clickno = 0
Button1.Visible = True
End Sub
Private Sub ExpertoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExpertoToolStripMenuItem.Click
tiempo = 0
Timer1.Enabled = True
Timer1.Interval = 250
TextBox2.Text = life
Puntuacion = 0
Cont = 0
Clickno = 0
Button1.Visible = True
End Sub
Valora esta pregunta


0