[Quote=引用 2 楼 homeyone 的回复:]
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
Dim dHwnd As Long
Dim tHwnd As Long
dhwnd=findwindow("ThunderFormDC","Form1")
if dhwnd>0 then
thwnd=findwindowex(dhwnd,byval 0&,"Shell Embedding",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"Shell DocObject View",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"Internet Explorer_Server",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"MacromediaFlashPlayerActiveX",vbnullstring)
end if
end if
end if
end if
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
Dim dHwnd As Long
Dim tHwnd As Long
dhwnd=findwindow("ThunderFormDC","Form1")
if dhwnd>0 then
thwnd=findwindowex(dhwnd,byval 0&,"Shell Embedding",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"Shell DocObject View",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"Internet Explorer_Server",vbnullstring)
if thwnd>0 then
thwnd=findwindowex(thwnd,byval 0&,"MacromediaFlashPlayerActiveX",vbnullstring)
end if
end if
end if
end if