Results 1 to 3 of 3

Thread: Window Size?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Sweden
    Posts
    2

    Window Size?

    I have a problem getting my forms size. Do anyone have any houghts about how to get the size.

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    VB Code:
    1. Public Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long
    2. Public Type RECT
    3.         Left As Long
    4.         Top As Long
    5.         Right As Long
    6.         Bottom As Long
    7. End Type
    8.  
    9. Dim R As RECT
    10. GetWindowRect Me.hWnd, R
    11. Width = R.Right - R.Left
    12. Height = R.Bottom - R.Top
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Sweden
    Posts
    2
    thanks

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