find monitor resolution

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
mr_penguin





Posts: 541
Joined: Thu Feb 08, 2007 5:39 pm
Location: NJ

find monitor resolution

Post by mr_penguin »

how can I make a button find my monitor's resolution and display it in a label? I'm using VB
Your mom became oversized. Please make your mom smaller before reposting. :shock:
Infern0 wrote:You just shave the excess bush and burn the leftovers.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

Code: Select all

    Private Sub btnGetResolution_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetResolution.Click
        Dim X As Integer = Screen.PrimaryScreen.Bounds.Width
        Dim Y As Integer = Screen.PrimaryScreen.Bounds.Height

        lblResolution.Text = "Resolution: " & X & "x" & Y
    End Sub
click16





Posts: 228
Joined: Wed Jun 13, 2007 11:34 am
Location: in a room on my computer, school, friends houses, many other places!

Post by click16 »

do you know how to convert an integer to a system.drawing.point ?
Last edited by click16 on Wed Mar 26, 2008 11:41 am, edited 1 time in total.
User avatar
Tural




Conceptionist Acolyte Bloodhound Recreator
Socialist Connoisseur Droplet Scorched Earth
Grunge

Posts: 15628
Joined: Thu Jun 16, 2005 3:44 pm
Location: Lincoln, NE
Contact:

Post by Tural »

What are you ultimately trying to do?
click16





Posts: 228
Joined: Wed Jun 13, 2007 11:34 am
Location: in a room on my computer, school, friends houses, many other places!

Post by click16 »

I'm trying set the location of my app so it works on all resolutions
Patrickssj6




Pi Collaborator

Posts: 5426
Joined: Sat Jul 24, 2004 12:12 pm
Location: I'm a Paranoid
Contact:

Post by Patrickssj6 »

Code: Select all

Me.Location = New Point (x,y)
Last edited by Patrickssj6 on Thu Mar 27, 2008 6:36 am, edited 1 time in total.
...left for good
mr_penguin





Posts: 541
Joined: Thu Feb 08, 2007 5:39 pm
Location: NJ

Post by mr_penguin »

Thanks, and I see click just asked my second question.
Your mom became oversized. Please make your mom smaller before reposting. :shock:
Infern0 wrote:You just shave the excess bush and burn the leftovers.
Post Reply