Answer the question
In order to leave comments, you need to log in
Text editor in Pascal ABC.NET, opening a file with a program from explorer?
So, there is a simple homemade text editor in Pascal ABC .Net. He knows how to open and save files through dialog boxes in the program itself. Question: how to make it so that when opening a text file through the explorer (open with help -> "my editor"), it immediately opens and displays text in the text box? It just starts up for me and I need to open the file through a dialog box. Thanks
Answer the question
In order to leave comments, you need to log in
Hold on, buddy:
//Let's look at the command line arguments
//If their number = 1, then open
if CommandLineArgs.Length = 1 then
OpenFile(CommandLineArgs[0]);
where openfile(filename:string) is a procedure that opens both a file and reads data from it, filename is the full path to the file. CommandLineArgs[0]-argument (path to the file) that the OS gives us.
That's it. And there, work with textbox, as you know. I'm now doing a text editor myself for a fan of Pascal abs, it's already almost the level of a full-fledged notepad and higher.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question