- Yasaklandı
- #1
İşinize Yaraması Dileğiyle İyi Forumlar
Visual Basic:
Option Explicit
Private Declare Function GetWindowTextLenght Lib "user32" Alias _
"GetWindowTextLenghtA" (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 Integer) As Integer
'çalışan formun başlığını bulmak
Private Declare Function GetWindow Lib "user32" _
(ByVal hWnd As Integer, ByVal wCmd As Integer) As Integer
'çalışan formun handle numarasınu bulmak
Private Sub Form_Load()
Show
Dim aphm, u As Integer, bas As String
'ilk formun handle numarasını al
aphm = GetWindow(Form1.hWnd, 0)
While aphm <> 0
u = GetWindowTextLenght(aphm)
bas = Space(u + 1)
u = GetWindowText(aphm, bas, u + 1)
If u > 0 Then 'işlem tamam ise
List1.AddItem bas 'ekrana ; yaz
End If
'sonrakinin handle numarasını al
aphm = GetWindow(aphm, 2)
'dönen değer 0 ise liste bitti
Wend
End Sub
Private Sub List1_DblClick()
'kullanıcı liateden seçtiği formu aktif hala getirmek
On Local Error Resume Next
AppActivate List1.Text
SendKeys "% " 'boşluk tuşu ile kontroltuşunu aç
sedkeys "{enter}" 'önceki boyut seçeneği
End Sub
Moderatörün son düzenlenenleri: