Maximize your web form
-
Could any one tell me how to maximize a form within a web project in C#? I cannot find a direct way to do this unless it is a traditional Windows application where you simply code something like "MyForm.Maximize = true;". Thanks. William
Because you're working within a web page and are subject to the object model exposed by the browser (and you're limited in what you can do anyway). You can either add some client-side JavaScript to the page that uses the
screen
object or open a popup window usingwindow.open
that specifies the initial settings (which you get from thescreen
object). All major browsers expose such an object (it is part of the HTML DOM, after all). If you need additional help, please ask in the Web Development[^] forum. With client-side scripting, this has nothing to do with C# (which is a managed language you would find either in an ASP.NET server application that simply constructs client-side HTML, JavaScript, images, etc.) or in a Windows Forms control to be hosted in an HTML page (like an ActiveX control). This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]