Results 1 to 2 of 2

Thread: API Screen Resolution Call

  1. #1

    Thread Starter
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 2000
    Location
    Beach bound...
    Posts
    510

    Question

    I am following the example from this page to retrieve the Screen Resolution using the API call: GetSystemMetrics. It is returning the X screen value in both variables. Here is my code:

    ScrnResX = GetSystemMetrics(SM_CXSCREEN) & "X" & _ GetSystemMetrics(SM_CYSCREEN)

    The call is returning: 1024X1024 in the string, but it should be returning: 1024X768

    Why is it returning the X screen value twice??? How do I make it return 1024X768????

  2. #2
    Guest
    Try putting it on seperate lines.

    Code:
    resx = GetSystemMetrics(SM_CXSCREEN)
    resy = GetSystemMetrics(SM_CYSCREEN)

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