[vb.net 2005] 날자 및 시간 예제 본문

[PL]/VB & VB.NET

[vb.net 2005] 날자 및 시간 예제

객과 함께. 2008. 7. 27. 17:05

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


        If TextBox1.Text <> "" Then
            TextBox1.Text = ""

        Else

            TextBox1.Text = Format(Now, "yyyy년 MM월 dd일")
            TextBox2.Text = MonthCalendar1.TodayDate
            'TextBox6.Text = Today
            'TextBox6.Text = My.Computer.Clock.LocalTime      

            'TextBox6.Text = DateTime.Now                     

            'TextBox6.Text = Format(Now, "hh.mm.ss.fff tt")     

            'TextBox6.Text = TimeString                         

            TextBox6.Text = DateTime.UtcNow
            TextBox3.Text = Now()
        End If

    End Sub

'-------------------------------------------------------------------------------------------------------------------------

    Private Sub MonthCalendar1_DateSelected(ByVal sender As Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateSelected
        TextBox4.Text = MonthCalendar1.SelectionStart
        TextBox5.Text = Format(MonthCalendar1.SelectionStart, "yyyy년 MM월 dd일")
    End Sub

'-------------------------------------------------------------------------------------------------------------------------

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()

    End Sub

'[PL] > VB & VB.NET' 카테고리의 다른 글

[ vb 2008 ] ListView 예제.  (0) 2009.12.30
[ VB.NET ] OpenFileDialog 예제   (0) 2009.12.29
[vb 2008]Try Catch 정리  (0) 2009.12.24
시계예제  (0) 2008.07.28
[visual basic 2005]종료 코드  (0) 2008.04.11