主题:[原创]一个星期贴完自己写的药品进销存管理软件(七)
'文件名mainfrm.frm
'用于系统导航菜单 图形化界面
Private Sub CgLb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '采购订单
Form2.Show
Case 1 '采购退货
Case 2 '返回
Pic2.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub CgLb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
CgLb(0).ForeColor = &H80&
CgLb(1).ForeColor = &H80&
CgLb(2).ForeColor = &H80&
CgLb(Index).ForeColor = &HFF0000
'&H00000080&
End Sub
Private Sub CKFINDLB_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '出库查询
Case 1 '入库
Case 2 '入库退货
Case 3 '出库退货
Case 4 '出入库查询
InOutLook.Show 1
Case 5 '出入退库查询
Case 6
Pic4.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = " "
End Sub
Private Sub CKFINDLB_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 6
CKFINDLB(i).ForeColor = &H80&
Next i
CKFINDLB(Index).ForeColor = &HFF0000
End Sub
Private Sub CKlb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
If Index = 0 Then
CkFrm.Show
ElseIf Index = 1 Then
'出库退货
Else
Pic6.Visible = False
End If
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub CKlb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
CKlb(0).ForeColor = &H80&
CKlb(1).ForeColor = &H80&
CKlb(2).ForeColor = &H80&
CKlb(Index).ForeColor = &HFF0000
End Sub
Private Sub Form_Initialize()
InitCommonControls
End Sub
Private Sub Form_Load()
If App.PrevInstance Then
End
End If
'Form2.Show
'Unload Form2
'Me.WindowState = 2
MainFrm.ScaleWidth = 11985
MainFrm.ScaleHeight = 4545
MainFrm.Left = 0
MainFrm.Top = (frmMain.ScaleHeight - frmMain.SBar1.Height - MainFrm.Height) / 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Frame1_MouseMove 2, 1, 0, 0
End Sub
Private Sub Form_Resize()
On Error Resume Next
Exit Sub
Me.Top = 0
Me.Left = 0
Me.WindowState = 2
'Picture1.Top = 0
'Picture1.Height = Me.ScaleHeight - SBar1.Height
'Picture1.Width = Me.ScaleWidth - Picture1.Left
'Frame1.Left = (Picture1.ScaleWidth - Frame1.Width) / 2
Image3.Left = 0
Image3.Top = 0
Image3.Width = Me.Width
Image3.Height = Me.Height
Frame1.Top = (Me.ScaleHeight - Frame1.Height) / 2
End Sub
Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H80&
Label2.ForeColor = &H80&
Label3.ForeColor = &H80&
Label4.ForeColor = &H80&
Label5.ForeColor = &H80&
Label6.ForeColor = &H80&
Label7.ForeColor = &H80&
Label8.ForeColor = &H80&
For i = 0 To 9
JBZLlabel(i).ForeColor = &H80&
Next i
End Sub
Private Sub Image6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Frame1_MouseMove 2, 1, 0, 0
End Sub
Private Sub JBZLlabel_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Dim i As Integer
If Index = 9 Then
Pic1.Visible = False
frmMain.SBar1.Panels(2).Text = ""
Exit Sub
End If
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Select Case Index
Case 0
'供应商
Form1.SSTab1.TabVisible(0) = True
Case 1
'生产企业
Form1.SSTab1.TabVisible(1) = True
Case 2
'剂型
Form1.SSTab1.TabVisible(2) = True
Case 3
'药品资料
Form1.SSTab1.TabVisible(3) = True
Case 4
'单位管理
Form1.SSTab1.TabVisible(4) = True
Case 5
'客户资料
Form1.SSTab1.TabVisible(5) = True
Case 6
'员工资料
Form1.SSTab1.TabVisible(6) = True
Case 7
'药品类别
Form1.SSTab1.TabVisible(7) = True
'Form1.SSTab1.TabVisible(6) = True
Case 8
'仓库
Form1.SSTab1.TabVisible(8) = True
'Form1.SSTab1.TabVisible(6) = True
End Select
Form1.Show 1
frmMain.SBar1.Panels(2).Text = " "
End Sub
Private Sub JBZLlabel_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
JBZLlabel(Index).ForeColor = &HFF0000
End Sub
Private Sub KCLb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '库存查询
KCfrm.Show
Case 1 '库存调拔
Case 2 '库存盘点
Case 3 '库存调整
Case 4 '返回
Pic3.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub KCLb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
KCLb(0).ForeColor = &H80&
KCLb(1).ForeColor = &H80&
KCLb(2).ForeColor = &H80&
KCLb(3).ForeColor = &H80&
KCLb(4).ForeColor = &H80&
KCLb(Index).ForeColor = &HFF0000
End Sub
Private Sub Label1_Click()
'frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'Unload Form2
'Form2.Show
'frmMain.SBar1.Panels(2).Text = ""
Pic2.Left = 270
Pic2.Top = 300
Pic2.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFF0000
End Sub
Private Sub Label2_Click()
'frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'Form1.Visible = True
' SetParent Form1.hwnd, MainFrm.Picture1.hwnd
' MoveWindow Form1.hwnd, 0, 0, 0, 0, 1 '通过该函数控制位置和大小
'Form1.Width = 9630
'Form1.Height = 7755
'Form1.Left = (Me.Width - Form1.Width) / 2
'Form1.Top = (Picture1.Height - Form1.Height) / 2
' Form1.Show 1
Pic1.Left = 270
Pic1.Top = 300
Pic1.Visible = True
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ForeColor = &HFF0000
End Sub
Private Sub Label3_Click()
If Val(Mid(OperatorPower, 14, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
'KCfrm.Show
Pic3.Left = 270
Pic3.Top = 300
Pic3.Visible = True
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = &HFF0000
End Sub
Private Sub Label4_Click()
If Val(Mid(OperatorPower, 17, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'PlanFrm.Show
'SBar1.Panels(2).Text = ""
'SBar1.Panels(2).Text = "正在加载窗体请等待..."
' PlanFrm.Visible = True
' SetParent PlanFrm.hwnd, MainFrm.Picture1.hwnd
' MoveWindow PlanFrm.hwnd, 0, 0, 300, 300, 1 '通过该函数控制位置和大小
' PlanFrm.WindowState = 2
PlanFrm.Show
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.ForeColor = &HFF0000
End Sub
Private Sub Label5_Click()
MsgBox "资料编写中..."
End Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label5.ForeColor = &HFF0000
End Sub
Private Sub Label6_Click()
If MsgBox("您确定要退出系统吗?", vbYesNo + vbQuestion, "退出系统") = vbYes Then End
End Sub
Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.ForeColor = &HFF0000
End Sub
Private Sub Label7_Click()
Pic6.Top = 300
Pic6.Left = 270
Pic6.Visible = True
'CkFrm.Show
End Sub
Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label7.ForeColor = &HFF0000
End Sub
Private Sub Label8_Click()
'MsgBox "资料编写中..."
If Val(Mid(OperatorPower, 15, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
Pic4.Top = 300
Pic4.Left = 270
Pic4.Visible = True
End Sub
Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label8.ForeColor = &HFF0000
End Sub
Private Sub Pic1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
For i = 0 To 9
JBZLlabel(i).ForeColor = &H80&
Next i
End Sub
Private Sub Pict3_Click()
End Sub
Private Sub Pict3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
For i = 0 To 4
KCLb(i).ForeColor = &H80&
Next i
End Sub
Private Sub Pic2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
CgLb(0).ForeColor = &H80&
CgLb(1).ForeColor = &H80&
CgLb(2).ForeColor = &H80&
End Sub
Private Sub Pic3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
KCLb(0).ForeColor = &H80&
KCLb(1).ForeColor = &H80&
KCLb(2).ForeColor = &H80&
KCLb(3).ForeColor = &H80&
KCLb(4).ForeColor = &H80&
End Sub
Private Sub Pic4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 6
CKFINDLB(i).ForeColor = &H80&
Next i
End Sub
'用于系统导航菜单 图形化界面
Private Sub CgLb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '采购订单
Form2.Show
Case 1 '采购退货
Case 2 '返回
Pic2.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub CgLb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
CgLb(0).ForeColor = &H80&
CgLb(1).ForeColor = &H80&
CgLb(2).ForeColor = &H80&
CgLb(Index).ForeColor = &HFF0000
'&H00000080&
End Sub
Private Sub CKFINDLB_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '出库查询
Case 1 '入库
Case 2 '入库退货
Case 3 '出库退货
Case 4 '出入库查询
InOutLook.Show 1
Case 5 '出入退库查询
Case 6
Pic4.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = " "
End Sub
Private Sub CKFINDLB_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 6
CKFINDLB(i).ForeColor = &H80&
Next i
CKFINDLB(Index).ForeColor = &HFF0000
End Sub
Private Sub CKlb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
If Index = 0 Then
CkFrm.Show
ElseIf Index = 1 Then
'出库退货
Else
Pic6.Visible = False
End If
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub CKlb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
CKlb(0).ForeColor = &H80&
CKlb(1).ForeColor = &H80&
CKlb(2).ForeColor = &H80&
CKlb(Index).ForeColor = &HFF0000
End Sub
Private Sub Form_Initialize()
InitCommonControls
End Sub
Private Sub Form_Load()
If App.PrevInstance Then
End
End If
'Form2.Show
'Unload Form2
'Me.WindowState = 2
MainFrm.ScaleWidth = 11985
MainFrm.ScaleHeight = 4545
MainFrm.Left = 0
MainFrm.Top = (frmMain.ScaleHeight - frmMain.SBar1.Height - MainFrm.Height) / 2
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Frame1_MouseMove 2, 1, 0, 0
End Sub
Private Sub Form_Resize()
On Error Resume Next
Exit Sub
Me.Top = 0
Me.Left = 0
Me.WindowState = 2
'Picture1.Top = 0
'Picture1.Height = Me.ScaleHeight - SBar1.Height
'Picture1.Width = Me.ScaleWidth - Picture1.Left
'Frame1.Left = (Picture1.ScaleWidth - Frame1.Width) / 2
Image3.Left = 0
Image3.Top = 0
Image3.Width = Me.Width
Image3.Height = Me.Height
Frame1.Top = (Me.ScaleHeight - Frame1.Height) / 2
End Sub
Private Sub Frame1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H80&
Label2.ForeColor = &H80&
Label3.ForeColor = &H80&
Label4.ForeColor = &H80&
Label5.ForeColor = &H80&
Label6.ForeColor = &H80&
Label7.ForeColor = &H80&
Label8.ForeColor = &H80&
For i = 0 To 9
JBZLlabel(i).ForeColor = &H80&
Next i
End Sub
Private Sub Image6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Frame1_MouseMove 2, 1, 0, 0
End Sub
Private Sub JBZLlabel_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Dim i As Integer
If Index = 9 Then
Pic1.Visible = False
frmMain.SBar1.Panels(2).Text = ""
Exit Sub
End If
For i = 0 To 8
Form1.SSTab1.TabVisible(i) = False
Next i
Select Case Index
Case 0
'供应商
Form1.SSTab1.TabVisible(0) = True
Case 1
'生产企业
Form1.SSTab1.TabVisible(1) = True
Case 2
'剂型
Form1.SSTab1.TabVisible(2) = True
Case 3
'药品资料
Form1.SSTab1.TabVisible(3) = True
Case 4
'单位管理
Form1.SSTab1.TabVisible(4) = True
Case 5
'客户资料
Form1.SSTab1.TabVisible(5) = True
Case 6
'员工资料
Form1.SSTab1.TabVisible(6) = True
Case 7
'药品类别
Form1.SSTab1.TabVisible(7) = True
'Form1.SSTab1.TabVisible(6) = True
Case 8
'仓库
Form1.SSTab1.TabVisible(8) = True
'Form1.SSTab1.TabVisible(6) = True
End Select
Form1.Show 1
frmMain.SBar1.Panels(2).Text = " "
End Sub
Private Sub JBZLlabel_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
JBZLlabel(Index).ForeColor = &HFF0000
End Sub
Private Sub KCLb_Click(Index As Integer)
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
Select Case Index
Case 0 '库存查询
KCfrm.Show
Case 1 '库存调拔
Case 2 '库存盘点
Case 3 '库存调整
Case 4 '返回
Pic3.Visible = False
End Select
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub KCLb_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
KCLb(0).ForeColor = &H80&
KCLb(1).ForeColor = &H80&
KCLb(2).ForeColor = &H80&
KCLb(3).ForeColor = &H80&
KCLb(4).ForeColor = &H80&
KCLb(Index).ForeColor = &HFF0000
End Sub
Private Sub Label1_Click()
'frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'Unload Form2
'Form2.Show
'frmMain.SBar1.Panels(2).Text = ""
Pic2.Left = 270
Pic2.Top = 300
Pic2.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFF0000
End Sub
Private Sub Label2_Click()
'frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'Form1.Visible = True
' SetParent Form1.hwnd, MainFrm.Picture1.hwnd
' MoveWindow Form1.hwnd, 0, 0, 0, 0, 1 '通过该函数控制位置和大小
'Form1.Width = 9630
'Form1.Height = 7755
'Form1.Left = (Me.Width - Form1.Width) / 2
'Form1.Top = (Picture1.Height - Form1.Height) / 2
' Form1.Show 1
Pic1.Left = 270
Pic1.Top = 300
Pic1.Visible = True
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ForeColor = &HFF0000
End Sub
Private Sub Label3_Click()
If Val(Mid(OperatorPower, 14, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
'KCfrm.Show
Pic3.Left = 270
Pic3.Top = 300
Pic3.Visible = True
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = &HFF0000
End Sub
Private Sub Label4_Click()
If Val(Mid(OperatorPower, 17, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
frmMain.SBar1.Panels(2).Text = "正在加载窗体请等待..."
'PlanFrm.Show
'SBar1.Panels(2).Text = ""
'SBar1.Panels(2).Text = "正在加载窗体请等待..."
' PlanFrm.Visible = True
' SetParent PlanFrm.hwnd, MainFrm.Picture1.hwnd
' MoveWindow PlanFrm.hwnd, 0, 0, 300, 300, 1 '通过该函数控制位置和大小
' PlanFrm.WindowState = 2
PlanFrm.Show
frmMain.SBar1.Panels(2).Text = ""
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.ForeColor = &HFF0000
End Sub
Private Sub Label5_Click()
MsgBox "资料编写中..."
End Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label5.ForeColor = &HFF0000
End Sub
Private Sub Label6_Click()
If MsgBox("您确定要退出系统吗?", vbYesNo + vbQuestion, "退出系统") = vbYes Then End
End Sub
Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.ForeColor = &HFF0000
End Sub
Private Sub Label7_Click()
Pic6.Top = 300
Pic6.Left = 270
Pic6.Visible = True
'CkFrm.Show
End Sub
Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label7.ForeColor = &HFF0000
End Sub
Private Sub Label8_Click()
'MsgBox "资料编写中..."
If Val(Mid(OperatorPower, 15, 1)) = 0 Then
MsgBox "对不起 您没有查询商品相应进出记录的权限 请像您的管理员询问", vbOKOnly + vbCritical, ""
Exit Sub
End If
Pic4.Top = 300
Pic4.Left = 270
Pic4.Visible = True
End Sub
Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label8.ForeColor = &HFF0000
End Sub
Private Sub Pic1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
For i = 0 To 9
JBZLlabel(i).ForeColor = &H80&
Next i
End Sub
Private Sub Pict3_Click()
End Sub
Private Sub Pict3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Integer
For i = 0 To 4
KCLb(i).ForeColor = &H80&
Next i
End Sub
Private Sub Pic2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
CgLb(0).ForeColor = &H80&
CgLb(1).ForeColor = &H80&
CgLb(2).ForeColor = &H80&
End Sub
Private Sub Pic3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
KCLb(0).ForeColor = &H80&
KCLb(1).ForeColor = &H80&
KCLb(2).ForeColor = &H80&
KCLb(3).ForeColor = &H80&
KCLb(4).ForeColor = &H80&
End Sub
Private Sub Pic4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 6
CKFINDLB(i).ForeColor = &H80&
Next i
End Sub