DTPicker 的时间怎么不能用二十四小时制,要怎么样才能呢ListView 用网格时,我想让上下两根网格线的距离大些,在字体不变的基础上
这样才能看的更清楚呀.

解决方案 »

  1.   

    1、属性页
       Fromat:2-dtpTime2、最好给ListView加背景。
      

  2.   

    我是用自定义格式的  yyyy-MM-dd hh:mm如果选2的话,就没有日期了.给ListView加背景, 我试了,  不行啊!
      

  3.   

    1.自定义格式的  "yyyy-MM-dd hh:mm"
    MM大写
    2.最好用VsFlexGrid网格控件,留个Email:Cyj888888◎SINA.COM,我有这个控件。
      

  4.   

    第一个问题:我用两个DTPicker ,一个日期,一个时间
    第二个问题:再试试就加上了。
    ^_^
      

  5.   

    在窗口上加一个Picture,visible--false
    Public Sub SetBackColor(lvList As ListView, picBoard As PictureBox, Optional FirstColor As ColorConstants = &HE2F1E3, Optional SecondColor As ColorConstants = vbWhite)
        '只有详细资料格式的情况下才有这种显示出的需要
        If lvList.View = lvwReport Then
            Dim iHeight As Single
            Dim i As Long
            iHeight = 0
            lvList.Visible = False
            i = lvList.ListItems.Count + 1
            lvList.ListItems.Add i, "Test"
            iHeight = lvList.ListItems(i).Height
            lvList.ListItems.Remove i
            lvList.Visible = True
            iHeight = iHeight + Screen.TwipsPerPixelY * 2
            With picBoard
                .Cls
                .AutoRedraw = True
                .BackColor = lvList.BackColor
                .ScaleMode = vbTwips
                .Visible = False
                .Font = lvList.Font
                .Width = lvList.Width
                .Height = iHeight * 2
            End With
            picBoard.Line (0, 0)-(picBoard.Width, picBoard.Height / 2), &HE2F1E3, BF
            picBoard.Line (0, picBoard.Height / 2)-(picBoard.Width, picBoard.Height), vbWhite, BF
            lvList.PictureAlignment = lvwTile
            lvList.Picture = picBoard.Image
        End If
    End Sub
      

  6.   

    在窗口上加一个Picture,visible--false
    Public Sub SetBackColor(lvList As ListView, picBoard As PictureBox, Optional FirstColor As ColorConstants = &HE2F1E3, Optional SecondColor As ColorConstants = vbWhite)
        '只有详细资料格式的情况下才有这种显示出的需要
        If lvList.View = lvwReport Then
            Dim iHeight As Single
            Dim i As Long
            iHeight = 0
            lvList.Visible = False
            i = lvList.ListItems.Count + 1
            lvList.ListItems.Add i, "Test"
            iHeight = lvList.ListItems(i).Height
            lvList.ListItems.Remove i
            lvList.Visible = True
            iHeight = iHeight + Screen.TwipsPerPixelY * 2
            With picBoard
                .Cls
                .AutoRedraw = True
                .BackColor = lvList.BackColor
                .ScaleMode = vbTwips
                .Visible = False
                .Font = lvList.Font
                .Width = lvList.Width
                .Height = iHeight * 2
            End With
            picBoard.Line (0, 0)-(picBoard.Width, picBoard.Height / 2), &HE2F1E3, BF
            picBoard.Line (0, picBoard.Height / 2)-(picBoard.Width, picBoard.Height), vbWhite, BF
            lvList.PictureAlignment = lvwTile
            lvList.Picture = picBoard.Image
        End If
    End Sub
      

  7.   

    第一個問題: yyyy-MM-dd hh:mm:ss
      

  8.   

    第一个问题:自定义格式
     Format (DTPicker1.value,"yyyy-mm-dd hh:mm:ss")
      

  9.   

    补充:Format (dtpicker1.value ,"yyyy-mm-dd hh24:mi:ss")