' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Public Partial Class MainForm
    Public Sub New()
        Me.InitializeComponent()
    End Sub
    Private oldval As String = ""
    Private Sub TextBox1TextChanged(sender As Object, e As EventArgs)
        MessageBox.Show("We are now logging that user " & Environment.UserName & " has changed " & textBox1.Name & " from '" & oldval & "' to '" & DirectCast(sender, TextBox).Text & "'")
        oldval = DirectCast(sender, TextBox).Text
    End Sub
End Class
