H
Hogan's Goat
I'm looking to do a callback function to get the ProcID or (better yet) get
the process name or app name of all running apps. I've gotten this code
but it's vb6:
Upon a button click I run the following -
hTask& = Shell(Pgm$, vbNormalFocus)
If hTask& Then
CButt(Index).Enabled = 0
ProcID(Index) = hTask&
End If
In a timer event I run the following -
Timer1.Enabled = 0
hW& = GetForegroundWindow()
If Me.hwnd <> hW& Then
Timer1.Interval = 2000
Timer1.Enabled = -1
Exit Sub
End If
For I% = LBound(ProcID) To UBound(ProcID)
hTask& = ProcID(I%)
If hTask& Then
Call fEnumWindows(hTask&)
If hTask& = 0 Then
ProcID(I%) = 0
CButt(I%).Enabled = -1
End If
End If
Next
Timer1.Interval = 1000
Timer1.Enabled = -1
Any ideas?
Hogan out.
the process name or app name of all running apps. I've gotten this code
but it's vb6:
Upon a button click I run the following -
hTask& = Shell(Pgm$, vbNormalFocus)
If hTask& Then
CButt(Index).Enabled = 0
ProcID(Index) = hTask&
End If
In a timer event I run the following -
Timer1.Enabled = 0
hW& = GetForegroundWindow()
If Me.hwnd <> hW& Then
Timer1.Interval = 2000
Timer1.Enabled = -1
Exit Sub
End If
For I% = LBound(ProcID) To UBound(ProcID)
hTask& = ProcID(I%)
If hTask& Then
Call fEnumWindows(hTask&)
If hTask& = 0 Then
ProcID(I%) = 0
CButt(I%).Enabled = -1
End If
End If
Next
Timer1.Interval = 1000
Timer1.Enabled = -1
Any ideas?
Hogan out.