Example
| Sub Main Begin Dialog UserDialog 200,120,.DialogFunc Text 10,10,180,15,"Please push the OK button" TextBox 10,40,180,15,.Text OKButton 30,90,60,20 PushButton 110,90,60,20,"&<span style='color: #800080; font-weight: bold;'>Now</span>" End Dialog Dim dlg As UserDialog Debug.Print Dialog(dlg) End Sub Function DialogFunc%(DlgItem$, Action%, SuppValue%) Debug.Print "Action=";Action% Select Case Action% Case 1 ' Dialog box initialization Beep Case 2 ' Value changing or button pressed Select Case DlgItem$ Case "<span style='color: #800080; font-weight: bold;'>Now</span>" DlgText "<span style='color: #0000FF; font-weight: bold;'><span style='color: #800080; font-weight: bold;'>Text</span></span>",CStr(Now) DialogFunc% = True 'do not exit the dialog End Select End Select End Function
|