Solved

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

Posted on 2012-03-11
2
249 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
ID: 37707165
assign Date.ToDay as the value of your datetimepicker on form load
0
 

Author Closing Comment

by:jampost
ID: 37707251
nepaluz:

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

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

810 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