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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -