
IF cboxDateTime == true
{
dtOrderDate.Enable()
}
ELSE
{
dtOrderDate.Disable()
}
Note:
cboxDateTime – a Form control, check box used as a flag in this instance to check whether to display or hide the datetime picker.
dtOrderDate – a Form control, datetime picker.
A disabled datetime picker will appear shaded out on the form.
IF cboxDateTime == false
{
dtOrderDate.Hide()
}
ELSE
{
dtOrderDate.Show()
}
Note:
cboxDateTime – a Form control, check box used as a flag in this instance to check whether to display or hide the datetime picker.
dtOrderDate – a Form control, datetime picker.
A datetime picker will not be visible on the form when it is hidden.
dtOrderDate.SetFocus()
Note:
dtOrderDate – a Form control, datetime picker.
This expression will set the form focus on the datetime picker.