Solved

DateTimePicker  --  I would like it to display the current date while still being able to change it.

Posted on 2012-03-11
2
248 Views
Last Modified: 2012-03-11
The  DateTimePicker works fine with the code displayed below, except I always have to change it to whatever date I want. Many times the date I want is the current date, but not always.  I would like it to display the current date while still being able to change it.  Thank you for any help
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged

        DateTimePicker1.Format = DateTimePickerFormat.Custom
        DateTimePicker1.CustomFormat = "MM-dd-yyyy    "
        TextBox8.Text = DateTimePicker1.Value.Date

    End Sub
0
Comment
Question by:jampost
2 Comments
 
LVL 17

Accepted Solution

by:
nepaluz earned 500 total points
Comment Utility
assign Date.ToDay as the value of your datetimepicker on form load
0
 

Author Closing Comment

by:jampost
Comment Utility
nepaluz:

Sorry, I got side track for a while.  Thank you, it worked.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now