Results 1 to 8 of 8

Thread: Screen resolution

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Posts
    27

    Question

    Hello,
    Please tell me how can i get screen resolution.I had tried the screen class provided by vb itself but it does not give right answer always. so please reply it.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    It works fine for me, you do know that it returns twips instead of pixels right?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Lively Member stever2003's Avatar
    Join Date
    Dec 2000
    Posts
    109

    Screen Resolution

    The screen resolution in pixels is:
    Code:
    Dim ResX As Integer, ResY As Integer
    ResX = Screen.Width / Screen.TwipsPerPixelX     ' Pixels wide
    ResY = Screen.Height / Screen.TwipsPerPixelY     ' Pixels Tall
    If you are using a class that finds the resolution in twips and you want the resolution in pixels, just divide the outputs by Screen.TwipsPerPixel[X/Y].

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    I found out that won't always work... weird, I know!

    Once I made a program that should run fullscreen, but after some tries it just was too small! Screen.Width was too small, I'd say it was the same as Screen.Height...

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Posts
    27

    Re: Screen Resolution

    I am knowing this fact that the value of screen.width & screen.height generally comes equal on my pc and mostly it is worng even after converting into pixels.I am not sure that my vb6 is corrputed or the function is not proper.

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    go to the main graphics section of vbworld they have an article there sorry i dont feel like doing any punctuation because i am really lazy right now sorry about that i hope that this isnt really hard to read i couldnt be bothered with capitals either really sorry i gotta go now see ya bye

    hehe

    Sorry... Hope I help

    ====:|------------------------>
    a horrible ascii picture of a sword it sucks eh
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Guest
    VB Math is wrong, in some cases.

    Another ASCII Sword
    Code:
               />
              />
    {<><><><>::::===============================>
              \>
               \>

  8. #8
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    hey, thats a cool sword!
    I see said the blind man as he spat into the wind.

    It all comes back to me now!

    A.D.T.'s VB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width