Using the Process Class

Less frequently now I venture back to VB6 to help someone or work on an existing application. Naturally I try to use some aspect of .NET and am quickly reminded of how much easier things have become in .NET. One such convenience is the Process class. The Process class facilitates spawning a new process. VB6 has the convenient Shell command, or we can use one of the API methods like WinExec for extended control, but comparatively the Process class seems tighter and more powerful.

Suppose we want to add a Tools menu to the Calculator application during debugging to facilitate examining the Trace information sent to the custom event log (refer to the earlier section Logging Application Events.) We could use the Process class ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.