Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type
Private Declare Function CopyRect Lib "user32" (lpDestRect As RECT, lpSourceRect As RECT) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim rectWindow As RECT, rectCopy As RECT
    'Get the bounding rectangle of this window
    GetWindowRect Me.hwnd, rectWindow
    'Copy the rectangle
    CopyRect rectCopy, rectWindow
    MsgBox "This form's width:" + Str$(rectCopy.Right - rectCopy.Left) + " pixels"
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/