Imports System.IO
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Save File In .txt (Notepad)
Dim Save As New SaveFileDialog()
Dim myStreamWriter As System.IO.StreamWriter
Save.Filter = "Text [*.txt*]|*.txt"
Save.CheckPathExists = True
Save.Title = "Save File"
Save.ShowDialog(Me)
Try
myStreamWriter = System.IO.File.AppendText(Save.FileName)
myStreamWriter.Write(TextBox1.Text)
myStreamWriter.Flush()
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If SaveFileDialog1.ShowDialog = DialogResult.OK Then
System.IO.File.WriteAllText(SaveFileDialog1.FileName, TextBox1.Text)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SaveFileDialog1.Filter = "Word Documents|*.doc"
End Sub
End Class
Recent Posts
- About Us08 Sep 20200
This blog about free Visual Basic and HTML CSS Coding to help you. we have placed here free coding which you can use in your project and website...Read more »
- How To Redirect Page After Some Time In Javascript18 Apr 20200
For current page var timer= setTimeout(function() { window.location='http://google.com' },3000); For open in new tab ...Read more »
- Drop down Link Html Open In New Window16 Apr 20200
> Select Here Link Name1 Link Name2 Link Name3 Link Name4 Link Name5 Link Name6 pre { font-family: "Calibri"; font-size: 10px; ...Read more »
- Drop down Link Html Open In Current Window16 Apr 20200
Select Here Link Name1 Link Name2 Link Name3 Link Name4 Link Name5 Link Name6 pre { font-family: "Calibri"; font-size: 10px; ...Read more »
- create analog clock in vb.net13 Nov 20191
Imports System.Drawing.Drawing2D Public Class Form1 Dim Minute1 As Bitmap Dim Second1 As Bitmap Dim HourP As Bitmap Dim Height1, W...Read more »
thanks
ReplyDelete