有用VB制作多功能万年历的资料吗,文字资料实在太少,请高人帮帮忙啊!!谢谢
发布网友
发布时间:2022-04-24 04:24
我来回答
共1个回答
热心网友
时间:2023-10-27 18:35
CalendarX.ocx 农历 公历的转换 控件
Public solarTerm(24)
Public bytSendByte() As Byte '发送二进制数据
Public sFtv(30) As String, lFtv(30) As String
Public seaSonY(150) As String
Public Sub shenming()
solarTerm(0) = "小寒": solarTerm(1) = "大寒": solarTerm(2) = "立春": solarTerm(3) = "雨水": solarTerm(4) = "惊蛰": solarTerm(5) = "春分": solarTerm(6) = "清明": solarTerm(7) = "谷雨": solarTerm(8) = "立夏": solarTerm(9) = "小满": solarTerm(10) = "芒种": solarTerm(11) = "夏至"
solarTerm(12) = "小暑": solarTerm(13) = "大暑": solarTerm(14) = "立秋": solarTerm(15) = "处暑": solarTerm(16) = "白露": solarTerm(17) = "秋分": solarTerm(18) = "寒露": solarTerm(19) = "霜降": solarTerm(20) = "立冬": solarTerm(21) = "小雪": solarTerm(22) = "大雪": solarTerm(23) = "冬至"
sFtv(0) = "0101*元旦": sFtv(1) = "0214 情人节": sFtv(2) = "": sFtv(3) = "0308 妇女节": sFtv(4) = "0312 植树节": sFtv(5) = "0315 消费者权益日": sFtv(6) = "0317 ": sFtv(7) = "0401 愚人节": sFtv(8) = "0501 劳动节": sFtv(9) = "0504 青年节": sFtv(10) = "0512 *节": sFtv(11) = "": sFtv(12) = "0601 儿童节": sFtv(13) = ""
sFtv(14) = "0701 建党节 香港回归纪念": sFtv(15) = "": sFtv(16) = "0718 ": sFtv(17) = "0801 建军节": sFtv(18) = "0808 父亲节": sFtv(19) = "0909 *逝世纪念": sFtv(20) = "0910 教师节": sFtv(21) = "0928 孔子诞辰": sFtv(22) = "1001*国庆节": sFtv(23) = "1006 老人节": sFtv(24) = "1024 联合国日": sFtv(25) = "1111 ": sFtv(26) = "1112 孙中山诞辰纪念": sFtv(27) = "1220 澳门回归纪念": sFtv(28) = "1225 Christmas Day": sFtv(29) = "1226 *诞辰纪念"
lFtv(0) = "0101*春节": lFtv(1) = "0115 元宵节": lFtv(2) = "0505 端午节": lFtv(3) = "0707 七夕情人节": lFtv(4) = "0715 中元节": lFtv(5) = "0815 中秋节": lFtv(6) = "0909 重阳节": lFtv(7) = "1208 腊八节": lFtv(8) = "1223 小年": lFtv(9) = "0100*除夕"
seaSonY(100) = "100511031005100510061006080808080808070808070807/" '2001
seaSonY(101) = "100511040906100509060906080807080708070808070807/"
seaSonY(102) = "090511040906100509060907080807080708060907080807/"
seaSonY(103) = "090611041005110510061006080708080808070808070806/"
seaSonY(104) = "100511031005100510061006080808080808070808070807/"
seaSonY(105) = "100511040906100510060906080808080708070808070807/"
seaSonY(106) = "090511040906100509060907080807080708060907080807/"
seaSonY(107) = "090611041005110510061006080708080807070808070806/"
seaSonY(108) = "100511031005110510061006080808080808070808070807/"
seaSonY(109) = "100511040906100510060906080808080708070808070807/"
seaSonY(110) = "090511040906100509060907080807080708070907080807/"
seaSonY(111) = "090611041005110510051006080708080807070808070806/"
seaSonY(112) = "100511031005110510061006080708080808070808070807/"
seaSonY(113) = "100511040906100510060906080808080708070808070807/"
seaSonY(114) = "090511040906100509060907080807080708070907070807/"
seaSonY(115) = "090511041005110410051006080708080807070808070806/"
seaSonY(116) = "100513031005110510061006080708080808070808070807/"
seaSonY(117) = "100511041006100510060906080808080708070808070807/"
seaSonY(118) = "100511040906100509060906080807080708070907070807/"
seaSonY(119) = "090511041005110410051006090708070807070808070806/"
seaSonY(120) = "100513031005110510061006080708080808070808070806/"
seaSonY(121) = "100511041005100510060906080808080808070808070807/"
seaSonY(122) = "100511040906100509060906080807080708070907070807/"
seaSonY(123) = "090511041005110410051006090708070807070808070906/"
seaSonY(124) = "100513031005110510061006080708080808070808070806/"
seaSonY(125) = "100511031005100510061006080808080808070808070807/"
seaSonY(126) = "100511040906100509060906080807080708070808070807/"
seaSonY(127) = "090511041005110410051006090708070807070808070906/"
seaSonY(128) = "100513031005110510061006080708080808070808070806/"
seaSonY(129) = "100511031005100510061006080808080808070808070807/"
seaSonY(130) = "100511040906100509060906080807080708070808070807/"
seaSonY(131) = "090511041005110410051006090708070807070808070906/"
seaSonY(132) = "100513031005110510061006080808080808070808070806/"
seaSonY(133) = "100511031005100510061006080807080808070808070807/"
seaSonY(134) = "100511040906100510060906080808080708070808070807/"
seaSonY(135) = "090511041005110410051006090708070807070808070906/"
seaSonY(136) = "100513031005110510061006080708080808070808070806/"
seaSonY(137) = "100511031005100510061006080808080808070808070807/"
seaSonY(138) = "100511040906100510060906080808080708070808070807/"
seaSonY(139) = "090511041005110410051006090708070807070808070906/"
seaSonY(140) = "100513031005110510051006080708080807070808070806/"
seaSonY(141) = "100511031005110510061006080808080808070808070807/"
seaSonY(142) = "100511040906100510060906080808080708070808070807/"
seaSonY(143) = "090511041005110410051006090708070807080808070906/"
seaSonY(144) = "100513031005110410051006080708080807070808070806/"
seaSonY(145) = "100511031005110510061006080708080808070808070807/"
seaSonY(146) = "100511040906100510060906080808080708070808070807/"
seaSonY(147) = "090511041005110410051005090708070807080808060906/"
seaSonY(148) = "100412031005100510051006090708070807070808070806/"
seaSonY(149) = "100512031005110510061006080708080708070808070807/"
For i = 0 To 99
seaSonY(145) = "101010101010101010101010101010101010101010101010"
Next i
End Sub
Public Function seaSonYx(ddy As Date)
'***************************************************
'* 返回dY年dM月dD日农历的节气 *
'***************************************************
Dim i As Integer, J As Integer, dY As Integer, dM As Integer, dD As Integer
Dim D As String, D1 As String, D2 As String, DDD As Date
Dim DDD1 As Date, DDD2 As Date, Ddd3 As Date
dY = Year(ddy)
dM = Month(ddy)
dD = Day(ddy)
D = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 - Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 1), 2))))
D1 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 3), 2))))
If Month(ddy) > 1 Then
D2 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy) - 1)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 2) * 4 + 3), 2))))
Else
D2 = Trim(str(Year(ddy) - 1)) + "," + Trim(str(12)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM + 12 - 2) * 4 + 3), 2))))
End If
DDD = D
DDD1 = D1
DDD2 = D2
If ddy >= DDD Then
seaSonYx = solarTerm((dM - 1) * 2) + "第" + Trim(str(ddy - DDD + 1)) + "天"
Else
If dM < 2 Then
seaSonYx = solarTerm(11 * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
Else
seaSonYx = solarTerm((dM - 2) * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
End If
End If
If ddy >= DDD1 Then
seaSonYx = solarTerm((dM - 1) * 2 + 1) + "第" + Trim(str(ddy - DDD1 + 1)) + "天"
End If
End Function
Public Function ssFtv(m As Integer, D As Integer)
Dim aa
'***************************************************
'* 返回阳历M月D日的节日 *
'***************************************************
For aa = 0 To 30
If (Val(Mid(sFtv(aa), 1, 2)) = m) And (Val(Mid(sFtv(aa), 3, 2)) = D) Then
' If aa >= 10 And aa <= 25 Then
ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' Else
' ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' End If
End If
Next aa
End Function
Public Function llFtv(m As Integer, D As Integer)
'***************************************************
'* 返回农历M月D日的节日 *
'***************************************************
Dim aa As Integer
llFtv = ""
For aa = 0 To 30
If (Val(Mid(lFtv(aa), 1, 2)) = m) And (Val(Mid(lFtv(aa), 3, 2)) = D) Then
If aa >= 10 And aa <= 25 Then
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4) + "happy birthday"
Else
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4)
End If
End If
Next aa
End Function
节气等···
热心网友
时间:2023-10-27 18:35
CalendarX.ocx 农历 公历的转换 控件
Public solarTerm(24)
Public bytSendByte() As Byte '发送二进制数据
Public sFtv(30) As String, lFtv(30) As String
Public seaSonY(150) As String
Public Sub shenming()
solarTerm(0) = "小寒": solarTerm(1) = "大寒": solarTerm(2) = "立春": solarTerm(3) = "雨水": solarTerm(4) = "惊蛰": solarTerm(5) = "春分": solarTerm(6) = "清明": solarTerm(7) = "谷雨": solarTerm(8) = "立夏": solarTerm(9) = "小满": solarTerm(10) = "芒种": solarTerm(11) = "夏至"
solarTerm(12) = "小暑": solarTerm(13) = "大暑": solarTerm(14) = "立秋": solarTerm(15) = "处暑": solarTerm(16) = "白露": solarTerm(17) = "秋分": solarTerm(18) = "寒露": solarTerm(19) = "霜降": solarTerm(20) = "立冬": solarTerm(21) = "小雪": solarTerm(22) = "大雪": solarTerm(23) = "冬至"
sFtv(0) = "0101*元旦": sFtv(1) = "0214 情人节": sFtv(2) = "": sFtv(3) = "0308 妇女节": sFtv(4) = "0312 植树节": sFtv(5) = "0315 消费者权益日": sFtv(6) = "0317 ": sFtv(7) = "0401 愚人节": sFtv(8) = "0501 劳动节": sFtv(9) = "0504 青年节": sFtv(10) = "0512 *节": sFtv(11) = "": sFtv(12) = "0601 儿童节": sFtv(13) = ""
sFtv(14) = "0701 建党节 香港回归纪念": sFtv(15) = "": sFtv(16) = "0718 ": sFtv(17) = "0801 建军节": sFtv(18) = "0808 父亲节": sFtv(19) = "0909 *逝世纪念": sFtv(20) = "0910 教师节": sFtv(21) = "0928 孔子诞辰": sFtv(22) = "1001*国庆节": sFtv(23) = "1006 老人节": sFtv(24) = "1024 联合国日": sFtv(25) = "1111 ": sFtv(26) = "1112 孙中山诞辰纪念": sFtv(27) = "1220 澳门回归纪念": sFtv(28) = "1225 Christmas Day": sFtv(29) = "1226 *诞辰纪念"
lFtv(0) = "0101*春节": lFtv(1) = "0115 元宵节": lFtv(2) = "0505 端午节": lFtv(3) = "0707 七夕情人节": lFtv(4) = "0715 中元节": lFtv(5) = "0815 中秋节": lFtv(6) = "0909 重阳节": lFtv(7) = "1208 腊八节": lFtv(8) = "1223 小年": lFtv(9) = "0100*除夕"
seaSonY(100) = "100511031005100510061006080808080808070808070807/" '2001
seaSonY(101) = "100511040906100509060906080807080708070808070807/"
seaSonY(102) = "090511040906100509060907080807080708060907080807/"
seaSonY(103) = "090611041005110510061006080708080808070808070806/"
seaSonY(104) = "100511031005100510061006080808080808070808070807/"
seaSonY(105) = "100511040906100510060906080808080708070808070807/"
seaSonY(106) = "090511040906100509060907080807080708060907080807/"
seaSonY(107) = "090611041005110510061006080708080807070808070806/"
seaSonY(108) = "100511031005110510061006080808080808070808070807/"
seaSonY(109) = "100511040906100510060906080808080708070808070807/"
seaSonY(110) = "090511040906100509060907080807080708070907080807/"
seaSonY(111) = "090611041005110510051006080708080807070808070806/"
seaSonY(112) = "100511031005110510061006080708080808070808070807/"
seaSonY(113) = "100511040906100510060906080808080708070808070807/"
seaSonY(114) = "090511040906100509060907080807080708070907070807/"
seaSonY(115) = "090511041005110410051006080708080807070808070806/"
seaSonY(116) = "100513031005110510061006080708080808070808070807/"
seaSonY(117) = "100511041006100510060906080808080708070808070807/"
seaSonY(118) = "100511040906100509060906080807080708070907070807/"
seaSonY(119) = "090511041005110410051006090708070807070808070806/"
seaSonY(120) = "100513031005110510061006080708080808070808070806/"
seaSonY(121) = "100511041005100510060906080808080808070808070807/"
seaSonY(122) = "100511040906100509060906080807080708070907070807/"
seaSonY(123) = "090511041005110410051006090708070807070808070906/"
seaSonY(124) = "100513031005110510061006080708080808070808070806/"
seaSonY(125) = "100511031005100510061006080808080808070808070807/"
seaSonY(126) = "100511040906100509060906080807080708070808070807/"
seaSonY(127) = "090511041005110410051006090708070807070808070906/"
seaSonY(128) = "100513031005110510061006080708080808070808070806/"
seaSonY(129) = "100511031005100510061006080808080808070808070807/"
seaSonY(130) = "100511040906100509060906080807080708070808070807/"
seaSonY(131) = "090511041005110410051006090708070807070808070906/"
seaSonY(132) = "100513031005110510061006080808080808070808070806/"
seaSonY(133) = "100511031005100510061006080807080808070808070807/"
seaSonY(134) = "100511040906100510060906080808080708070808070807/"
seaSonY(135) = "090511041005110410051006090708070807070808070906/"
seaSonY(136) = "100513031005110510061006080708080808070808070806/"
seaSonY(137) = "100511031005100510061006080808080808070808070807/"
seaSonY(138) = "100511040906100510060906080808080708070808070807/"
seaSonY(139) = "090511041005110410051006090708070807070808070906/"
seaSonY(140) = "100513031005110510051006080708080807070808070806/"
seaSonY(141) = "100511031005110510061006080808080808070808070807/"
seaSonY(142) = "100511040906100510060906080808080708070808070807/"
seaSonY(143) = "090511041005110410051006090708070807080808070906/"
seaSonY(144) = "100513031005110410051006080708080807070808070806/"
seaSonY(145) = "100511031005110510061006080708080808070808070807/"
seaSonY(146) = "100511040906100510060906080808080708070808070807/"
seaSonY(147) = "090511041005110410051005090708070807080808060906/"
seaSonY(148) = "100412031005100510051006090708070807070808070806/"
seaSonY(149) = "100512031005110510061006080708080708070808070807/"
For i = 0 To 99
seaSonY(145) = "101010101010101010101010101010101010101010101010"
Next i
End Sub
Public Function seaSonYx(ddy As Date)
'***************************************************
'* 返回dY年dM月dD日农历的节气 *
'***************************************************
Dim i As Integer, J As Integer, dY As Integer, dM As Integer, dD As Integer
Dim D As String, D1 As String, D2 As String, DDD As Date
Dim DDD1 As Date, DDD2 As Date, Ddd3 As Date
dY = Year(ddy)
dM = Month(ddy)
dD = Day(ddy)
D = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 - Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 1), 2))))
D1 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 3), 2))))
If Month(ddy) > 1 Then
D2 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy) - 1)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 2) * 4 + 3), 2))))
Else
D2 = Trim(str(Year(ddy) - 1)) + "," + Trim(str(12)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM + 12 - 2) * 4 + 3), 2))))
End If
DDD = D
DDD1 = D1
DDD2 = D2
If ddy >= DDD Then
seaSonYx = solarTerm((dM - 1) * 2) + "第" + Trim(str(ddy - DDD + 1)) + "天"
Else
If dM < 2 Then
seaSonYx = solarTerm(11 * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
Else
seaSonYx = solarTerm((dM - 2) * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
End If
End If
If ddy >= DDD1 Then
seaSonYx = solarTerm((dM - 1) * 2 + 1) + "第" + Trim(str(ddy - DDD1 + 1)) + "天"
End If
End Function
Public Function ssFtv(m As Integer, D As Integer)
Dim aa
'***************************************************
'* 返回阳历M月D日的节日 *
'***************************************************
For aa = 0 To 30
If (Val(Mid(sFtv(aa), 1, 2)) = m) And (Val(Mid(sFtv(aa), 3, 2)) = D) Then
' If aa >= 10 And aa <= 25 Then
ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' Else
' ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' End If
End If
Next aa
End Function
Public Function llFtv(m As Integer, D As Integer)
'***************************************************
'* 返回农历M月D日的节日 *
'***************************************************
Dim aa As Integer
llFtv = ""
For aa = 0 To 30
If (Val(Mid(lFtv(aa), 1, 2)) = m) And (Val(Mid(lFtv(aa), 3, 2)) = D) Then
If aa >= 10 And aa <= 25 Then
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4) + "happy birthday"
Else
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4)
End If
End If
Next aa
End Function
节气等···
热心网友
时间:2023-10-27 18:35
CalendarX.ocx 农历 公历的转换 控件
Public solarTerm(24)
Public bytSendByte() As Byte '发送二进制数据
Public sFtv(30) As String, lFtv(30) As String
Public seaSonY(150) As String
Public Sub shenming()
solarTerm(0) = "小寒": solarTerm(1) = "大寒": solarTerm(2) = "立春": solarTerm(3) = "雨水": solarTerm(4) = "惊蛰": solarTerm(5) = "春分": solarTerm(6) = "清明": solarTerm(7) = "谷雨": solarTerm(8) = "立夏": solarTerm(9) = "小满": solarTerm(10) = "芒种": solarTerm(11) = "夏至"
solarTerm(12) = "小暑": solarTerm(13) = "大暑": solarTerm(14) = "立秋": solarTerm(15) = "处暑": solarTerm(16) = "白露": solarTerm(17) = "秋分": solarTerm(18) = "寒露": solarTerm(19) = "霜降": solarTerm(20) = "立冬": solarTerm(21) = "小雪": solarTerm(22) = "大雪": solarTerm(23) = "冬至"
sFtv(0) = "0101*元旦": sFtv(1) = "0214 情人节": sFtv(2) = "": sFtv(3) = "0308 妇女节": sFtv(4) = "0312 植树节": sFtv(5) = "0315 消费者权益日": sFtv(6) = "0317 ": sFtv(7) = "0401 愚人节": sFtv(8) = "0501 劳动节": sFtv(9) = "0504 青年节": sFtv(10) = "0512 *节": sFtv(11) = "": sFtv(12) = "0601 儿童节": sFtv(13) = ""
sFtv(14) = "0701 建党节 香港回归纪念": sFtv(15) = "": sFtv(16) = "0718 ": sFtv(17) = "0801 建军节": sFtv(18) = "0808 父亲节": sFtv(19) = "0909 *逝世纪念": sFtv(20) = "0910 教师节": sFtv(21) = "0928 孔子诞辰": sFtv(22) = "1001*国庆节": sFtv(23) = "1006 老人节": sFtv(24) = "1024 联合国日": sFtv(25) = "1111 ": sFtv(26) = "1112 孙中山诞辰纪念": sFtv(27) = "1220 澳门回归纪念": sFtv(28) = "1225 Christmas Day": sFtv(29) = "1226 *诞辰纪念"
lFtv(0) = "0101*春节": lFtv(1) = "0115 元宵节": lFtv(2) = "0505 端午节": lFtv(3) = "0707 七夕情人节": lFtv(4) = "0715 中元节": lFtv(5) = "0815 中秋节": lFtv(6) = "0909 重阳节": lFtv(7) = "1208 腊八节": lFtv(8) = "1223 小年": lFtv(9) = "0100*除夕"
seaSonY(100) = "100511031005100510061006080808080808070808070807/" '2001
seaSonY(101) = "100511040906100509060906080807080708070808070807/"
seaSonY(102) = "090511040906100509060907080807080708060907080807/"
seaSonY(103) = "090611041005110510061006080708080808070808070806/"
seaSonY(104) = "100511031005100510061006080808080808070808070807/"
seaSonY(105) = "100511040906100510060906080808080708070808070807/"
seaSonY(106) = "090511040906100509060907080807080708060907080807/"
seaSonY(107) = "090611041005110510061006080708080807070808070806/"
seaSonY(108) = "100511031005110510061006080808080808070808070807/"
seaSonY(109) = "100511040906100510060906080808080708070808070807/"
seaSonY(110) = "090511040906100509060907080807080708070907080807/"
seaSonY(111) = "090611041005110510051006080708080807070808070806/"
seaSonY(112) = "100511031005110510061006080708080808070808070807/"
seaSonY(113) = "100511040906100510060906080808080708070808070807/"
seaSonY(114) = "090511040906100509060907080807080708070907070807/"
seaSonY(115) = "090511041005110410051006080708080807070808070806/"
seaSonY(116) = "100513031005110510061006080708080808070808070807/"
seaSonY(117) = "100511041006100510060906080808080708070808070807/"
seaSonY(118) = "100511040906100509060906080807080708070907070807/"
seaSonY(119) = "090511041005110410051006090708070807070808070806/"
seaSonY(120) = "100513031005110510061006080708080808070808070806/"
seaSonY(121) = "100511041005100510060906080808080808070808070807/"
seaSonY(122) = "100511040906100509060906080807080708070907070807/"
seaSonY(123) = "090511041005110410051006090708070807070808070906/"
seaSonY(124) = "100513031005110510061006080708080808070808070806/"
seaSonY(125) = "100511031005100510061006080808080808070808070807/"
seaSonY(126) = "100511040906100509060906080807080708070808070807/"
seaSonY(127) = "090511041005110410051006090708070807070808070906/"
seaSonY(128) = "100513031005110510061006080708080808070808070806/"
seaSonY(129) = "100511031005100510061006080808080808070808070807/"
seaSonY(130) = "100511040906100509060906080807080708070808070807/"
seaSonY(131) = "090511041005110410051006090708070807070808070906/"
seaSonY(132) = "100513031005110510061006080808080808070808070806/"
seaSonY(133) = "100511031005100510061006080807080808070808070807/"
seaSonY(134) = "100511040906100510060906080808080708070808070807/"
seaSonY(135) = "090511041005110410051006090708070807070808070906/"
seaSonY(136) = "100513031005110510061006080708080808070808070806/"
seaSonY(137) = "100511031005100510061006080808080808070808070807/"
seaSonY(138) = "100511040906100510060906080808080708070808070807/"
seaSonY(139) = "090511041005110410051006090708070807070808070906/"
seaSonY(140) = "100513031005110510051006080708080807070808070806/"
seaSonY(141) = "100511031005110510061006080808080808070808070807/"
seaSonY(142) = "100511040906100510060906080808080708070808070807/"
seaSonY(143) = "090511041005110410051006090708070807080808070906/"
seaSonY(144) = "100513031005110410051006080708080807070808070806/"
seaSonY(145) = "100511031005110510061006080708080808070808070807/"
seaSonY(146) = "100511040906100510060906080808080708070808070807/"
seaSonY(147) = "090511041005110410051005090708070807080808060906/"
seaSonY(148) = "100412031005100510051006090708070807070808070806/"
seaSonY(149) = "100512031005110510061006080708080708070808070807/"
For i = 0 To 99
seaSonY(145) = "101010101010101010101010101010101010101010101010"
Next i
End Sub
Public Function seaSonYx(ddy As Date)
'***************************************************
'* 返回dY年dM月dD日农历的节气 *
'***************************************************
Dim i As Integer, J As Integer, dY As Integer, dM As Integer, dD As Integer
Dim D As String, D1 As String, D2 As String, DDD As Date
Dim DDD1 As Date, DDD2 As Date, Ddd3 As Date
dY = Year(ddy)
dM = Month(ddy)
dD = Day(ddy)
D = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 - Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 1), 2))))
D1 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 3), 2))))
If Month(ddy) > 1 Then
D2 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy) - 1)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 2) * 4 + 3), 2))))
Else
D2 = Trim(str(Year(ddy) - 1)) + "," + Trim(str(12)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM + 12 - 2) * 4 + 3), 2))))
End If
DDD = D
DDD1 = D1
DDD2 = D2
If ddy >= DDD Then
seaSonYx = solarTerm((dM - 1) * 2) + "第" + Trim(str(ddy - DDD + 1)) + "天"
Else
If dM < 2 Then
seaSonYx = solarTerm(11 * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
Else
seaSonYx = solarTerm((dM - 2) * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
End If
End If
If ddy >= DDD1 Then
seaSonYx = solarTerm((dM - 1) * 2 + 1) + "第" + Trim(str(ddy - DDD1 + 1)) + "天"
End If
End Function
Public Function ssFtv(m As Integer, D As Integer)
Dim aa
'***************************************************
'* 返回阳历M月D日的节日 *
'***************************************************
For aa = 0 To 30
If (Val(Mid(sFtv(aa), 1, 2)) = m) And (Val(Mid(sFtv(aa), 3, 2)) = D) Then
' If aa >= 10 And aa <= 25 Then
ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' Else
' ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' End If
End If
Next aa
End Function
Public Function llFtv(m As Integer, D As Integer)
'***************************************************
'* 返回农历M月D日的节日 *
'***************************************************
Dim aa As Integer
llFtv = ""
For aa = 0 To 30
If (Val(Mid(lFtv(aa), 1, 2)) = m) And (Val(Mid(lFtv(aa), 3, 2)) = D) Then
If aa >= 10 And aa <= 25 Then
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4) + "happy birthday"
Else
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4)
End If
End If
Next aa
End Function
节气等···
热心网友
时间:2023-10-27 18:35
CalendarX.ocx 农历 公历的转换 控件
Public solarTerm(24)
Public bytSendByte() As Byte '发送二进制数据
Public sFtv(30) As String, lFtv(30) As String
Public seaSonY(150) As String
Public Sub shenming()
solarTerm(0) = "小寒": solarTerm(1) = "大寒": solarTerm(2) = "立春": solarTerm(3) = "雨水": solarTerm(4) = "惊蛰": solarTerm(5) = "春分": solarTerm(6) = "清明": solarTerm(7) = "谷雨": solarTerm(8) = "立夏": solarTerm(9) = "小满": solarTerm(10) = "芒种": solarTerm(11) = "夏至"
solarTerm(12) = "小暑": solarTerm(13) = "大暑": solarTerm(14) = "立秋": solarTerm(15) = "处暑": solarTerm(16) = "白露": solarTerm(17) = "秋分": solarTerm(18) = "寒露": solarTerm(19) = "霜降": solarTerm(20) = "立冬": solarTerm(21) = "小雪": solarTerm(22) = "大雪": solarTerm(23) = "冬至"
sFtv(0) = "0101*元旦": sFtv(1) = "0214 情人节": sFtv(2) = "": sFtv(3) = "0308 妇女节": sFtv(4) = "0312 植树节": sFtv(5) = "0315 消费者权益日": sFtv(6) = "0317 ": sFtv(7) = "0401 愚人节": sFtv(8) = "0501 劳动节": sFtv(9) = "0504 青年节": sFtv(10) = "0512 *节": sFtv(11) = "": sFtv(12) = "0601 儿童节": sFtv(13) = ""
sFtv(14) = "0701 建党节 香港回归纪念": sFtv(15) = "": sFtv(16) = "0718 ": sFtv(17) = "0801 建军节": sFtv(18) = "0808 父亲节": sFtv(19) = "0909 *逝世纪念": sFtv(20) = "0910 教师节": sFtv(21) = "0928 孔子诞辰": sFtv(22) = "1001*国庆节": sFtv(23) = "1006 老人节": sFtv(24) = "1024 联合国日": sFtv(25) = "1111 ": sFtv(26) = "1112 孙中山诞辰纪念": sFtv(27) = "1220 澳门回归纪念": sFtv(28) = "1225 Christmas Day": sFtv(29) = "1226 *诞辰纪念"
lFtv(0) = "0101*春节": lFtv(1) = "0115 元宵节": lFtv(2) = "0505 端午节": lFtv(3) = "0707 七夕情人节": lFtv(4) = "0715 中元节": lFtv(5) = "0815 中秋节": lFtv(6) = "0909 重阳节": lFtv(7) = "1208 腊八节": lFtv(8) = "1223 小年": lFtv(9) = "0100*除夕"
seaSonY(100) = "100511031005100510061006080808080808070808070807/" '2001
seaSonY(101) = "100511040906100509060906080807080708070808070807/"
seaSonY(102) = "090511040906100509060907080807080708060907080807/"
seaSonY(103) = "090611041005110510061006080708080808070808070806/"
seaSonY(104) = "100511031005100510061006080808080808070808070807/"
seaSonY(105) = "100511040906100510060906080808080708070808070807/"
seaSonY(106) = "090511040906100509060907080807080708060907080807/"
seaSonY(107) = "090611041005110510061006080708080807070808070806/"
seaSonY(108) = "100511031005110510061006080808080808070808070807/"
seaSonY(109) = "100511040906100510060906080808080708070808070807/"
seaSonY(110) = "090511040906100509060907080807080708070907080807/"
seaSonY(111) = "090611041005110510051006080708080807070808070806/"
seaSonY(112) = "100511031005110510061006080708080808070808070807/"
seaSonY(113) = "100511040906100510060906080808080708070808070807/"
seaSonY(114) = "090511040906100509060907080807080708070907070807/"
seaSonY(115) = "090511041005110410051006080708080807070808070806/"
seaSonY(116) = "100513031005110510061006080708080808070808070807/"
seaSonY(117) = "100511041006100510060906080808080708070808070807/"
seaSonY(118) = "100511040906100509060906080807080708070907070807/"
seaSonY(119) = "090511041005110410051006090708070807070808070806/"
seaSonY(120) = "100513031005110510061006080708080808070808070806/"
seaSonY(121) = "100511041005100510060906080808080808070808070807/"
seaSonY(122) = "100511040906100509060906080807080708070907070807/"
seaSonY(123) = "090511041005110410051006090708070807070808070906/"
seaSonY(124) = "100513031005110510061006080708080808070808070806/"
seaSonY(125) = "100511031005100510061006080808080808070808070807/"
seaSonY(126) = "100511040906100509060906080807080708070808070807/"
seaSonY(127) = "090511041005110410051006090708070807070808070906/"
seaSonY(128) = "100513031005110510061006080708080808070808070806/"
seaSonY(129) = "100511031005100510061006080808080808070808070807/"
seaSonY(130) = "100511040906100509060906080807080708070808070807/"
seaSonY(131) = "090511041005110410051006090708070807070808070906/"
seaSonY(132) = "100513031005110510061006080808080808070808070806/"
seaSonY(133) = "100511031005100510061006080807080808070808070807/"
seaSonY(134) = "100511040906100510060906080808080708070808070807/"
seaSonY(135) = "090511041005110410051006090708070807070808070906/"
seaSonY(136) = "100513031005110510061006080708080808070808070806/"
seaSonY(137) = "100511031005100510061006080808080808070808070807/"
seaSonY(138) = "100511040906100510060906080808080708070808070807/"
seaSonY(139) = "090511041005110410051006090708070807070808070906/"
seaSonY(140) = "100513031005110510051006080708080807070808070806/"
seaSonY(141) = "100511031005110510061006080808080808070808070807/"
seaSonY(142) = "100511040906100510060906080808080708070808070807/"
seaSonY(143) = "090511041005110410051006090708070807080808070906/"
seaSonY(144) = "100513031005110410051006080708080807070808070806/"
seaSonY(145) = "100511031005110510061006080708080808070808070807/"
seaSonY(146) = "100511040906100510060906080808080708070808070807/"
seaSonY(147) = "090511041005110410051005090708070807080808060906/"
seaSonY(148) = "100412031005100510051006090708070807070808070806/"
seaSonY(149) = "100512031005110510061006080708080708070808070807/"
For i = 0 To 99
seaSonY(145) = "101010101010101010101010101010101010101010101010"
Next i
End Sub
Public Function seaSonYx(ddy As Date)
'***************************************************
'* 返回dY年dM月dD日农历的节气 *
'***************************************************
Dim i As Integer, J As Integer, dY As Integer, dM As Integer, dD As Integer
Dim D As String, D1 As String, D2 As String, DDD As Date
Dim DDD1 As Date, DDD2 As Date, Ddd3 As Date
dY = Year(ddy)
dM = Month(ddy)
dD = Day(ddy)
D = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 - Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 1), 2))))
D1 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy))) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 1) * 4 + 3), 2))))
If Month(ddy) > 1 Then
D2 = Trim(str(Year(ddy))) + "," + Trim(str(Month(ddy) - 1)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM - 2) * 4 + 3), 2))))
Else
D2 = Trim(str(Year(ddy) - 1)) + "," + Trim(str(12)) + "," + Trim(str(15 + Val(Mid(seaSonY(dY - 1901), ((dM + 12 - 2) * 4 + 3), 2))))
End If
DDD = D
DDD1 = D1
DDD2 = D2
If ddy >= DDD Then
seaSonYx = solarTerm((dM - 1) * 2) + "第" + Trim(str(ddy - DDD + 1)) + "天"
Else
If dM < 2 Then
seaSonYx = solarTerm(11 * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
Else
seaSonYx = solarTerm((dM - 2) * 2 + 1) + "第" + Trim(str(ddy - DDD2 + 1)) + "天"
End If
End If
If ddy >= DDD1 Then
seaSonYx = solarTerm((dM - 1) * 2 + 1) + "第" + Trim(str(ddy - DDD1 + 1)) + "天"
End If
End Function
Public Function ssFtv(m As Integer, D As Integer)
Dim aa
'***************************************************
'* 返回阳历M月D日的节日 *
'***************************************************
For aa = 0 To 30
If (Val(Mid(sFtv(aa), 1, 2)) = m) And (Val(Mid(sFtv(aa), 3, 2)) = D) Then
' If aa >= 10 And aa <= 25 Then
ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' Else
' ssFtv = Mid(sFtv(aa), 5, LenB(sFtv(aa)) - 5)
' End If
End If
Next aa
End Function
Public Function llFtv(m As Integer, D As Integer)
'***************************************************
'* 返回农历M月D日的节日 *
'***************************************************
Dim aa As Integer
llFtv = ""
For aa = 0 To 30
If (Val(Mid(lFtv(aa), 1, 2)) = m) And (Val(Mid(lFtv(aa), 3, 2)) = D) Then
If aa >= 10 And aa <= 25 Then
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4) + "happy birthday"
Else
llFtv = Mid(lFtv(aa), 5, LenB(lFtv(aa)) - 4)
End If
End If
Next aa
End Function
节气等···