Examples: Using OLE custom controls
- This example creates a new calendar control in the Body field
of a new document, or accesses the existing control in an existing
document, and sets the first day of the week from Sunday to Monday.
Sub Postopen(Source As Notesuidocument)
Source.EditMode = True
Call Source.GoToField("Body")
If source.IsNewDoc Then
Set Cal = Source.CreateObject _
("Calendar", _
"MSCAL.Calendar.7")
Else
Set Cal = Source.GetObject _
("Calendar")
End If
Cal.FirstDay = 2
End Sub
- This example handles the Click event for a calendar control component
inserted in the form through the UI. The script displays the date
which the user clicks on in the calendar control.
Sub Click(Source As Calendar)
Messagebox "You clicked on the following date: "_
& Source.Month &"/" & Source.Day &"/"_
& Source.Year
End Sub
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.