Foxtable(狐表)用户栏目专家坐堂 → 如何在状态栏显示农历日期及星期


  共有2308人关注过本帖平板打印复制链接

主题:如何在状态栏显示农历日期及星期

帅哥哟,离线,有人找我吗?
zyxhx
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:388 积分:3206 威望:0 精华:0 注册:2017/4/2 19:33:00
  发帖心情 Post By:2017/4/17 16:16:00 [只看该作者]

我调整了一下代码,实现了我想要的功能,但对代码内容理解不够,能不能请老师给下面的代码添加一下注释?再次表示感谢。

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

 回到顶部
总数 14 1 2 下一页