Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen Resolution

Status
Not open for further replies.

safo2000

Programmer
Jul 9, 2002
46
LB
hello again

you no when u write click on the desktop and choose properties, then u choose setting and tab settings, and u change the resolution....well how can control screen resolution in a VB.NET project.....

help would be great

thanks in advance
 
Not sure about setting it, but in my view it is best to leave that to user discretion

Checking it however can be done quite easily
Code:
Dim sArea As System.Drawing.Rectangle
sArea = Screen.PrimaryScreen.WorkingArea()

'Bigger than Required?
If sArea.Height >= 768 And sArea.Width > 1024 Then
    Me.Size = New Size(1024, 768)
    Me.WindowState = FormWindowState.Normal
    Me.CenterToScreen()
else
    Me.WindowState = FormWindowState.Maximized
end if


Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top