⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdifrmmain.frm

📁 数据库在VB界面上的实现.如何实现数据库登陆界面、以何种形式登陆、销售系统界面等
💻 FRM
字号:
VERSION 5.00
Begin VB.MDIForm MDIfrmMain 
   BackColor       =   &H8000000C&
   Caption         =   "销售系统"
   ClientHeight    =   6180
   ClientLeft      =   165
   ClientTop       =   450
   ClientWidth     =   7935
   LinkTopic       =   "MDIForm1"
   WindowState     =   2  'Maximized
   Begin VB.Menu mnlogin 
      Caption         =   "登录系统"
      Begin VB.Menu mnemlogin 
         Caption         =   "登录"
      End
      Begin VB.Menu mnadduser 
         Caption         =   "添加用户"
         Shortcut        =   ^Y
      End
      Begin VB.Menu mnchpwd 
         Caption         =   "修改密码"
         Shortcut        =   ^M
      End
      Begin VB.Menu mnexit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu mntrade 
      Caption         =   "交易管理"
      Begin VB.Menu mnbuylog 
         Caption         =   "进货登记"
         Shortcut        =   ^J
      End
      Begin VB.Menu mnselllog 
         Caption         =   "销售登记"
         Shortcut        =   ^X
      End
      Begin VB.Menu mnretreat 
         Caption         =   "退货登记"
         Shortcut        =   ^T
      End
   End
   Begin VB.Menu mnbuy 
      Caption         =   "进货统计"
      Begin VB.Menu mntbuy 
         Caption         =   "今日进货量"
      End
      Begin VB.Menu mnthmbuy 
         Caption         =   "本月进货量"
      End
      Begin VB.Menu mnthsbuy 
         Caption         =   "本季度进货量"
      End
      Begin VB.Menu mnthybuy 
         Caption         =   "今年进货量"
      End
   End
   Begin VB.Menu mnsell 
      Caption         =   "销售统计"
      Begin VB.Menu mntsell 
         Caption         =   "今日销售量"
      End
      Begin VB.Menu mnthmsell 
         Caption         =   "本月销售量"
      End
      Begin VB.Menu mnthssell 
         Caption         =   "本季度售量"
      End
      Begin VB.Menu mnthysell 
         Caption         =   "今年销售量"
      End
   End
   Begin VB.Menu mngrade 
      Caption         =   "业绩查看"
   End
   Begin VB.Menu mntable 
      Caption         =   "查看数据表"
      Begin VB.Menu mngoodstable 
         Caption         =   "现存货表"
      End
      Begin VB.Menu mnselltable 
         Caption         =   "已售商品表"
      End
      Begin VB.Menu mnretable 
         Caption         =   "退货表"
      End
      Begin VB.Menu mnem 
         Caption         =   "员工表"
      End
      Begin VB.Menu mnfc 
         Caption         =   "进货商表"
      End
   End
End
Attribute VB_Name = "MDIfrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub MDIForm_Load()
   
  ' 在主窗体中打开对数据库的连接
   Dim strCnn As String   '定义一个连接串变量
   'strCnn = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=SellSystem"
   'strCnn = "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=sellsystem;Data Source=(local)"
   'conn.Open strCnn
   '没有登录前设置各菜单不可用
   MDIfrmMain.mnadduser.Enabled = False
   MDIfrmMain.mnchpwd.Enabled = False
   MDIfrmMain.mntrade.Enabled = False
   MDIfrmMain.mnbuy.Enabled = False
   MDIfrmMain.mnsell.Enabled = False
   MDIfrmMain.mngrade.Enabled = False
   MDIfrmMain.mntable.Enabled = False
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)
    If conn.State = adStateOpen Then
        conn.Close
    End If
End Sub

Private Sub mnbuylog_Click()
frmaddgoods.Show
End Sub

Private Sub mnemlogin_Click()
    frmConnect.Show
    frmConnect.SetFocus
End Sub

Private Sub Form_Load()
'让窗体居中
Call MakeCenter(Me)
End Sub

Private Sub mnretreat_Click()
frmretreat.Show
End Sub

Private Sub mnselllog_Click()
frmsell.Show
End Sub

Private Sub mntbuy_Click()
frmbuyst.sstabbuy.Tab = 0
frmbuyst.Show
End Sub

Private Sub mnthmbuy_Click()
frmbuyst.sstabbuy.Tab = 1
frmbuyst.Show
End Sub
Private Sub mnthsbuy_Click()
frmbuyst.sstabbuy.Tab = 2
frmbuyst.Show
End Sub
Private Sub mnthybuy_Click()
frmbuyst.sstabbuy.Tab = 3
frmbuyst.Show
End Sub

Private Sub mntsell_Click()
frmsellst.sstabsell.Tab = 0
frmsellst.Show
End Sub
Private Sub mnthmsell_Click()
frmsellst.sstabsell.Tab = 1
frmsellst.Show
End Sub
Private Sub mnthssell_Click()
frmsellst.sstabsell.Tab = 2
frmsellst.Show
End Sub
Private Sub mnthysell_Click()
frmsellst.sstabsell.Tab = 3
frmsellst.Show
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -