2008-04-10 09:09:45,,飛ㄦ*

datetimepicker 練習

Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Select Case ListBox1.SelectedItem.ToString
Case ”Long”
DateTimePicker1.Format = DateTimePickerFormat.Long
Case ”Short”
DateTimePicker1.Format = DateTimePickerFormat.Short
Case ”Time”
DateTimePicker1.Format = DateTimePickerFormat.Time
Case ”Custom”
DateTimePicker1.Format = DateTimePickerFormat.Custom
End Select

End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
Label2.Text = DateTimePicker1.Value.ToString
End Sub

上一篇:新增項目練習

下一篇:progressbar練習