<pre> Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.WriteToFile("From Laod Form") End Sub Public Event AfterInstall As InstallEventHandler Sub New() MyBase.New() AddHandler AfterInstall, AddressOf AfterInstallEventHandler Me.WriteToFile("From handler") End Sub 'New Private Sub AfterInstallEventHandler(ByVal sender As Object, _ ByVal e As InstallEventArgs) ' Add steps to perform any actions after the install process. Console.WriteLine("Code for AfterInstallEventHandler") Me.WriteToFile("Log Entry ") End Sub 'AfterInstallEventHandler Private Sub WriteToFile(text As String) Dim path As String = "Log File Path" Using writer As New StreamWriter(path, True) writer.WriteLine(String.Format(text)) writer.Close() End Using End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)