📄 frmrili.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{FE0065C0-1B7B-11CF-9D53-00AA003C9CB6}#1.1#0"; "COMCT232.OCX"
Begin VB.Form frmRiLi
BorderStyle = 3 'Fixed Dialog
Caption = "日历"
ClientHeight = 2985
ClientLeft = 45
ClientTop = 330
ClientWidth = 4485
ControlBox = 0 'False
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmRiLi.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2985
ScaleWidth = 4485
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "确定(&K)"
Height = 435
Left = 3120
TabIndex = 3
Top = 75
Width = 1275
End
Begin VB.PictureBox PicMonth
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1665
ScaleHeight = 345
ScaleWidth = 810
TabIndex = 5
Top = 90
Width = 870
Begin ComCtl2.UpDown VScrollMonth
Height = 360
Left = 540
TabIndex = 10
Top = -15
Width = 270
_ExtentX = 476
_ExtentY = 635
_Version = 327681
BuddyControl = "txtMonth"
BuddyDispid = 196611
OrigLeft = 540
OrigRight = 810
OrigBottom = 360
SyncBuddy = -1 'True
Wrap = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.TextBox txtMonth
Alignment = 2 'Center
Appearance = 0 'Flat
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 60
MaxLength = 2
TabIndex = 2
Text = "3"
Top = 60
Width = 420
End
End
Begin VB.PictureBox picYear
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 105
ScaleHeight = 345
ScaleWidth = 1080
TabIndex = 4
Top = 90
Width = 1140
Begin ComCtl2.UpDown VScrollYear
Height = 375
Left = 810
TabIndex = 9
Top = -15
Width = 270
_ExtentX = 476
_ExtentY = 661
_Version = 327681
BuddyControl = "txtYear"
BuddyDispid = 196613
OrigLeft = 810
OrigTop = 15
OrigRight = 1080
OrigBottom = 390
SyncBuddy = -1 'True
Wrap = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.TextBox txtYear
Alignment = 2 'Center
Appearance = 0 'Flat
BorderStyle = 0 'None
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 105
MaxLength = 4
TabIndex = 1
Text = "2000"
Top = 45
Width = 555
End
End
Begin MSFlexGridLib.MSFlexGrid msfGrid
Height = 2400
Left = 0
TabIndex = 0
Top = 615
Width = 4485
_ExtentX = 7911
_ExtentY = 4233
_Version = 393216
Rows = 7
Cols = 7
FixedCols = 0
BackColorFixed = 12648447
ForeColorFixed = 192
BackColorSel = 12582912
AllowBigSelection= 0 'False
TextStyleFixed = 3
HighLight = 0
FillStyle = 1
ScrollBars = 0
FormatString = "dddd"
End
Begin VB.TextBox txtFocus
Height = 315
Left = 1470
TabIndex = 8
Text = "Text1"
Top = 1830
Width = 855
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "月"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 2580
TabIndex = 7
Top = 195
Width = 240
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "年"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1365
TabIndex = 6
Top = 195
Width = 240
End
End
Attribute VB_Name = "frmRiLi"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public mRetDate As String
Dim mOldRow As Integer
Dim mOldCol As Integer
Dim mCurDay As Integer
Dim misToCheckMouse As Boolean '是否检查mouserow,mousecol
Dim misRefresh As Boolean '要不要刷新行和列,在RefreshDayList更换行列时 不misrefresh=false
Dim misStart As Boolean '判断是否刚开始,开始的时候不刷新RefreshDayList
Dim mSelDate As Integer '选择的日期
Private Sub Command1_Click()
' Dim tmpDate As String
' Select Case Trim(Me.Tag)
' Case UCase("frmMain")
' tmpDate = getDate
' frmMain.mRetDate = tmpDate
' End Select
mRetDate = getDate
Me.Hide
End Sub
Private Function getDate() As String
getDate = Format(DateSerial(Val(txtYear), Val(txtMonth), _
Val(msfGrid.TextMatrix(msfGrid.row, msfGrid.col))), _
"yyyy-mm-dd")
End Function
Private Sub Form_Activate()
misToCheckMouse = False
misRefresh = False
misStart = True
mSelDate = Day(Date)
mCurDay = mSelDate 'Day(Date)
txtYear = Year(Date)
txtMonth = Month(Date)
IniVscroll
iniGrid
misStart = False
RefreshDayList
End Sub
Private Sub IniVscroll()
With VScrollYear
.Max = 9999
.Min = 1919
.Increment = 1
'.SmallChange = 1
.Value = Year(Date)
End With
With VScrollMonth
.Max = 12
.Min = 1
'.LargeChange = 1
.Increment = 1
.Value = Month(Date)
End With
End Sub
Private Sub iniGrid()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -