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

📄 mdifrmmain.frm

📁 客户管理是CRM的基础核心部分
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.MDIForm MDIFrmMain 
   BackColor       =   &H8000000C&
   Caption         =   "客户管理系统"
   ClientHeight    =   7650
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   10650
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.Toolbar tbToolBar 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   10650
      _ExtentX        =   18785
      _ExtentY        =   741
      ButtonWidth     =   609
      ButtonHeight    =   582
      Appearance      =   1
      ImageList       =   "imlToolbarIcons"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   5
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "客户"
            ImageKey        =   "Client"
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "工作计划"
            ImageKey        =   "Plan"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "关闭"
            ImageKey        =   "Close"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList imlToolbarIcons 
      Left            =   4920
      Top             =   840
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "MDIFrmMain.frx":0000
            Key             =   "Close"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "MDIFrmMain.frx":015A
            Key             =   "Plan"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "MDIFrmMain.frx":0474
            Key             =   "Client"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   270
      Left            =   0
      TabIndex        =   0
      Top             =   7380
      Width           =   10650
      _ExtentX        =   18785
      _ExtentY        =   476
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   13123
            Text            =   "状态"
            TextSave        =   "状态"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2005-7-4"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "22:30"
         EndProperty
      EndProperty
   End
   Begin VB.Menu mnuFile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuFileClose 
         Caption         =   "关闭(&C)"
      End
   End
   Begin VB.Menu mnuView 
      Caption         =   "查看(&V)"
      Begin VB.Menu mnuViewClient 
         Caption         =   "客户管理(&C)"
      End
      Begin VB.Menu mnuViewPlan 
         Caption         =   "工作计划(&P)"
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu mnuHelpAbout 
         Caption         =   "关于(A)..."
      End
   End
End
Attribute VB_Name = "MDIFrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'多文档界面的主窗口
Option Explicit
Private Sub MDIForm_Load()
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    '    Set gClientFrm = New frmClient
    '    gClientFrm.Show
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)
    Dim nRet As Integer
    Dim frmDel As Form
    nRet = MsgBox("确定要退出吗?", vbOKCancel + vbQuestion)
    If nRet = vbCancel Then Cancel = True
    '卸载所有窗口
    For Each frmDel In Forms
        Unload frmDel
    Next
    If Me.WindowState <> vbMinimized Then
        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
        SaveSetting App.Title, "Settings", "MainTop", Me.Top
        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
    End If

End Sub

Private Sub mnuFileClose_Click()
    Unload Me
End Sub

Private Sub mnuHelpAbout_Click()
    frmAbout.Show vbModal, gMainMDIForm
End Sub


Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
    On Error Resume Next
    Select Case Button.Key
        Case "客户"
            Call ShowClientForm
        Case "工作计划"
            Call ShowPlanForm
        Case "关闭"
            Unload Me
    End Select
End Sub

Private Function ShowPlanForm()
    Dim frmMyLoading As New frmLoading                     '定义一个frmLoading实例
    frmMyLoading.Show                                      '显示frmMyLoading窗口,既显示正在读取数据字样
    If gPlanFrm Is Nothing Then                            '如果gPlanFrm 没有加载到内存 则加载他
        Set gPlanFrm = New frmPlan
        gPlanFrm.Show                                      '显示gPlanFrm窗口
    End If
    gPlanFrm.SetFocus                                      '把gPlanFrm窗口设为焦点
    Unload frmMyLoading                                    '卸载frmMyLoading窗口
End Function

Private Function ShowClientForm()
    Dim frmMyLoading As New frmLoading
    frmMyLoading.Show
    If gClientFrm Is Nothing Then
        Set gClientFrm = New frmClient
        gClientFrm.Show
    End If
    gClientFrm.SetFocus
    Unload frmMyLoading
End Function

Private Sub mnuViewClient_Click()
    Call ShowClientForm
End Sub

Private Sub mnuViewPlan_Click()
    Call ShowPlanForm
End Sub

⌨️ 快捷键说明

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