formunuza bir adet listbox ekleyiniz
Option Explicit
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hWnd As Integer) As Integer
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Integer, ByVal lpString As String, ByVal aint As String) As Integer
Private Declare Function GetWindow Lib "user32" (ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer
Private Sub Form_Load()
Show
Dim name
Dim Aktif_pencere_hwnd, uz As Integer, baslik As String
Aktif_pencere_hwnd = GetWindow(Form1.hWnd, 0)
While Aktif_pencere_hwnd <> 0
GetWindowTextLength (Aktif_pencere_hwnd)
baslik = Space(uz + 1)
uz = GetWindowText(Aktif_pencere_hwnd, baslik, uz + 1)
If uz > 0 Then
'If Left$(baslik, 5) = "Solid" Then
List1.AddItem baslik
'End If
End If
Aktif_pencere_hwnd = GetWindow(Aktif_pencere_hwnd, 2)
Wend
End Sub
Private Sub List1_Click()
On Local Error Resume Next
AppActivate List1.Text
SendKeys "% "
SendKeys "{ENTER}"
End Sub