Reputation: 4639
Ok what I am trying to achieve is:
Given I have a System.Diagnostics.Process object representing a running application (eg MS Excel) how do I go from having the Process object to holding the active Excel instance?
Ideally it would be something like
Dim lProcess as System.Diagnostics.Process = ProcessOfActiveWindow()
Dim lExcelInstance As Excel.Application
lExcelInsance = DirectCast(lProcess, Excel.Application)
NOTE:
Upvotes: 0
Views: 135
Reputation: 161773
There is no "general form". Why should there be. Most applications don't have an API exposing them. There usually is nothing like Excel.Application.
Upvotes: 1