{vb.net} De Textbox a string
Résolu
relax.
Messages postés
380
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
A voir également:
- {vb.net} De Textbox a string
- Vli product string - Forum Disque dur / SSD
- Vba textbox date format dd/mm/yyyy ✓ - Forum VB / VBA
- Vb.net express - Télécharger - Langages
- System.io.__error.winioerror(int32 errorcode, string maybefullpath) - Forum Windows
- Textbox date ✓ - Forum VB / VBA
1 réponse
Bonjour,
Exemple type :
Cdt
Lupin
Exemple type :
Public Class Form1 Private mVariable As String = String.Empty Public Property Variable() As String Get Dim oldVal As String = Me.TextBox1.Text If Not (String.IsNullOrEmpty(oldVal)) Then Me.mVariable = oldVal End If Return Me.mVariable End Get Set(ByVal value As String) Me.mVariable = value End Set End Property Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click OpenFileDialog1.InitialDirectory = "AppPath" OpenFileDialog1.RestoreDirectory = True OpenFileDialog1.Filter = "All files(*.*)|*.*" OpenFileDialog1.Title = "file selector BETA" OpenFileDialog1.FileName = "Select a file" If OpenFileDialog1.ShowDialog() = DialogResult.OK Then TextBox1.Text = OpenFileDialog1.FileName Variable = TextBox1.Text End If End Sub End Class
Cdt
Lupin
ça ne pose pas problème ?
non, ce n'est pas selon la norme, mais c'est fonctionnel :-)
Cdt
Lupin