-
درود دوست من. خوشحال می شم. پیغام خصوصی دادم.
-
کوروش جان فقط جستجو تو فرم و بدست آوردن label مونده! اونم انجام می دم یه نگاه بنداز:
کد فرم:
کد:
Public iconnectionHwnd As Long
Private Sub Form_Activate()
Call EnumWindows(AddressOf EnumWindowsProc, 1)
End Sub
Private Sub Timer1_Timer()
''' here check the status
If Form1.Caption = "cheking status" Then Form1.Caption = "" Else Form1.Caption = "cheking status"
End Sub
کد ماژول:
کد:
Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lparam As Long) As Long
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lparam As Long) As Long
Dim formname As String * 255
GetWindowText hwnd, formname, 255
If formname <> "" Then '''here specify the dial up caption name
Form1.Timer1.Enabled = True
Form1.iconnectionHwnd = hwnd
EnumWindowsProc = 0
Else
EnumWindowsProc = 1
End If
End Function
-
سلام بابك جان دست گلت درد نكنه راستي وقتي تمام شد يه زحمت ميكشي سورس رو بصورت پروژه برام بزاري ممنونت ميشم
خيلي آقايي مراقب خودت باش