主题:[原创]一个星期贴完自己写的药品进销存管理软件(五)
'文件名:
'frmmain.frm
'软件主画面MDI窗体
Public ShowMainFrm As Boolean
'Private Sub Command1_Click()
'TreeView1.Nodes.Clear
'TreeView1.Nodes.Add , , , "所有操作"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "基本资料"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "采购入库"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "商品出库"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "出入库查询"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "综合一览"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "财务分析"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "库存查询"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "退出系统"
'TreeView1.Nodes(1).Expanded = True
'End Sub
Private Sub MDIForm_Load()
WindowsXPC1.InitSubClassing
Picture1.Visible = False
ShowMainFrm = False
ShowMainFrm = True
MainFrm.Show
DLokFrm.Show 1
End Sub
Private Sub MDIForm_Resize()
If 退出导航.Caption = "退出导航" Then
MainFrm.ScaleWidth = 11985
MainFrm.ScaleHeight = 4545
MainFrm.Left = 0 '(frmMain.ScaleWidth - frmMain.Picture1.ScaleWidth - MainFrm.Width) / 2
MainFrm.Top = (frmMain.ScaleHeight - frmMain.SBar1.Height - MainFrm.Height) / 2
End If
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
If MsgBox("您是否要退出?", vbYesNo + vbQuestion, "退出") = vbNo Then Cancel = -1: Exit Sub
End
End Sub
Private Sub sysset_Click()
SysSetFrm.SSTab1.TabVisible(1) = False
SysSetFrm.Show 1
End Sub
Private Sub 保存风格_Click()
SaveGridWith GridObject, FormCaption, SaveR
End Sub
Private Sub 层叠_Click()
Me.Arrange vbCascade
End Sub
Private Sub 打开左边栏_Click()
If 打开左边栏.Caption = "关闭左边栏" Then
Picture1.Visible = False
打开左边栏.Caption = "打开左边栏"
Else
Picture1.Visible = True
打开左边栏.Caption = "关闭左边栏"
End If
End Sub
Private Sub 单位管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(4) = True
Form1.Show 1
End Sub
Private Sub 供应商管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(0) = True
Form1.Show 1
End Sub
Private Sub 关于_Click()
frmSplash.Label1.Visible = False
frmSplash.Bar1.Visible = False
ShowSm = True
frmSplash.Show 1
End Sub
Private Sub 横向平铺_Click()
Me.Arrange vbTileHorizontal
End Sub
Private Sub 剂型管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(2) = True
Form1.Show 1
End Sub
Private Sub 客户管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(5) = True
Form1.Show 1
End Sub
Private Sub 默认风格_Click()
'MsgBox Me.ActiveForm.Caption
SetGridWith GridObject, FormCaption
End Sub
Private Sub 删除行_Click()
DeleteGrid Me.ActiveForm.Grid1, Me.ActiveForm.Bar1
End Sub
Private Sub 生产企业管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(1) = True
'Form1.SSTab1_Click 1
Form1.Show 1
End Sub
Private Sub 所有基本资料_Click()
Form1.Show 1
End Sub
Private Sub 退出_Click()
Unload Me
End Sub
Private Sub 退出导航_Click()
If 退出导航.Caption = "退出导航" Then
ShowMainFrm = False
Unload MainFrm
退出导航.Caption = "打开导航"
Else
ShowMainFrm = True
MainFrm.Show
退出导航.Caption = "退出导航"
End If
End Sub
Private Sub 修改密码_Click()
EditUserFrm.Show 1
End Sub
Private Sub 药品资料管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(3) = True
Form1.Show 1
End Sub
Private Sub 用户管理_Click()
SysSetFrm.SSTab1.TabVisible(0) = False
SysSetFrm.Show 1
End Sub
Private Sub 员工管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(6) = True
Form1.Show 1
End Sub
Private Sub 纵向平铺_Click()
Me.Arrange vbTileVertical
End Sub
'frmmain.frm
'软件主画面MDI窗体
Public ShowMainFrm As Boolean
'Private Sub Command1_Click()
'TreeView1.Nodes.Clear
'TreeView1.Nodes.Add , , , "所有操作"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "基本资料"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "采购入库"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "商品出库"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "出入库查询"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "综合一览"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "财务分析"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "库存查询"
'TreeView1.Nodes.Add TreeView1.Nodes(1), tvwChild, , "退出系统"
'TreeView1.Nodes(1).Expanded = True
'End Sub
Private Sub MDIForm_Load()
WindowsXPC1.InitSubClassing
Picture1.Visible = False
ShowMainFrm = False
ShowMainFrm = True
MainFrm.Show
DLokFrm.Show 1
End Sub
Private Sub MDIForm_Resize()
If 退出导航.Caption = "退出导航" Then
MainFrm.ScaleWidth = 11985
MainFrm.ScaleHeight = 4545
MainFrm.Left = 0 '(frmMain.ScaleWidth - frmMain.Picture1.ScaleWidth - MainFrm.Width) / 2
MainFrm.Top = (frmMain.ScaleHeight - frmMain.SBar1.Height - MainFrm.Height) / 2
End If
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
If MsgBox("您是否要退出?", vbYesNo + vbQuestion, "退出") = vbNo Then Cancel = -1: Exit Sub
End
End Sub
Private Sub sysset_Click()
SysSetFrm.SSTab1.TabVisible(1) = False
SysSetFrm.Show 1
End Sub
Private Sub 保存风格_Click()
SaveGridWith GridObject, FormCaption, SaveR
End Sub
Private Sub 层叠_Click()
Me.Arrange vbCascade
End Sub
Private Sub 打开左边栏_Click()
If 打开左边栏.Caption = "关闭左边栏" Then
Picture1.Visible = False
打开左边栏.Caption = "打开左边栏"
Else
Picture1.Visible = True
打开左边栏.Caption = "关闭左边栏"
End If
End Sub
Private Sub 单位管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(4) = True
Form1.Show 1
End Sub
Private Sub 供应商管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(0) = True
Form1.Show 1
End Sub
Private Sub 关于_Click()
frmSplash.Label1.Visible = False
frmSplash.Bar1.Visible = False
ShowSm = True
frmSplash.Show 1
End Sub
Private Sub 横向平铺_Click()
Me.Arrange vbTileHorizontal
End Sub
Private Sub 剂型管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(2) = True
Form1.Show 1
End Sub
Private Sub 客户管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(5) = True
Form1.Show 1
End Sub
Private Sub 默认风格_Click()
'MsgBox Me.ActiveForm.Caption
SetGridWith GridObject, FormCaption
End Sub
Private Sub 删除行_Click()
DeleteGrid Me.ActiveForm.Grid1, Me.ActiveForm.Bar1
End Sub
Private Sub 生产企业管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(1) = True
'Form1.SSTab1_Click 1
Form1.Show 1
End Sub
Private Sub 所有基本资料_Click()
Form1.Show 1
End Sub
Private Sub 退出_Click()
Unload Me
End Sub
Private Sub 退出导航_Click()
If 退出导航.Caption = "退出导航" Then
ShowMainFrm = False
Unload MainFrm
退出导航.Caption = "打开导航"
Else
ShowMainFrm = True
MainFrm.Show
退出导航.Caption = "退出导航"
End If
End Sub
Private Sub 修改密码_Click()
EditUserFrm.Show 1
End Sub
Private Sub 药品资料管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(3) = True
Form1.Show 1
End Sub
Private Sub 用户管理_Click()
SysSetFrm.SSTab1.TabVisible(0) = False
SysSetFrm.Show 1
End Sub
Private Sub 员工管理_Click()
Dim i As Integer
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Form1.SSTab1.TabVisible(6) = True
Form1.Show 1
End Sub
Private Sub 纵向平铺_Click()
Me.Arrange vbTileVertical
End Sub