18-04-20, 12:41 AM
18-04-20, 01:42 AM
PHP كود :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sfd As New SaveFileDialog
sfd.Filter = "NotePad (*.txt)|*.txt"
If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
My.Computer.FileSystem.WriteAllText(sfd.FileName, TextBox1.Text, True)
End If
End Sub
18-04-20, 02:49 AM
(18-04-20, 01:42 AM)asemshahen5 كتب : [ -> ]PHP كود :
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sfd As New SaveFileDialog
sfd.Filter = "NotePad (*.txt)|*.txt"
If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
My.Computer.FileSystem.WriteAllText(sfd.FileName, TextBox1.Text, True)
End If
End Sub
شكران لحضرت بس بعد ازنك ممكن سؤل اخر
هو في كود يخليني افتح ورقه دخل تكست بوكس وشكران
18-04-20, 01:08 PM
PHP كود :
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim ofd As New OpenFileDialog
ofd.Filter = "NotePad (*.txt)|*.txt"
If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
TextBox1.Text = My.Computer.FileSystem.ReadAllText(ofd.FileName, System.Text.Encoding.UTF8)
End If
End Sub