Public Const WS_EX_APPWINDOW As Integer = &H40000įunction ProcessIsActiveWindow ( ByVal hWnd As Integer ) As Boolean Dim _windowText As New StringBuilder ( 255 ) Dim _windowIsOwned As Boolean Dim _windowStyle As Integer Add (_windowText ) End If Return True End Function Public Const GWL_EXSTYLE As Integer = ( - 20 ) Public Const WS_EX_TOOLWINDOW As Integer = &H80 GetWindowText (hWnd, _windowText, 255 ) If ProcessIsActiveWindow (hWnd ) Then ClickĮnumWindowsDllImport ( New EnumWindowsCallback ( AddressOf FillActiveWindowsList_InListBox ), 0 ) End Sub Function FillActiveWindowsList_InListBox ( ByVal hWnd As Integer, ByVal lParam As Integer ) As Boolean Dim _windowText As New StringBuilder ( 255 ) Public Shared Function EnumWindowsDllImport ( ByVal callback As EnumWindowsCallback, _īyVal lParam As Integer ) As Integer End Function Public Declare Sub GetWindowText Lib "user32.dll" _Īlias "GetWindowTextA" ( ByVal hWnd As Integer, _īyVal nMaxCount As Integer ) Public Declare Function GetWindowLong Lib "user32.dll" _Īlias "GetWindowLongA" ( ByVal hwnd As Integer, _īyVal nIndex As Integer ) As Integer Public Declare Function GetWindow Lib "user32.dll" _Īlias "GetWindow" ( ByVal hwnd As Integer, _īyVal wCmd As Integer ) As Integer Public Declare Function IsWindowVisible Lib "user32.dll" _Īlias "IsWindowVisible" ( ByVal hwnd As Integer ) As Boolean Private Sub btnfind_Click ( ByVal sender As System. Public Delegate Function EnumWindowsCallback ( ByVal hWnd As Integer, _īyVal lParam As Integer ) As Boolean Public Declare Function EnumWindows Lib "user32.dll" _Īlias "EnumWindows" ( ByVal callback As EnumWindowsCallback, _
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |