General information
Category:
Coding, syntax & commands
Hi!
As I told u, you can use DataPicker Control to retrieve Date Format data from the user interface, and it looks more profesional adding these beautiful controls to forms to make our applications much more Graphic Enhanced. Check this code my friend:
'To Start using Data Picker Control, you have to add it to the toolbox by right clicking
' and select "Components" from the popup menu that appears there.
'Start a new project, form1 is added by default. add a command button and then, then what? then....(drums noising sounds!)
'Then sTretch cus is gonna be a long long long day! *(Just kidding man!)
'Ok. Let's add the component named "Microsoft Windows Common Controls-2 6.0(SP3)"
'All of the component controls will appear on the ToolBox including DatAPicker!
'Select Datapicker from the toolBox and draw one instance of this control in Form1
' you can change the Format property of this control with its Format Property(sounds like Repeated words to me, huh?)
'such as DTPicker1.Format = dtpLongDate (remember DTPicker1.dtpShortDate is default) or you can
'even change this property using dtpCustom to fulfill your needs! I like this control a lot!
'Well, now to the fact of this thread, what do we obtain from this control or how do we get to obtain this?
'Ok let us see what is this all about, I grab the info from this control by its value property such as
Option Explicit
Dim myDataPickerValue as Date' here I will store my DataPicker Value which is a Date value
Private Sub Command1_Click()
myDataPickerValue = DTPicker1.Value
MsgBox "Hey! you have just picked up some data from My DataPicker Control! " & myDataPickerValue, vbInformation, App.Title
End Sub
'you can use this value property for whatever needs, including add this info to
'DataBase records or the Web via ASP or whatever you consider convinient friend!
'Cheers! and long long long long live for Visual Basic!
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only