2019. 8. 12. 22:05

Imports System.Diagnostics

Public Class Form1
    Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Integer) As Integer
    Public Declare Function IsZoomed Lib "user32" (ByVal hwnd As Integer) As Integer


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim poc() As Process = Process.GetProcesses()
        Dim lResult As Integer
        For i As Integer = 0 To poc.Length - 1
            If poc(i).MainWindowTitle <> "" Then
                Try
                    lResult = IsWindowVisible(poc(i).MainWindowHandle) + IsZoomed(poc(i).MainWindowHandle)
                    If lResult > 0 Then
                        'If poc(i).MainWindowTitle = "캡션명" Then
                            ListBox1.Items.Add(poc(i).MainWindowHandle)
                        'End If
                    End If
                Catch ex As Exception
                    MsgBox(poc(i).ProcessName.ToString & " " & ex.Message)
                End Try
            End If
        Next

    End Sub
End Class

'VB.NET' 카테고리의 다른 글

VB.NET 이미지서치 ImageSearchDLL.dll  (1) 2021.03.16
VB.NET FindWindow, FindWindowEX API  (0) 2021.03.15
alert 없애기  (0) 2020.07.11
웹연동 소스  (0) 2020.07.11
유틸리티 Microsoft Spy++ V10.0 다운로드  (0) 2019.11.04
유틸리티 API뷰어(Winapi) 다운로드  (0) 2019.11.03
vb.net SendInput  (0) 2019.08.28
웹연동  (0) 2019.08.26
참조 추가 Management  (0) 2019.08.20
좌표를 합친 롱 값을 만든다.  (0) 2019.08.11
Posted by 블로그(8109)