copyright 1999 - 2014 by heinz prelle - hannover  - lenbachstraße 42 - www.visual-basic5.de | impressum
Beispiel: VB .Net - DateTimePicker - Anzeigeformat definieren - Anzeige formatieren
'
Option Explicit On
Option Strict On

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles MyBase.Load
        With Me
            .CenterToScreen()
            .DateTimePicker1.Format = DateTimePickerFormat.Custom
            .DateTimePicker1.CustomFormat = "dd.MM.yy"
        End With
    End Sub

    Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles DateTimePicker1.ValueChanged
        Me.TextBox1.Text = Me.DateTimePicker1.Value.ToString("dd.MM.yy")
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles Button1.Click
        Application.Exit()
    End Sub

End Class
Sourcecode Visual Basic