Page 1 of 1
Text Editor Help.
Posted: Sat Sep 26, 2009 10:47 pm
by Robby
Hi there guys as i said in a post before that i was makign a Text Editor.
I have made a great text editor i think lol
but all i need help in now is when i m opening the file from my desktop the file opens with the text in it.
Yes i have made my own file format so it is kind of difficult to do so and i dont knmow how to do that since i dont think there is a code for that and yea whatever so when i click the icon for the text on my desktop , my text editor should pop up with all i have in it.
If i go to the text editor and go to open and choose the item it works good but not when i click the item.
So yea please help me if u can
Robby1998
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 3:33 am
by Robby
ok now that works but when i open the file on my desktop this comes in before the text on the richtextbox1
this is what comes:
{\rtf1\ansi\ansicpg1252\deff0\deflang4105{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 gdfgdfgdfgdf\par
}
the text i used in this was the
gdfgdfgdfgdf part so it shows the font and size and some other stuff as well so plese help me fix that if there is a way
Robby1998
P.S i figured out a way for the app to display the text but the problem persists upwards
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 1:28 pm
by CodenStuff
Hello robby1998,
How are you opening your application and loading the file contents into your richtextbox?
.
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 2:27 pm
by Robby
ummm i use a openfiledialog and it is not the component i used the "dim" with it so i did Dim dlg as new openfiledialog
and so when ever i load my file from the desktop icon it loads it with text in it but the text includes the font text and size text and some other jibrish so then finally at the end appears my line or stuff that i wrote in it.
And also i use a new file format as .tppf so it is no more .txt now for my editor it it .tppf
Regards,
Robby1998
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 2:28 pm
by Robby
O yea and here take this source i will send u in private message and please tell me what i should add in and add out so the program works good.
Thanks, and Regards,
Robby1998
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 2:39 pm
by CodenStuff
robby1998 wrote:O yea and here take this source i will send u in private message and please tell me what i should add in and add out so the program works good.
Thanks, and Regards,
Robby1998
Hello,
Ok I will take a look when you send it and see what I can do cooll;
Thank you.
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 2:57 pm
by Robby
ok now i will send u the source so yea thanks to you that i m getting better at coding
Im still learning but i have learned alot fro mthis website which is awesome!
Thanks for the website and now i will send u the source =P
Robby1998
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 8:02 pm
by CodenStuff
Hello,
Just incase my PM didnt work.
Code: Select all Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each Arg As String In Environment.GetCommandLineArgs
If Arg.ToLower.EndsWith(".tppf") Then
Try
If System.IO.File.Exists(Arg) Then
RichTextBox1.LoadFile(mean, RichTextBoxStreamType.RichText)
End If
Catch ex As Exception
If System.IO.File.Exists(Arg) Then
RichTextBox1.LoadFile(mean, RichTextBoxStreamType.PlainText)
End If
End Try
End If
Next
End Sub
Happy coding! cooll;
Re: Text Editor Help.
Posted: Sun Sep 27, 2009 10:02 pm
by Robby
umm... Thanks for the code.
The one u posted in the Pm worked but this one has a problem with the mean or something.
The one in the pm had arg so it worked
Thanks So Much
Robby1998