Code:Private Sub Command1_Click() Dim lStyle As Long lStyle = GetWindowLong(dhwnd, GWL_STYLE) lStyle = lStyle And (Not MY_WS_DOCK) SetWindowLong dhwnd, GWL_STYLE, lStyle SetParent dhwnd, Picture1.hwnd MoveWindow dhwnd, 0, 0, Picture1.ScaleWidth / Screen.TwipsPerPixelX, Picture1.ScaleHeight / Screen.TwipsPerPixelY, True End Sub Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long Public 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 Public Const WS_CAPTION = &HC00000 'Window with a title bar and border Public Const WS_THICKFRAME = &H40000 'Create a window with a sizing border. Public Const WS_SYSMENU = &H80000 'Create a window with a system menu on its 'Title bar. Must be combined with WS_CAPTION Public Const MY_WS_DOCK = WS_CAPTION Or WS_THICKFRAME Or WS_SYSMENU Public Const GWL_STYLE = (-16)
That will remove the window border for destinator, should be same principle.



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks