2010-12-14 123 views

回答

3

使用JavaScript

Button1.Attributes.Add("onclick","window.open('Default.aspx','','fullscreen=yes')"); 

不完全是全屏,但相当类似

0

也许你可以发送一个F11键按下从您的应用程序的命令,一旦它的装逼你的浏览器进入全屏模式?

我怀疑是否有这样做的干净方式,因为F11全屏命令是由您的互联网浏览器处理的。

0

我想OP是在谈论asp.net应用程序,所以这里的“程序”是浏览器。

如果这是真的,你需要客户端JavaScript来做到这一点。是这样的:

<script language="JavaScript1.2"> 
top.window.moveTo(0,0); 
if (document.all) 
    { top.window.resizeTo(screen.availWidth,screen.availHeight); } 
else if (document.layers || document.getElementById) { 
    if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) 
    { 
     top.window.outerHeight = top.screen.availHeight; 
      top.window.outerWidth = top.screen.availWidth; 
    } 
} 
</script> 
  • 的Internet Explorer的document.all工作而document.layers适用于其他浏览器。
  • top指的是窗口对象层次结构中所有其他窗口之上的窗口。
  • top.window.moveTo(0,0)将显示顶部窗口在这些坐标即。屏幕的左上角。
  • resizeTo(x,y)会将窗口大小调整为指定的大小。
  • availWidth和availHeight是可以检测可用屏幕空间的屏幕对象的属性。

希望这有助于...