如题如下文,请教各位大侠老师们,谢谢!!!
此主题相关图片如下:1.png
【图1的代码如下】:
【窗口事件→AfterLoad】
Dim lbl As WinForm.Label
lbl = e.Form.Controls("Label7")
Dim ln As New Lunar(Date.Today)
Dim s As String = ln.LunarDate
Dim v() As String = s.Split("-")
Dim r As String = CLNum(v(2))
Dim r2 As String = IIF(r.length=2,r.Insert(1,"十"),r)
Dim r1 As String =IIF(r2.EndsWith("零"),r2.Replace("零",""),r2)
If r1.length=1 Then
s = " 【北京时间】:" & CLDate(Date.Today) & " "& Format(Date.Today,"dddd") & " " &"【农历】:" & CLNum(v(0)) & "年" & CLNum(v(1)) & "月" & IIF(r1.length=1,r1.Insert(0,"初"),r1)
lbl.Text = s.Replace("零","O") & " 竭诚为您服务 ! "
Else
s = " 【北京时间】:" & CLDate(Date.Today) & " "& Format(Date.Today,"dddd") & " " &"【农历】:" & CLNum(v(0)) & "年" & CLNum(v(1)) & "月" & IIF(r2.EndsWith("零"),r2.Replace("零",""),r2) & "日"
lbl.Text = s.Replace("零","O") & " 竭诚为您服务 ! "
End If
【窗口事件→TimerTick】
Dim t As Date = Date.Now
e.Form.Controls("Label8").text = Format(t, "T")
---------------------------------------------------分--------割---------线--------------------------------------------------
此主题相关图片如下:2.png
【图2代码如下】:
【窗口事件→AfterLoad】
Dim lbl As WinForm.Label
lbl = e.Form.Controls("Label7")
Dim ln As New Lunar(Date.Today)
Dim s As String = ln.LunarDate
Dim v() As String = s.Split("-")
Dim r As String = CLNum(v(2))
Dim r2 As String = IIF(r.length=2,r.Insert(1,"十"),r)
Dim r1 As String =IIF(r2.EndsWith("零"),r2.Replace("零",""),r2)
If r1.length=1 Then
s = " 【北京时间】:" & CLDate(Date.Today) & " "& Format(Date.Today,"dddd") & " "& Format(DateTime.Today,"F") & " " &"【农历】:" & CLNum(v(0)) & "年" & CLNum(v(1)) & "月" & IIF(r1.length=1,r1.Insert(0,"初"),r1)
lbl.Text = s.Replace("零","O") & " 竭诚为您服务 ! "
Else
s = " 【北京时间】:" & CLDate(Date.Today) & " "& Format(Date.Today,"dddd") & " "& Format(DateTime.Today,"F") & " " &"【农历】:" & CLNum(v(0)) & "年" & CLNum(v(1)) & "月" & IIF(r2.EndsWith("零"),r2.Replace("零",""),r2) & "日"
lbl.Text = s.Replace("零","O") & " 竭诚为您服务 ! "
End If
[此贴子已经被作者于2016/1/25 11:56:58编辑过]