• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

DatePicker Control

Hi All,
How do i use a Date Picker control and an updowncontrol together.
Can anyone explain by a simple coding.
Thanks in advance.
0
shanth_77
Asked:
shanth_77
1 Solution
 
n_narayananCommented:
If you want I will send you a project.

give me your email id.
0
 
Richie_SimonettiIT OperationsCommented:
AN entire project by mail instead to show an example here?
0
 
Ryan ChongCommented:
Do a research on MSDN Online ?

http://msdn.microsoft.com/default.asp

Cheers
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
n_narayananCommented:
Try this,


VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   2610
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5490
   LinkTopic       =   "Form1"
   ScaleHeight     =   2610
   ScaleWidth      =   5490
   StartUpPosition =   3  'Windows Default
   Begin MSComCtl2.UpDown UpDown1
      Height          =   330
      Left            =   3510
      TabIndex        =   2
      Top             =   1260
      Width           =   240
      _ExtentX        =   423
      _ExtentY        =   582
      _Version        =   393216
      Enabled         =   -1  'True
   End
   Begin VB.TextBox Text1
      Height          =   285
      Left            =   2100
      TabIndex        =   0
      Top             =   1290
      Width           =   1080
   End
   Begin MSComCtl2.DTPicker DTPicker1
      Height          =   315
      Left            =   1845
      TabIndex        =   1
      Top             =   1275
      Width           =   1605
      _ExtentX        =   2831
      _ExtentY        =   556
      _Version        =   393216
      CheckBox        =   -1  'True
      Format          =   69730305
      CurrentDate     =   37376
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub DTPicker1_Change()
If Not IsNull(DTPicker1.Value) Then
    Text1.Visible = False
Else
    Text1.Visible = True
End If

End Sub

Private Sub Form_Load()
DTPicker1.Value = Null
Text1.Locked = True
End Sub

Private Sub UpDown1_DownClick()
DTPicker1.Value = DTPicker1.Value - 1
End Sub

Private Sub UpDown1_UpClick()
DTPicker1.Value = DTPicker1.Value + 1
End Sub

Narayanan
0
 
n_narayananCommented:
Open a Notepad and copy the above code then save it as form1.frm

And In your Project add the components,

Microsoft Windows Common Control-2 6.0 (SP3)


Narayanan
0
 
TimCotteeCommented:
Why not just set the .UpDown property of the dtpicker to True and keep it simple. Why use two controls when one of them already has the required functionality?
0
 
DanRollinsCommented:
Hi shanth_77,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept n_narayanan's comment(s) as an answer.
    *** TimCottee may have actually solved it, but barring new info, I think n_narayanan answerd the stated question.

shanth_77, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now