text - C# Console Application: How do I open a textfile maximized? -
hello! (i'm new stackoverflow)
i have question concerning c# console.
i want open .txt file in same directory. code (the name of text file readme.txt):
string path = system.io.directory.getcurrentdirectory() + @"\readme.txt"; string[] filecontents = system.io.file.readalllines(path); system.diagnostics.process.start(path);
the code works fine, want text file opened maximized. how make this?
by specifying processstartinfo parameters:
string notepadpath = environment.systemdirectory + "\\notepad.exe"; var startinfo = new processstartinfo(notepadpath) { windowstyle = processwindowstyle.maximized, arguments = "readme.txt" }; process.start(startinfo);
Comments
Post a Comment