Skúšam sa naučiť niečo v C#. Kód nižšie som vo VB urobil za niekoľko sekúnd. V C# sedím nad tým hodiny a výsledok je nulový. Vie niekto poradiť? Ďakujem.
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Form2.ShowDialog()
End Sub
End Class
Public Class Form2
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Form1.Button1.Text = "Toto je Vb .NET"
Me.Close()
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Form3.Show()
End Sub
End Class
Public Class Form3
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Form1.Button1.Text = "Kde je C#?"
Form2.Close()
Me.Close()
End Sub
End Class
|