⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsjgl.frm

📁 朋友给的
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Caption         =   "11"
         Height          =   645
         Index           =   10
         Left            =   2280
         TabIndex        =   12
         Top             =   870
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "10"
         Height          =   645
         Index           =   9
         Left            =   1560
         TabIndex        =   11
         Top             =   870
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "9"
         Height          =   645
         Index           =   8
         Left            =   840
         TabIndex        =   10
         Top             =   870
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "8"
         Height          =   645
         Index           =   7
         Left            =   120
         TabIndex        =   9
         Top             =   870
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "7"
         Height          =   645
         Index           =   6
         Left            =   4470
         TabIndex        =   8
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "6"
         Height          =   645
         Index           =   5
         Left            =   3735
         TabIndex        =   7
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "5"
         Height          =   645
         Index           =   4
         Left            =   3000
         TabIndex        =   6
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "4"
         Height          =   645
         Index           =   3
         Left            =   2280
         TabIndex        =   5
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "3"
         Height          =   645
         Index           =   2
         Left            =   1560
         TabIndex        =   4
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "2"
         Height          =   645
         Index           =   1
         Left            =   840
         TabIndex        =   3
         Top             =   210
         Width           =   720
      End
      Begin VB.CommandButton Command1 
         Caption         =   "1"
         Height          =   645
         Index           =   0
         Left            =   120
         TabIndex        =   2
         Top             =   210
         Width           =   720
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "年月选择"
      Height          =   1035
      Left            =   240
      TabIndex        =   0
      Top             =   45
      Width           =   5250
      Begin VB.CommandButton Command3 
         Caption         =   "确定"
         Height          =   405
         Left            =   2640
         TabIndex        =   36
         Top             =   360
         Width           =   1320
      End
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   405
         Left            =   3840
         TabIndex        =   35
         Top             =   360
         Width           =   1320
      End
      Begin MSComCtl2.DTPicker NY 
         Height          =   360
         Left            =   1515
         TabIndex        =   33
         Top             =   375
         Width           =   975
         _ExtentX        =   1720
         _ExtentY        =   635
         _Version        =   393216
         Format          =   25362435
         CurrentDate     =   38915
      End
      Begin VB.Label Label1 
         Caption         =   "请选择月份"
         Height          =   390
         Left            =   315
         TabIndex        =   34
         Top             =   465
         Width           =   1830
      End
   End
End
Attribute VB_Name = "frmSJGL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public SELYear  As String
Public SELMonth As String
Public SELDAY As String

Private Sub Command1_Click(Index As Integer)
    On Error GoTo ErrHandle
    SELYear = Year(NY)
    SELMonth = Month(NY)
    SELDAY = Command1(Index).Caption
    NY = Year(NY) & "-" & Month(NY) & "-" & SELDAY
    frmSJedit.Show
    Exit Sub
ErrHandle:
    MsgBox Err.Description
    
End Sub

'Private Sub Command1_Click()
'    frmMain.sjstate = 1
'    frmSJedit.Show
'End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
    SELYear = Year(NY)
    SELMonth = Month(NY)
    SELDAY = ""
    frmSJedit.Show
End Sub

Private Sub Form_Load()
    If Me.WindowState = 0 Then Me.Move 0, 0, 5970, 6600
    NY = Date
    showny (NY)
End Sub
Private Sub showny(ny1 As String)
    Dim years, months, datefirst, datelast As String
    Dim toweek As Long
    Dim alldays As Long
    Dim i As Long
    Dim j As Long
    Dim k As Long
    years = Year(NY)
    months = Month(NY)
    If months < 12 Then
        datefirst = years & "-" & months & "-01"
        datelast = years & "-" & (months + 1) & "-01"
    ElseIf months = 12 Then
        datefirst = years & "-" & months & "-01"
        datelast = years + 1 & "-1-01"
    End If
    toweek = Weekday(datefirst)
    alldays = DateDiff("d", datefirst, datelast)
    Call showall
    If toweek = 1 Then
        For i = alldays To 37
            Command1(i).Visible = False
        Next
    ElseIf toweek = 2 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = alldays + 1 To 37
            Command1(i).Visible = False
        Next
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    ElseIf toweek = 3 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = (alldays + 2) To 37
            Command1(i).Visible = False
        Next
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    ElseIf toweek = 4 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = alldays + 3 To 37
            Command1(i).Visible = False
        Next
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    ElseIf toweek = 5 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = alldays + 4 To 37
            Command1(i).Visible = False
        Next
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    ElseIf toweek = 6 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = alldays + 5 To 37
            Command1(i).Visible = False
        Next
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    ElseIf toweek = 7 Then
        For j = 0 To toweek - 2
            Command1(j).Visible = False
        Next
        For i = alldays + 6 To 37
            Command1(i).Visible = False
        Next
        
        i = 1
        For k = toweek - 1 To alldays + toweek - 1
            Command1(k).Caption = i
            i = i + 1
        Next
    End If







End Sub
Private Sub showall()
    Dim i As Long
    For i = 0 To 37
        Command1(i).Visible = True
    Next
    
    



End Sub




Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
    







End Sub

Private Sub MTHTODAY_DateClick(ByVal DateClicked As Date)
    selDate = MTHTODAY.Value
    frmSJedit.Show
End Sub

Private Sub NY_Change()
    showny (NY)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -