我调整了一下代码,实现了我想要的功能,但对代码内容理解不够,能不能请老师给下面的代码添加一下注释?再次表示感谢。
static ln As New Lunar(Date.Today)
Dim str As String = ""
Dim d As Date = cdate(ln.LunarDate)
If d.Day <= 10 Then
str = cldate(d).Substring(5).trim("日")
str = str.Insert(str.Length-1, "初")
Else
str = cldate(d).Substring(5).trim("日")
End If
statusBar.Message1 = "当前用户:" & User.Name & " " & Format(Date.Today,"yyyy-MM-dd" & " " & format(Date.now, "HH:mm:ss") & " 农历" & str & " " & Format(Date.Today,"dddd" ))
statusBar.DefaultMessage = statusBar.Message1