Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. date time picker

date time picker

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Goodway
    wrote on last edited by
    #1

    I have a textbox and a date time picker. the text box is used to display the value choosen from the date time picker. When the focus is on the textbox, if the user click the ENTER key, I want that the date time picker open, and the focus is on it so the user, by using the ARROW keys, can choose a date. I know how to test the key pressed by the user, this is my code: Private Sub dtpprofdate_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtpprofdate.DropDown Me.dtpprofdate.DropDownAlign = LeftRightAlignment.Right Me.dtpprofdate.Focus() End Sub Private Sub txtdateproforma_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtdateproforma.KeyPress If KeyAscii(e) = 13 Then dtpprofdate_DropDown(sender, e) End If End Sub IF the key is an ENTER key (KeyAscii(e) function make the checking)the DropDown event of the date time picker is fired. But the problem is that the date time picker is not opening?? Any help

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups