Solved

Vb.net program window size

Posted on 2007-03-28
5
310 Views
Last Modified: 2013-11-26
When opening a dialog or program in vb.net is it possible to have the screen maximize to the screen resolution (1024x768, 800x600, etc) automatically? if so, how?
0
Comment
Question by:dprundle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:craskin
ID: 18808675
however you're creating the window, you can usually just set .Width and .Height. this is how i do a similar thing for an IE window:

Dim ie
Set ie=createobject("internetexplorer.application")
With ie
    .navigate "about:blank"
    Do Until .readyState=4
     WScript.Sleep 10
    Loop
    .toolbar=0
    .statusbar=0
    .Top=0
    .Left=0
    .Width=ie.document.parentwindow.screen.availWidth
    .Height=ie.document.parentwindow.screen.availHeight
    .navigate "http://cachetweb"
    .visible=true
End With
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 18808686
Yes...at design-time, in the IDE, set the WindowState() property to Maximized.

Done.
0
 

Expert Comment

by:ParrT
ID: 18808725
two ways:
(Maximize the screen)

dim dlg as new <yourformname>
    dlg.WindowState = FormWindowState.Maximized
dlg.showdialog ....

or to make it not maximised but to change the size to the size of the screen:

dlg.windowstate = formwindowstate.normal
 dlg.Size = Screen.PrimaryScreen.Bounds.Size

(although I am not sure why you would want to do the latter!
0
 

Author Comment

by:dprundle
ID: 18818218
Okay these make the window bigger but dont center the content (buttons and icons)
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 18818348
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question