Example on changing child and parent window at runtime using API calls
Example on changing child and parent window at runtime using API calls
API Declarations
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Rate Example on changing child and parent window at runtime using API calls
(1(1 Vote))
'//
Private Sub Form_Load()
'Get the taskbar's window handle
tWnd = FindWindow("Shell_TrayWnd", vbNullString)
'Get the start-button's window handle
bWnd = FindWindowEx(tWnd, ByVal 0&, "BUTTON", vbNullString)
'changes start button parent
SetParent bWnd, Me.hwnd
End Sub
Private Sub Form_Unload(Cancel As Integer)
'reset parent
SetParent bWnd, tWnd
End Sub
Example on changing child and parent window at runtime using API calls Comments
No comments yet — be the first to post one!
Post a Comment