X
x38class
Guest
I have taken some code from:
Windows At Back-VBForums
it is supposed to be code to keep my form at the bottom when I shell other apps as my current app sometimes has the main form on top of the shelled app, eg if I shell thunderbird my main form is sitting on top, I want it to always stay on the bottom.
the code is:
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
the error is in the last line for "Me.hwnd", obviously it is incomplete or totally wrong, any suggestion of a correction would be appreciated
Continue reading...
Windows At Back-VBForums
it is supposed to be code to keep my form at the bottom when I shell other apps as my current app sometimes has the main form on top of the shelled app, eg if I shell thunderbird my main form is sitting on top, I want it to always stay on the bottom.
the code is:
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
the error is in the last line for "Me.hwnd", obviously it is incomplete or totally wrong, any suggestion of a correction would be appreciated
Continue reading...