Article ID: 187740
Article Last Modified on 5/13/2003
Public Property Get hWnd() As Long
hWnd = UserControl.hWnd
End Property
Private Sub UserControl_Resize()
Debug.Print "Resize!"
End Sub
Private Declare Function MoveWindow Lib "user32" (ByVal hWnd As _
Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, _
ByVal nHeight As Long, ByVal bRepaint As Long) As Long
Private Sub Form_Load()
Me.ScaleMode = vbPixels
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Static Chop As Boolean
Chop = Not Chop
With UserControl1
If Chop Then
Call MoveWindow(.hWnd, X, Y, .Width \ 2, .Height \ 2, True)
'.Move X, Y, .Width \ 2, .Height \ 2 'VB Move Method
Else
Call MoveWindow(.hWnd, X, Y, .Width * 2, .Height * 2, True)
'.Move X, Y, .Width * 2, .Height * 2 'VB Move Method
End If
End With
End Sub
Additional query words: kbDSupport kbDSD kbVBp kbVBp500 kbCtrl kbVBp600
Keywords: kbprb KB187740