'boite dialogue de céation de dossier Dim opendir As New FolderBrowserDialog With opendir .ShowNewFolderButton = True If .ShowDialog = Windows.Forms.DialogResult.OK Then MsgBox("" & .SelectedPath & "") 'tu choisis MsgBox(.SelectedPath) Else MessageBox.Show("Opération annulée par l'utilisateur!", "Créer dossier", MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If .Dispose() End With
MessageBox.Show("Monsieur l'utilisateur, veuillez créer un réperoir")
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionDim chemin As String Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim opendir As New FolderBrowserDialog With opendir .ShowNewFolderButton = True If .ShowDialog = Windows.Forms.DialogResult.OK Then chemin = "" & .SelectedPath & "" System.IO.File.CreateText(chemin & "test.txt") Else MessageBox.Show("Opération annulée par l'utilisateur!", "Créer dossier", MessageBoxButtons.OK, MessageBoxIcon.Information) Exit Sub End If .Dispose() End With End Sub
chemin = "" & .SelectedPath & "" System.IO.File.CreateText(chemin & "test.txt")
chemin = .SelectedPath & "" System.IO.File.CreateText(chemin & "test.txt")