Controling the Window size of an application launched from C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have looked everywhere on how to set the size of a window of a process that
is being launched from a C# app and can't seem to figure out how to do it.
This used to be in the startupinfo structure in Win32 programming but it
seems to be missing out of the ProcessStartInfo class.
Does anybody know how to do this?

Thanks,

Oldman
 
You could use the WindowStyle property of the ProcessStartInfo class. Example
below.

ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Normal;
startInfo.Arguments = "www.northwindtraders.com";
Process.Start(startInfo);
 
This is just the state of the window. I need to set the actual size of the
window.
For example, I want to be able to say open a process in a 400X600 window.
 
Back
Top