Solved

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

Posted on 2012-03-11
2
250 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 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