📄 frmmain.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.MDIForm MainMDI
BackColor = &H8000000C&
Caption = "欢迎使用本系统"
ClientHeight = 7245
ClientLeft = 165
ClientTop = 735
ClientWidth = 11730
LinkTopic = "MDIForm1"
Picture = "frmmain.frx":0000
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComDlg.CommonDialog CommonDialog1
Left = 360
Top = 5280
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Menu xt
Caption = "系统"
Begin VB.Menu gl
Caption = "用户管理"
End
Begin VB.Menu ggmm
Caption = "更改密码"
End
Begin VB.Menu bf
Caption = "备份数据"
End
Begin VB.Menu dr
Caption = "导入数据"
End
End
Begin VB.Menu xprk
Caption = "新药品入库"
End
Begin VB.Menu gqcl
Caption = "过期药品处理"
End
Begin VB.Menu dh
Caption = "订货"
End
Begin VB.Menu tj
Caption = "统计"
End
Begin VB.Menu cx
Caption = "查询"
End
Begin VB.Menu about
Caption = "关于"
End
End
Attribute VB_Name = "MainMDI"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim fso As New FileSystemObject
Private Sub about_Click()
frmAbout.Show
End Sub
Private Sub bf_Click()
Dim fil, i As Integer, ch As String, bak As String, bakname As String
Set fil = fso.GetFile(App.Path & "\data\yp.mdb")
bakname = Now
For i = 1 To Len(bakname)
ch = Mid(bakname, i, 1)
If ch <> "-" And ch <> ":" And ch <> " " Then
bak = bak & ch
End If
Next i
bak = bak & ".bak"
fil.Copy App.Path & "\bak\" & bak
MsgBox "备份成功!", 0, "系统提示"
End Sub
Private Sub cx_Click()
frmserch.Show
End Sub
Private Sub dh_Click()
frmdhtj.Show
End Sub
Private Sub dr_Click()
Dim oname As String, nname As String
CommonDialog1.ShowOpen
On Error GoTo Qx
Set fil = fso.GetFile(CommonDialog1.FileName)
fil.Copy App.Path & "\data\yp.mdb"
Set module1.cn = New ADODB.Connection
module1.cn.Open "Dbq=" & App.Path & "\data\yp.mdb;Driver={Microsoft Access Driver (*.mdb)}"
MsgBox "导入成功", 0, "系统提示"
CommonDialog1.FileName = ""
Qx:
Exit Sub
End Sub
Private Sub ggmm_Click()
chpwd.Show
End Sub
Private Sub gl_Click()
glyh.Show
End Sub
Private Sub gqcl_Click()
frmclear.Show
End Sub
Private Sub MDIForm_Load()
If module1.Qx = "普通" Then
gl.Visible = False
End If
End Sub
Private Sub tj_Click()
frmprint.Show
End Sub
Private Sub xprk_Click()
frminput.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -