Bonsoir, je désire faire un
sur le bouton annuler d'un FolderBrowserDialog dont voici le
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
Dim FD As FolderBrowserDialog
                FD = New FolderBrowserDialog
                FD.Description = "Selectionner un dossier"
                FD.RootFolder = Environment.SpecialFolder.MyComputer
                FD.ShowDialog()
 
                SelectionUploadTxtBox.Text = (FD.SelectedPath)
 
                Dim fileName As String = System.IO.Path.GetFileNameWithoutExtension(SelectionUploadTxtBox.Text)
                SelectionCompressionUploadTxtBox.Text = "c:\ftp\script\" & fileName
ainsi que celui du OpenFileDialog
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
Dim myStream As Stream
                Dim openFileDialog1 As New OpenFileDialog()
 
                openFileDialog1.InitialDirectory = "c:\"
                openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
                openFileDialog1.FilterIndex = 2
                openFileDialog1.RestoreDirectory = True
 
 
                If openFileDialog1.ShowDialog() = DialogResult.OK Then
                    myStream = openFileDialog1.OpenFile()
                    If Not (myStream Is Nothing) Then
                        'inscrit le fichier choisi dans le textboxFichuplo
                        SelectionUploadTxtBox.Text = (openFileDialog1.FileName)
                        myStream.Close()
                    End If
                End If
Merci de votre aide