Inviter l'utilisateur a creer un réperoir

Résolu
ymrabet - 10 juin 2013 à 09:42
 Utilisateur anonyme - 10 juin 2013 à 23:59
Bonjour

je souhaite savoir comment inviter l'utilisateur a creer un réperoir en VB 2010
Merci

8 réponses

cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 137
10 juin 2013 à 11:43
Bonjour,

Essaie ceci:

 '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



@+ Le Pivert
3
Bonjour ymrabet.

À question bizarre, réponse bizarre :

MessageBox.Show("Monsieur l'utilisateur, veuillez créer un réperoir")


Mais qu'est-ce donc qu'un réperoir ?

Cordialement.

Étant illettré, je signe d'une croix : ×
0
Désolé je voulais dire repertoire, en faite je veux comme:
OpenFileDialog1.ShowDialog()
Form2.TextBox31.Text = OpenFileDialog1.FileName

Mais au lieu d'ouvrir un fichier, inviter la personne a creer un repertoire et mettre le chemin du répertoire dans une Textbox par exemple

Merci
0
Utilisateur anonyme
10 juin 2013 à 12:14
Bonjour,

Reperoir:
(Sciences et techniques spatiales-Télédétection spatiale) Point de repère connu dans un système de coordonnées tridimensionelles.


Cordialement


CF2i - Guadeloupe
Ingénierie Informatique
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Merci Le Pivert

c'est exactement ce que je voulais.. merci
0
Désolé encore une petite question sur le meme sujet:
je souhaite creer un fichier test1 dans le répertoire crée

j'ai fais ca mais ca ne marche pas...
objStreamWriter1 = System.IO.File.CreateText(".SectedPath\test1.txt")

Merci de ton aide
0
cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 137
10 juin 2013 à 19:11
voilà:

  Dim 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



@+ Le Pivert
0
Utilisateur anonyme
10 juin 2013 à 23:59
Bonjour Le Pivert,

Je n'ai pas bien compris le:
 
chemin = "" & .SelectedPath & "" 
System.IO.File.CreateText(chemin & "test.txt")


C'est plutôt:
chemin = .SelectedPath & "" 
System.IO.File.CreateText(chemin & "test.txt")

MessageBox.Show("Monsieur l'utilisateur, votre réperoir '" & chemin & "' ainsi que votre fichier 'test.txt'" )
/code

Non ???


Cordialement


CF2i - Guadeloupe
Ingénierie Informatique
0
Rejoignez-nous