How can I open IE windows maximized c#
im using this line to open a IE window, is it posible in code to get it to open in maximized state?
开发者_如何学CSystem.Diagnostics.Process.Start(@"IExplore.exe", "www.google.com");
or control where it opens say like
IEWINDOW.location = new System.Drawing.Point(100, 100);
You can use Process.Start
with a ProcessStartInfo
object which has a WindowStyle
property. You can set that property so that the window starts maximized.
Adapted from the example at Process.Start
:
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
startInfo.Arguments = "www.google.com";
Process.Start(startInfo);
精彩评论