Results 1 to 3 of 3

Thread: [2005] DateTimePicker custom formating

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    [2005] DateTimePicker custom formating

    Anyone know of a way to display milliseconds in the DateTimePicker? Or know of a custom control that does it? I need the ability to use the updown to change the hours, minutes, seconds, or milliseconds.

    This is the format that I need it to do
    hh:mm:ss.(milliseconds)

    Thanks
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: [2005] DateTimePicker custom formating

    Quote Originally Posted by mpdeglau
    Anyone know of a way to display milliseconds in the DateTimePicker? Or know of a custom control that does it? I need the ability to use the updown to change the hours, minutes, seconds, or milliseconds.

    This is the format that I need it to do
    hh:mm:ss.(milliseconds)

    Thanks
    Hi,

    I've worked not so long ago with milliseconds and found the solution;

    VB Code:
    1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    2.        
    3.         TextBox1.Text = ("Time: " & Date.Now.ToString("h:mm:ss:fff"))
    4.  
    5.     End Sub

    I don't think you can change a DateTimePicker.

    So, this is the format you'll need:

    hh:mm:ss:fff

    Wkr ,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: [2005] DateTimePicker custom formating

    Thanks for the suggestion. I ended up creating my own control that can do it. It took a lot more time than I had to spen on it, and there is still work to be done. So if anyone knows of a control already out there that can do what I am looking for, I would love to hear about it.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

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