hello tout le monde
j'ai un petit soucis en vb si une personne connait un peu la programmation
j'ai fait un bloc note en vb avec un richtextbox
je voulait faire un bouton édition annuler
mais alors la je suis perdu!
je voulait juste quand j'appuie sur le bouton annuler sa annule la dernière opération
voici mon code que j'ai fait mais qui ne marche pas
Code :
- Private Sub AnnulerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AnnulerToolStripMenuItem.Click
- Dim monstring1 As String
- RichTextBox.Text = MonString1
- End Sub
- Private Sub RichTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox.TextChanged
- Dim monstring1 As String
- Dim monstring2 As String
- monstring1 = monstring2
- monstring2 = RichTextBox.Text
- End Sub
|
et dans monstring1 = monstring2 il souligne monstring2 et dit:La variable 'monstring2' est utilisée avant qu'une valeur ne lui ait été assignée. Une exception de référence null peut se produire au moment de l'exécution
pouvez vous m'aider