+ Reply to Thread
Results 1 to 2 of 2

find out users resolution

Hybrid View

  1. #1
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500

    find out users resolution

    I have a userform which I would like it to stretch to the max size of the screen? Is this possible?

    If it is will this keep this in the right position and just basically zoom in?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello FunkymonkUK,

    Here is the API code to return the screen resolution.

    Delcare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long
    
    Const SM_CXSCREEN As Long = 0
    Const SM_CYSCREEN As Long = 1
    
    Public Function ScreenWidth() As Long
     ScreenWidth = GetSystemMetrics(SM_CXSCREEN)
    End Function
    
    Public Function SreenHeight() As Long
     ScreenHeight = GetSystemMetrics(SM_CYSCREEN)
    End Function
    Hope this helps,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1