Page 1 of 1

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

Posted: Fri Jun 20, 2008 7:53 pm
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

Posted: Fri Jun 20, 2008 11:05 pm
by SetoTK
yea they are just executable text files, and will work in ANY text editor,

Posted: Sat Jun 21, 2008 12:32 am
by froggyboy604
Also, should I also make an encoding combo box for "Ansi, unicode, unicode big endian, utf-8" like notepad?

Posted: Sat Jun 21, 2008 1:47 am
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

Posted: Sat Jun 21, 2008 5:36 am
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.