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

📄 main_mima.frm

📁 基于VB的医药进销存管理系统源程序
💻 FRM
字号:
VERSION 5.00
Object = "{FAEEE763-117E-101B-8933-08002B2F4F5A}#1.1#0"; "DBLIST32.OCX"
Begin VB.Form main_mima 
   BackColor       =   &H00808080&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "医药进销存管理系统"
   ClientHeight    =   4095
   ClientLeft      =   3240
   ClientTop       =   4230
   ClientWidth     =   5715
   FillColor       =   &H00004000&
   Icon            =   "main_mima.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "main_mima.frx":000C
   ScaleHeight     =   4095
   ScaleWidth      =   5715
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text2 
      BackColor       =   &H00FFFFFF&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   2400
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1680
      Width           =   1920
   End
   Begin VB.Frame Frame1 
      Caption         =   "Frame1"
      Height          =   1260
      Left            =   -2655
      TabIndex        =   2
      Top             =   2535
      Visible         =   0   'False
      Width           =   2655
      Begin VB.Data Data2 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   "D:\行业管理软件之一\医药门店版\yyjxc.mdb"
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   345
         Left            =   240
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   "ma"
         Top             =   225
         Visible         =   0   'False
         Width           =   1140
      End
      Begin VB.TextBox Text3 
         DataField       =   "密码"
         DataSource      =   "Data1"
         Height          =   270
         Left            =   1515
         TabIndex        =   4
         Top             =   330
         Visible         =   0   'False
         Width           =   1200
      End
      Begin VB.TextBox js 
         Height          =   270
         Left            =   135
         TabIndex        =   3
         Top             =   630
         Visible         =   0   'False
         Width           =   1200
      End
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   "D:\行业管理软件之一\医药门店版\yyjxc.mdb"
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   345
         Left            =   45
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   "ma"
         Top             =   210
         Visible         =   0   'False
         Width           =   1140
      End
   End
   Begin VB.CommandButton comend 
      BackColor       =   &H00C0C0C0&
      Height          =   400
      Left            =   3000
      Picture         =   "main_mima.frx":BD79
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2520
      Width           =   1380
   End
   Begin VB.CommandButton Cmd1 
      BackColor       =   &H00C0C0C0&
      Height          =   400
      Left            =   1200
      MaskColor       =   &H00FF8080&
      Picture         =   "main_mima.frx":D733
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2520
      UseMaskColor    =   -1  'True
      Width           =   1380
   End
   Begin MSDBCtls.DBCombo text1 
      Bindings        =   "main_mima.frx":F076
      Height          =   330
      Left            =   2400
      TabIndex        =   5
      Top             =   960
      Width           =   1920
      _ExtentX        =   3387
      _ExtentY        =   582
      _Version        =   393216
      Style           =   2
      ListField       =   "操作员"
      Text            =   ""
   End
   Begin VB.Line Line1 
      X1              =   720
      X2              =   4920
      Y1              =   3240
      Y2              =   3240
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "CopyRight 2007-2008@医药进销存管理系统设计小组"
      Height          =   225
      Left            =   720
      TabIndex        =   9
      Top             =   3480
      Width           =   4365
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "操作员: "
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   1320
      TabIndex        =   8
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "密  码:          "
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   1320
      TabIndex        =   7
      Top             =   1800
      Width           =   855
   End
End
Attribute VB_Name = "main_mima"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TIM As Integer     '定义一个整型变量
Dim MESSAGE As String     '定义一个字符串变量
Private Sub Form_Activate()
 '当记录为零时,进入系统具有所有权限
 If Data1.Recordset.RecordCount = 0 Then
    MsgBox ("您还没有设置操作员密码和权限,请设置操作员密码和权限!")
    Load frm_main
    frm_main.Show
    Unload Me
 Else
   Text1.SetFocus     'text1获得焦点
 End If
End Sub
Private Sub Form_Load()
  TIM = 0     '为变量设初值
  '自动识别数据库路径
  Data1.DatabaseName = App.Path & "\yyjxc.mdb":
  Data2.DatabaseName = App.Path & "\yyjxc.mdb"
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Text2.SetFocus     '按回车键text2获得焦点
End Sub
Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Cmd1.Visible = True
     Cmd1.SetFocus
  End If
  If KeyCode = vbKeyUp Then Text1.SetFocus     '按向上键text1获得焦点
End Sub
Private Sub cmd1_Click()
js.Text = TIM     '赋值给js.text
'查询操作员信息
Data1.RecordSource = "select * from ma where 操作员='" & Text1.Text & "'"
Data1.Refresh
If Text1.Text <> "" And Text2.Text = Text3.Text Then
 Load frm_main
 frm_main.Show
 Unload Me
Else
 If TIM = 3 Then     '输入三次错误密码,退出系统
    MESSAGE = MsgBox("密码输入错误,请向系统管理员查询!", 0, "")
    If MESSAGE = vbOK Then End
 End If
 If Text1.Text = "" Then     '操作员代号为空,提示信息
    MsgBox ("请输入操作员代号!")
    Text1.SetFocus
  Else
   If Text1.Text <> Data1.Recordset.Fields("操作员") Then
    MsgBox ("查无此操作员,请重新输入操作员代号!")
    Text1.SetFocus
   Else
    If Text2.Text <> Text3.Text Then
       MsgBox ("密码错误,请重新输入密码!")
       TIM = TIM + 1
       Text2.SetFocus
    End If
   End If
 End If
End If
End Sub
Private Sub Comend_Click()
  End
End Sub

⌨️ 快捷键说明

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