Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

j.mendes24

Limpar DataTimePicker [RESOLVIDO]

Recommended Posts

j.mendes24

Boas Pessoal eu tenho um "DTP" num form. E ao iniciar esse form, o DTP fica com a data actual.

Como é que eu posso fazer, quando iniciar esse mesmo forme, o DTP fique em branco?

a propriedade text não é, ja tentei.

🤔

Share this post


Link to post
Share on other sites
j.mendes24

ja esta resolvido pessoal

Resolução:

Private Sub FRMOrcam_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DTValidade.Format = DateTimePickerFormat.Custom
DTValidade.CustomFormat = " "
End Sub

Private Sub DTValidade_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DTValidade.ValueChanged
        If DTValidade.Text = EmptySpace Then
            DTValidade.Format = DateTimePickerFormat.Short
            SendKeys.Send("{ENTER}")
        End If
End Sub

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.