📄 frmht.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmHT
BorderStyle = 1 'Fixed Single
Caption = "合同到期提醒管理"
ClientHeight = 5820
ClientLeft = 45
ClientTop = 330
ClientWidth = 7155
Icon = "frmHT.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5820
ScaleWidth = 7155
Begin TabDlg.SSTab SSTab1
Height = 5415
Left = 0
TabIndex = 0
Top = 0
Width = 6855
_ExtentX = 12091
_ExtentY = 9551
_Version = 393216
Tabs = 2
TabHeight = 520
TabCaption(0) = "合同到期提醒"
TabPicture(0) = "frmHT.frx":0442
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "grdHT"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "设定"
TabPicture(1) = "frmHT.frx":045E
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "Frame1"
Tab(1).Control(1)= "Frame2"
Tab(1).Control(2)= "cdgMP"
Tab(1).ControlCount= 3
Begin VB.Frame Frame1
Height = 1455
Left = -74880
TabIndex = 3
Top = 480
Width = 6615
Begin VB.CheckBox chkBF
Caption = "启动时播放音乐"
Height = 255
Left = 1440
TabIndex = 6
Top = 360
Width = 1695
End
Begin VB.TextBox txtMP
Height = 270
Left = 1440
TabIndex = 5
Top = 840
Width = 3375
End
Begin VB.CommandButton cmdBrower
Caption = "浏览(&B)..."
Height = 255
Left = 5040
TabIndex = 4
Top = 840
Width = 1095
End
Begin MSForms.CommandButton cmdYL
Height = 375
Left = 5040
TabIndex = 7
Top = 240
Width = 1095
Caption = "预览"
Size = "1931;661"
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
End
Begin VB.Frame Frame2
Height = 1215
Left = -74880
TabIndex = 1
Top = 1920
Width = 6615
Begin VB.TextBox txtMsg
Height = 270
Left = 1440
MaxLength = 255
TabIndex = 9
Top = 720
Width = 4695
End
Begin VB.CheckBox chkMsg
Caption = "启动时弹出对话框"
Height = 255
Left = 1440
TabIndex = 2
Top = 240
Width = 1815
End
End
Begin MSFlexGridLib.MSFlexGrid grdHT
Height = 4575
Left = 120
TabIndex = 8
Top = 600
Width = 6615
_ExtentX = 11668
_ExtentY = 8070
_Version = 393216
ForeColor = -2147483635
ForeColorFixed = -2147483635
BackColorBkg = -2147483634
GridColor = 16744576
SelectionMode = 1
End
Begin MSComDlg.CommonDialog cdgMP
Left = -71280
Top = 3840
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
End
End
Attribute VB_Name = "frmHT"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim musicpath As String
Private Sub chkBF_Click()
If chkBF.Value = 1 Then
txtMP.Enabled = True
cmdBrower.Enabled = True
Else
txtMP.Enabled = False
cmdBrower.Enabled = False
End If
End Sub
Private Sub chkMsg_Click()
If chkMsg.Value = 1 Then
txtMsg.Enabled = True
Else
txtMsg.Enabled = False
End If
End Sub
Private Sub cmdBrower_Click()
Dim gv As String
cdgMP.Filter = "mp3文件(*.mp3)|*.mp3"
cdgMP.ShowOpen
If cdgMP.FileName <> "" Then
txtMP.Text = cdgMP.FileName
End If
End Sub
Private Sub cmdYL_Click()
musicpath = txtMP.Text
If cmdYL.Caption = "预览" Then
playmusic musicpath
cmdYL.Caption = "停止"
Else
stopmusic musicpath
cmdYL.Caption = "预览"
End If
End Sub
Private Sub Form_Load()
Me.Left = ReadIni("合同到期提醒", "left")
Me.Top = ReadIni("合同到期提醒", "top")
Call GetSRList
SSTab1.Tab = 0
'从设置里读取配置信息
Dim bfyy As Integer
chkBF.Value = ReadIni("合同到期提醒", "启动时播放音乐")
If chkBF.Value = 1 Then
txtMP.Enabled = True
cmdBrower.Enabled = True
Else
txtMP.Enabled = False
cmdBrower.Enabled = False
End If
txtMP = ReadSIni("合同到期提醒", "音乐路径")
chkMsg.Value = ReadIni("合同到期提醒", "启动时弹出对话框")
If chkMsg.Value = 1 Then
txtMsg.Enabled = True
Else
txtMsg.Enabled = False
End If
txtMsg.Text = ReadSIni("合同到期提醒", "提示文本")
End Sub
Private Sub GetSRList()
Dim rs As ADODB.Recordset
Dim strSql As String
Dim strMsg As String
strSql = "select * from t_br where 合同终止时间=#" & Date & "#"
Set rs = ExecuteSQL(strSql, strMsg)
Call FillData(rs, grdHT)
Set rs = Nothing
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call WriteIni("合同到期提醒", "left", Me.Left)
Call WriteIni("合同到期提醒", "top", Me.Top)
Call WriteIni("合同到期提醒", "启动时播放音乐", chkBF.Value)
Call WriteSIni("合同到期提醒", "音乐路径", txtMP.Text)
Call WriteIni("合同到期提醒", "启动时弹出对话框", chkMsg.Value)
Call WriteSIni("合同到期提醒", "提示文本", txtMsg.Text)
End Sub
Private Sub grdHT_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -