|
Public Class Form1
Private Sub Button_Reset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_Reset.Click
Me.FormChangedComponent1.ResetDirtyFlags()
End Sub
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
Private Sub Button_WhatChanged_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_WhatChanged.Click
Dim s As New System.Text.StringBuilder
For Each f As Control In Me.FormChangedComponent1.ControlsThatHaveChanged
s.AppendLine(f.Name)
Next
If s.Length > 0 Then
MessageBox.Show(s.ToString, "Controls that have changed", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Nothing has changed", "Controls that have changed", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
Private Sub DateTimePicker1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
End Sub
Private Sub FormChangedComponent1_FormControlChanged(ByVal sender As Object, ByVal e As FormChangedEventArgs) Handles FormChangedComponent1.FormControlChanged
If TypeOf e.ControlChanged Is TextBox Then
If e.Changed Then
e.ControlChanged.BackColor = Color.Yellow
Else
e.ControlChanged.BackColor = Color.White
End If
End If
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.