Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class form1
- '+--------------------+
- '| Par legameur6810 |
- '+--------------------+
- Dim path_ As String = "" 'On déclare une variable.
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim sw As New System.IO.StreamWriter(path_)'On ouvre le document
- sw.WriteLine("Code par legameur6810")'On inscris le code du documents
- sw.WriteLine("")
- sw.WriteLine("La c'ecris ce que je veux et cettes commandes meut permte d'ecrire en sautant une ligne")
- sw.Close()'On ferme le document
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim sfd As New SaveFileDialog 'On ouvre une fenêtre de dialoges
- sfd.Filter = "Fichier text |*.txt*" 'On precises que cest que les document texte
- sfd.FileName = "mondocument.txt" 'On propose un nom de départ
- sfd.Title = "Enregistrer" 'On met le nom de la fenêtre de dialoge
- If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
- 'PAS TOUCHER ICI
- path_ = sfd.FileName
- Path.Text = path_
- Button1.Enabled = True
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment