Is there any other ways to get "self" PID ?Code:Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long Dim ProcessID As Long Private Sub Command1_Click() Call GetWindowThreadProcessId(Me.hwnd, ProcessID) MsgBox ProcessID End Sub




Reply With Quote