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.
当我从Visual Studio运行网站时,如何强制打开的窗口最大化?每次我运行我的网站时,VS会自动将窗口大小调整为看似随意的内容。
2 个解决方案
#1
After your browser window has been opened once (as not maximized) press the maximize button. Then HOLD ctrl key and press the close button ('X'). Then you may release the ctrl key.
浏览器窗口打开一次后(如未最大化)按最大化按钮。然后按住Ctrl键并按下关闭按钮('X')。然后你可以释放ctrl键。
Next time your window will be open as maximized (holding ctrl key while pressing close forces windows to remember the window's last state)
下次你的窗口将被打开为最大化(按住ctrl键同时按下关闭强制窗口以记住窗口的最后状态)
#2
Go into the project settings - Web - Start Action, and set it to be "External program" with start.exe and command line arguments of
进入项目设置 - Web - 启动操作,并使用start.exe和命令行参数将其设置为“外部程序”
/MAX http://localhost:12345/myproject/default.aspx (or whatever)
/ MAX http:// localhost:12345 / myproject / default.aspx(或其他)
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.
这将在最大化窗口中打开default.aspx,但前提是您没有打开任何其他IE窗口 - 如果您这样做(并且您有IE7) - 您只需在其中一个窗口中获取选项卡。
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.
这可能会使您的调试器无法附加到iexplore进程,并且可能确实立即返回,因为start.exe只运行一秒钟。您可能必须手动附加到iexplore.exe进程。
But it doesn't involve a bunch of window-manipulating JavaScript.
但它不涉及一堆操纵窗口的JavaScript。
#1
After your browser window has been opened once (as not maximized) press the maximize button. Then HOLD ctrl key and press the close button ('X'). Then you may release the ctrl key.
浏览器窗口打开一次后(如未最大化)按最大化按钮。然后按住Ctrl键并按下关闭按钮('X')。然后你可以释放ctrl键。
Next time your window will be open as maximized (holding ctrl key while pressing close forces windows to remember the window's last state)
下次你的窗口将被打开为最大化(按住ctrl键同时按下关闭强制窗口以记住窗口的最后状态)
#2
Go into the project settings - Web - Start Action, and set it to be "External program" with start.exe and command line arguments of
进入项目设置 - Web - 启动操作,并使用start.exe和命令行参数将其设置为“外部程序”
/MAX http://localhost:12345/myproject/default.aspx (or whatever)
/ MAX http:// localhost:12345 / myproject / default.aspx(或其他)
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.
这将在最大化窗口中打开default.aspx,但前提是您没有打开任何其他IE窗口 - 如果您这样做(并且您有IE7) - 您只需在其中一个窗口中获取选项卡。
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.
这可能会使您的调试器无法附加到iexplore进程,并且可能确实立即返回,因为start.exe只运行一秒钟。您可能必须手动附加到iexplore.exe进程。
But it doesn't involve a bunch of window-manipulating JavaScript.
但它不涉及一堆操纵窗口的JavaScript。