Originally Posted by
Jason
[php]
Dim latestID As Int32 = 0
Dim FirstIDs() As Int32 = Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID)
'open new notepad'
Dim IDenum As iEnumerable(Of Int32) = (From x As Int32 In Array.ConvertAll(Process.GetProcessesByName("notep ad"), Function(proc) proc.ID) Where Not FirstIDs.Contains(x) Select x)
If IDenum.Count > 0 then latestID = IDenum(0)
[/php]
Somefing like that.
Of course, you might need to split this into separate parts to do what you need, but this will isolate the new ID.