Results 1 to 3 of 3

Thread: VB - Dropdown the calendar of a date time picker control using code

Threaded View

  1. #2
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,728

    Re: VB - Dropdown the calendar of a date time picker control using code

    It can be done easier

    Code:
    Option Explicit
    Private Const VK_DOWN As Long = &H28
    Private Const WM_SYSKEYDOWN As Long = &H104
    
    Private Declare Function SendMessage Lib "user32.dll" _
                             Alias "SendMessageA" ( _
                             ByVal hWnd As Long, _
                             ByVal wMsg As Long, _
                             ByVal wParam As Long, _
                             ByVal lParam As Long) As Long
                             
    Private Sub Command1_Click()
    Call SendMessage(DTPicker1.hWnd, WM_SYSKEYDOWN, VK_DOWN, 0)  
    End Sub
    Last edited by Krool; Jul 30th, 2012 at 02:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width