How to keep your form always on bottom
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 'System & API - How to keep your form always on bottom Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long 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 SetParent Lib "user32" (ByVal hWndChild As Long, _ ByVal hWndNewParent As Long) As Long Private Sub Form_Load() Dim ProgMan&, shellDllDefView&, sysListView& ProgMan = FindWindow("progman", vbNullString) shellDllDefView = FindWindowEx(ProgMan&, 0&, "shelldll_defview", vbNullString) sysListView = FindWindowEx(shellDllDefView&, 0&, "syslistview32", vbNullString) SetParent Me.hwnd, sysListView End Sub |