[vb 2010]§PÂ_DateTimePicker®É¶¡
- ©«¤l
- 7
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 11
- ÂI¦W
- 0
- §@·~¨t²Î
- winxp
- ³nÅ骩¥»
- visual studio 2008
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-6-26
- ³Ì«áµn¿ý
- 2015-11-11
|
[vb 2010]§PÂ_DateTimePicker®É¶¡
§Ú·Q¦bwindows formµ{¦¡©³¤U¥Î¤@ÓDateTimePicker©M¤@ÓButton¡A¦pªG¤é´Áè¦n¬P´Á¤@®É¡A§Ú«ö¤UButton´N·|Åã¥Ü"¶g¤@¤£¶}À]"¿ù»~°T®§®Ø
µ{¦¡½X¦p¤U¡G
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If DayOfWeek.Monday = True Then
MessageBox.Show("¶g¤@¤£¶}À]", "¤é´Á¿ù»~", MessageBoxButtons.OK)
End If
End Sub
End Class
¦ý§Ú°õ¦æ´ú¸ÕÂI¿ïDateTimePicker¸Ìªº¤é´Á¬P´Á¤@¡A¦A«öbutton«o¨S¦³·Ó§Úªº·Qªk°µ¡A¤£ª¾þ¸Ì¿ù¤F¡A§Æ±æ¦³«e½ú«üÂI¤@¤UÁÂÁ |
|
|
|
|
|
|
¡@¼ÊºÙ: ÀH·ÄÆ¿ºªº¦Ð¤ò ¡@ÀY»Î: [±s¥Î]¼ç¤ô¸¥
°ª¤¤¥Í
- ©«¤l
- 852
- ¥DÃD
- 79
- ºëµØ
- 0
- ¿n¤À
- 918
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7 , XP
- ³nÅ骩¥»
- Office 2007, Office 2003,Office 2010,YoZo Office
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¦t©z
- µù¥U®É¶¡
- 2011-4-8
- ³Ì«áµn¿ý
- 2024-2-21
|
§Ú·Q¦bwindows formµ{¦¡©³¤U¥Î¤@ÓDateTimePicker©M¤@ÓButton¡A¦pªG¤é´Áè¦n¬P´Á¤@®É¡A§Ú«ö¤UButton´N·|Åã ...
edchen70 µoªí©ó 2015-11-11 20:21
§Aªºµ{¦¡ ¨S¦³¥ô¦ó DateTimePickerªºÃö³s©Ê..
¥H¤U°Æµ{¦¡¬O§Ú§Ë¨âÓDateTimePicker ɦ¹¤ñ¹ï ¤é´Á¶¡¶Z..- Sub wd12s() '¤é´Á§PÂ_°Æµ{¦¡
- Dim d1 As Date = DateTimePicker1.Value
- Dim d2 As Date = DateTimePicker2.Value
- Dim wd1 As String = DateTimePicker1.Value.DayOfWeek
- Dim wd2 As String = DateTimePicker2.Value.DayOfWeek
- Select Case wd1
- Case 0 : wd1 = "¤é" : Case 1 : wd1 = "¤@" : Case 2 : wd1 = "¤G" : Case 3 : wd1 = "¤T" : Case 4 : wd1 = "¥|"
- Case 5 : wd1 = "¤" : Case 6 : wd1 = "¤»"
- End Select
- Select Case wd2
- Case 0 : wd2 = "¤é" : Case 1 : wd2 = "¤@" : Case 2 : wd2 = "¤G" : Case 3 : wd2 = "¤T" : Case 4 : wd2 = "¥|"
- Case 5 : wd2 = "¤" : Case 6 : wd2 = "¤»"
- End Select
- If d2 = d1 Then
- Label14.Text = "( " & wd1 & " )" & " ~ "
- Label15.Text = "( " & wd2 & " )" & "¡A ·í¤Ñ"
- Else
- Label14.Text = "( " & wd1 & " )" & " ~ "
- Label15.Text = "( " & wd2 & " )" & "¡A¦@ " & DateDiff(DateInterval.Day, d1, d2) + 1 & "¤Ñ " & DateDiff(DateInterval.Day, d1, d2) & " ©]"
- End If
- End Sub
½Æ»s¥N½X ¦pªG§A¯uªºn¥Îbutton§PÂ_ªº¸Ü- ublic Class Form1
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- call wd12s
- If wd1="¤@" Then msgbox "¶g¤@¤£¶}À]"
- End Sub
- End Class
½Æ»s¥N½X |
|
¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~
¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk
¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM
|
|
|
|
|