Window.ContentsChanged property

From Xojo Documentation

Property (As Boolean )
aWindow.ContentsChanged = newBooleanValue
or
BooleanValue = aWindow.ContentsChanged

Supported for all project types and targets.

Gets or sets a flag that indicates whether the window has been modified. The ContentsChanged event fires when the value of this property has changed. On macOS, the window's Close button displays a dot when ContentsChanged is True.

Sample Code

This example is in the ContentsChanged event of the control.

If Me.ContentsChanged Then
MsgBox("The contents have changed!")
Else
MsgBox("The ContentsChanged event has not fired.")
End If