Need help making "Save function" for a text editor I am making.

Need help in the world of technology? Here is the section for you, or talk about your favourite tech related topic, or what is new in the world of tech here.
Post Reply
User avatar
froggyboy604
Anime music gaming Fanatic
Posts: 37749
Joined: Thu Aug 18, 2005 11:28 pm
Contact:

Need help making "Save function" for a text editor I am making.

Post by froggyboy604 »

Are PHP, ini, bat, xml just types of files that can be edited in any text editors or do they only work for specific types of text editors like notepad.

Download link : http://www.mxproject.com/freehost/frogg ... itor_2.zip

My VB Save as Procedure for my Text/Website maker program. Whould my created PHP, ini, bat, xml file work in my editor like notepad created files.
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAToolStripMenuItem.Click
Dim Save As New SaveFileDialog()
Dim mystreamwriter As System.IO.StreamWriter
Save.Filter = "Webpage(*.htm)|*.htm|Text(*.txt)|*.txt |PHP(*.php)|*.php |INI(*.ini)|*.ini|BAT(*.bat)|*.bat|XML (*.xml)|*.xml|All Files(*.*|*.*"
Save.CheckPathExists = True
Save.Title = "Save File"
Save.ShowDialog(Me)
Try
mystreamwriter = System.IO.File.AppendText(Save.FileName)
mystreamwriter.Write(xHTMLcodeTB.Text)
mystreamwriter.Flush()
Catch ex As Exception
'Do nothing on Exception
End Try

End Sub
SetoTK
Low flying mountains just to the right.
Posts: 5093
Joined: Tue Aug 16, 2005 8:34 pm
Location: localhost
Contact:

Post by SetoTK »

yea they are just executable text files, and will work in ANY text editor,
I never really understood Thursdays.
User avatar
froggyboy604
Anime music gaming Fanatic
Posts: 37749
Joined: Thu Aug 18, 2005 11:28 pm
Contact:

Post by froggyboy604 »

Also, should I also make an encoding combo box for "Ansi, unicode, unicode big endian, utf-8" like notepad?
SetoTK
Low flying mountains just to the right.
Posts: 5093
Joined: Tue Aug 16, 2005 8:34 pm
Location: localhost
Contact:

Post by SetoTK »

froggyboy604 wrote:Also, should I also make an encoding combo box for "Ansi, unicode, unicode big endian, utf-8" like notepad?
Aye sure,

though whats the purpose of the app in the long run?

as taht link seems to go to your web page coding generator
I never really understood Thursdays.
User avatar
froggyboy604
Anime music gaming Fanatic
Posts: 37749
Joined: Thu Aug 18, 2005 11:28 pm
Contact:

Post by froggyboy604 »

I'm using my Website generator because most of the text editor codes for the text editor are already coded into it, so it is a good foundation for making a text editors. Plus, my final project which is my Website generator has to be handed in for marking next week, so I'm also finishing up my VB homework at the same time.

I am going to make a text editor to add the functions I use like New, open, Save as, copy, cut, paste, select all, while getting rid of the functions I rarely use like "Print, Page setup, go to, delete format, insert Time/Date, Find , Find Next, replace, Format, view status bar, Help, help dialog box, about, etc.

I also want to make the save as and open dialog box have files I actually use like .htm, .txt, .php, .xml, .bat , *.* since Notepad++ have a huge list of save as and open file types while notepad has only .txt and *.*

I am starting to think I have too much time on my hand.
Post Reply