0

hi...
I got project from my lecture. the project is create own document file editor like microsoft word(.doc) but my own document file save as my own type like(*.zc) using Visual basic.net desktop application

*.zc just can read on my own application reader but other reader can't read my file content
could anyone help me ?
thanks

Edited by zuvefox: n/a

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by codeorder
0

1.Add a TextBox To your Form And .add this to your code.window, type some.sh.t in the TextBox when app running, .Close app and .Reload.

Imports System.IO
Public Class Form1
    Private myFile As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\theCoolestFile.with.My.Own.File.Extension"

    Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        IO.File.WriteAllText(myFile, TextBox1.Text)
    End Sub

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        If IO.File.Exists(myFile) Then TextBox1.Text = IO.File.ReadAllText(myFile)
    End Sub
End Class
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.