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

📄 frmphclerkin.frm

📁 这是用Visual Basic6开发的大型喷绘业务管理系统,数据库采用Access数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPHclerkIn 
   BorderStyle     =   0  'None
   Caption         =   "人员资料录入"
   ClientHeight    =   3675
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   6450
   LinkTopic       =   "Form1"
   Picture         =   "frmPHclerkIn.frx":0000
   ScaleHeight     =   3675
   ScaleWidth      =   6450
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture2 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   345
      Left            =   3960
      Picture         =   "frmPHclerkIn.frx":4EDFA
      ScaleHeight     =   23
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   80
      TabIndex        =   7
      Top             =   2700
      Width           =   1200
   End
   Begin VB.PictureBox Picture1 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   345
      Left            =   1680
      Picture         =   "frmPHclerkIn.frx":503CC
      ScaleHeight     =   23
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   80
      TabIndex        =   6
      Top             =   2700
      Width           =   1200
   End
   Begin VB.TextBox Text2 
      Appearance      =   0  'Flat
      Height          =   285
      Left            =   2760
      TabIndex        =   1
      Top             =   1410
      Width           =   1965
   End
   Begin VB.TextBox Text3 
      Appearance      =   0  'Flat
      Height          =   285
      Left            =   2760
      TabIndex        =   2
      Top             =   1860
      Width           =   1965
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2760
      TabIndex        =   0
      Top             =   990
      Width           =   1995
   End
   Begin VB.Image Image3 
      Height          =   375
      Left            =   5490
      Picture         =   "frmPHclerkIn.frx":5199E
      Top             =   210
      Width           =   390
   End
   Begin VB.Image Image2 
      Height          =   330
      Left            =   5910
      Picture         =   "frmPHclerkIn.frx":521B0
      Top             =   210
      Width           =   330
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "人员资料录入"
      ForeColor       =   &H0000FFFF&
      Height          =   285
      Left            =   840
      TabIndex        =   8
      Top             =   300
      Width           =   1245
   End
   Begin VB.Image Image1 
      Height          =   585
      Left            =   690
      Picture         =   "frmPHclerkIn.frx":527CA
      Top             =   840
      Width           =   555
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "类    别"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Index           =   0
      Left            =   1710
      TabIndex        =   5
      Top             =   1020
      Width           =   1125
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "姓    名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Index           =   1
      Left            =   1710
      TabIndex        =   4
      Top             =   1440
      Width           =   1065
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "编    号"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   225
      Index           =   2
      Left            =   1710
      TabIndex        =   3
      Top             =   1890
      Width           =   1095
   End
End
Attribute VB_Name = "frmPHclerkIn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim env As rdoEnvironment
Dim cn As rdoConnection
Dim result As rdoResultset
Dim result1 As rdoResultset
Dim d_conn, sql As String
Dim hrowcount, hrowcount1 As Integer
Dim n As Integer
Dim jframe As New dframe
Private Sub Combo1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
       KeyAscii = 0
       SendKeys "{tab}"
    End If
End Sub

Private Sub Form_Load()
   rgn1 = 0
   n = 0
   Dim Ma As Dat
   Show
   Open App.Path & "\publish.dat" For Random As #1 Len = Len(Ma)
   Do While Not EOF(1)
      n = n + 1
      Get #1, n, Ma
      If rgn1 = 0 Then rgn1 = CreateRectRgn(Ma.sx, Ma.sy, Ma.ex, Ma.ey)
      If rgn1 <> 0 Then
            rgn2 = CreateRectRgn(Ma.sx, Ma.sy, Ma.ex, Ma.ey)
            CombineRgn rgn1, rgn1, rgn2, 2
                  '释放系统资源
            DeleteObject rgn2
      End If
  Loop
'关闭文件
    Close #1
    SetWindowRgn hwnd, rgn1, True
    DeleteObject rgn1
    '''''''''
    On Error GoTo errmsg
'    Set env = rdoEnvironments(0)
'    env.CursorDriver = rdUseOdbc
'    d_conn = "uid=sa;pwd=;driver={SQL SERVER};SERVER=ntserver;database=phdatabase;"
'    Set cn = env.OpenConnection(dsname:="odbc_api_demo", Prompt:="rdodriverprompt", ReadOnly:=False, Connect:=d_conn)
   Combo1.AddItem "业务员"
   Combo1.AddItem "签单人"
   Combo1.AddItem "设计员"
   Combo1.AddItem "操作员"
   Combo1.AddItem "欠款审核"
   If Flagh = 2 Then
      Combo1.Text = listviewtext(2)
      Text2.Text = listviewtext(0)
      Text3.Text = listviewtext(1)
   End If
errmsg:
   If Err.Number <> 0 Then
      
   End If
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
       mX = X
       mY = Y
    End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then
       frmPHclerkIn.Move frmPHclerkIn.Left - mX + X, frmPHclerkIn.Top - mY + Y
    End If
    Picture1.Cls
    Picture2.Cls
End Sub

Private Sub Image2_Click()
    Unload Me
End Sub

Private Sub Image3_Click()
    frmPHclerkIn.WindowState = 1
End Sub

Private Sub Picture1_Click()
      Dim itm As ListItem
    Dim hrecord As Integer
    If Flagh = 1 Then
        sql = "insert into  worktable(类别,姓名,编号)  values('" & Trim(Combo1.Text) & "','" & Trim(Text2.Text) & "','" & Trim(Text3.Text) & "')" '& Trim(Combo1.Text) & "','" & Trim(Text4.Text) & "','" & Trim(Text5.Text) & "','" & Trim(Combo2.Text) & "'," & Val(Trim(Text6.Text)) & "," & Val(Trim(Text7.Text)) & ",'" & Trim(Text8.Text) & "'," & Val(Trim(Text9.Text)) & ",'" & Trim(Text10.Text) & "','" & Trim(Text11.Text) & "'," & Val(Trim(Text12.Text)) & "," & Val(Text13.Text) & ",'" & Trim(Text14.Text) & "')"
        Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
        sql = "select  *  from  worktable order by  类别"
        Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
        If result.RowCount <> 0 Then
           result.MoveLast
           hrecord = result.RowCount + 1
           result.MoveFirst
        End If
        frmPHclerk.ListView1.ListItems.Clear
        If result.RowCount <> 0 Then
           Do While Not result.EOF()
                Set itm = frmPHclerk.ListView1.ListItems.Add(, , result("姓名"))
                itm.SubItems(1) = Trim(result("编号"))
                itm.SubItems(2) = Trim(result("类别"))
                result.MoveNext
           Loop
        End If
    End If
    If Flagh = 2 Then
       sql = "update worktable set  类别='" & Trim(Combo1.Text) & "',姓名='" & Trim(Text2.Text) & "',编号='" & Trim(Text3.Text) & "'  where  类别='" & Trim(listviewtext(2)) & "'  and  姓名='" & Trim(listviewtext(0)) & "' and  编号='" & Trim(listviewtext(1)) & "'"
       Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
    End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture2.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 80
    jframe.rbottom = 23
    jframe.ddrawc Picture1
End Sub

Private Sub Picture2_Click()
    Unload Me
End Sub

Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture1.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 80
    jframe.rbottom = 23
    jframe.ddrawc Picture2
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
       KeyAscii = 0
       SendKeys "{tab}"
    End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
       KeyAscii = 0
       SendKeys "{tab}"
    End If
End Sub

⌨️ 快捷键说明

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