Listing 4 Module1.vb from the sample project
Option Strict Off Imports System Imports System.Diagnostics Imports System.Threading Imports System.Web.Mail Module Module1 Sub Main() Dim proc As Process proc = New Process proc.StartInfo.FileName = "C:\WinNT\Notepad.exe" proc.Start() proc.WaitForExit() if UISReport.SomeProperty = 5 UISReport.SomeProperty = 10 end if Dim mm As MailMessage mm = new MailMessage mm.To = "[email protected]" mm.From ="[email protected]" mm.Subject = "Don't Panic" mm.Body = "It's 42" dim msg msg = "Process Finished and SomeProperty is " & UISReport.SomeProperty.ToString() UISReport.Reportit (msg) End Sub End Module