How can I force the window that opens when I run a website from Visual Studio to be maximized? Everytime I run my site VS automatically resizes the window to something that seems arbitrary.
A:
Go into the project settings - Web - Start Action, and set it to be "External program" with start.exe and command line arguments of
/MAX http://localhost:12345/myproject/default.aspx (or whatever)
This will open default.aspx in a maximized window, but only if you don't have any other IE windows open - if you do (and you have IE7) - you'll just get a tab in one of those windows instead.
This will probably keep your debugger from attaching to the iexplore process and may indeed return immediately because start.exe only runs for a second. You may have to manually attach to the iexplore.exe process.
But it doesn't involve a bunch of window-manipulating JavaScript.
Aric TenEyck
2009-05-14 17:26:19
Where is start.exe? I did a complete search of my hard drive and did not find it.
Matthew Jones
2009-05-14 18:27:05
My mistake - it appears to be a command on Vista. On earlier Windows OSes, it was a program that could be run. Try entering 'start' into that box anyway, but it might not work.
Aric TenEyck
2009-05-14 19:06:22