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

📄 frmmain.frm

📁 人事,工资,考勤系统把数据导入Excel要用到Excel.dll,Office.d
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain 
   AutoRedraw      =   -1  'True
   BorderStyle     =   1  'Fixed Single
   Caption         =   "SQL 数据库图象处理系统"
   ClientHeight    =   5790
   ClientLeft      =   45
   ClientTop       =   615
   ClientWidth     =   5475
   FillColor       =   &H00404040&
   Icon            =   "frmMain.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   386
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   365
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   2220
      Left            =   90
      TabIndex        =   0
      Top             =   3105
      Width           =   3975
      Begin VB.TextBox txtConnectionString 
         Height          =   285
         Left            =   165
         TabIndex        =   2
         ToolTipText     =   "Enter valid database connection string"
         Top             =   375
         Width           =   3645
      End
      Begin VB.TextBox txtUID 
         Height          =   285
         Left            =   1305
         TabIndex        =   4
         ToolTipText     =   "Enter sql login id"
         Top             =   735
         Width           =   990
      End
      Begin VB.TextBox txtPassword 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   2835
         PasswordChar    =   "*"
         TabIndex        =   6
         ToolTipText     =   "Enter your sql login password"
         Top             =   735
         Width           =   975
      End
      Begin VB.TextBox txtDBTable 
         Height          =   285
         Left            =   1305
         TabIndex        =   8
         ToolTipText     =   "Enter table to query"
         Top             =   1080
         Width           =   2505
      End
      Begin VB.TextBox txtDBColumn 
         Height          =   285
         Left            =   1305
         TabIndex        =   10
         ToolTipText     =   "Enter column to query"
         Top             =   1440
         Width           =   2505
      End
      Begin VB.TextBox txtWhere 
         Height          =   285
         Left            =   1305
         TabIndex        =   12
         ToolTipText     =   "Example:  CategoryID=1"
         Top             =   1800
         Width           =   2505
      End
      Begin VB.Label lblConnectionString 
         AutoSize        =   -1  'True
         Caption         =   "连接字符串:"
         Height          =   180
         Left            =   180
         TabIndex        =   1
         Top             =   150
         Width           =   990
      End
      Begin VB.Label lblUserID 
         AutoSize        =   -1  'True
         Caption         =   "登录帐号:"
         Height          =   180
         Left            =   465
         TabIndex        =   3
         Top             =   780
         Width           =   810
      End
      Begin VB.Label lblPW 
         AutoSize        =   -1  'True
         Caption         =   "密码:"
         Height          =   180
         Left            =   2385
         TabIndex        =   5
         Top             =   795
         Width           =   450
      End
      Begin VB.Label lblDBTable 
         AutoSize        =   -1  'True
         Caption         =   "数据表:"
         Height          =   180
         Left            =   555
         TabIndex        =   7
         Top             =   1125
         Width           =   630
      End
      Begin VB.Label lblDBColumn 
         AutoSize        =   -1  'True
         Caption         =   "字段:"
         Height          =   180
         Left            =   750
         TabIndex        =   9
         Top             =   1485
         Width           =   450
      End
      Begin VB.Label lblWhere 
         AutoSize        =   -1  'True
         Caption         =   "查询子句:"
         Height          =   180
         Left            =   405
         TabIndex        =   11
         Top             =   1845
         Width           =   810
      End
   End
   Begin VB.CommandButton cmdSchema 
      Caption         =   "&DB Schema"
      Height          =   360
      Left            =   4200
      TabIndex        =   18
      ToolTipText     =   "Shows schema for database tables"
      Top             =   4980
      Width           =   1170
   End
   Begin VB.CommandButton cmdShow 
      Caption         =   "显示表格(&T)"
      Height          =   360
      Left            =   4200
      TabIndex        =   17
      ToolTipText     =   "Show all columns in table"
      Top             =   4620
      Width           =   1170
   End
   Begin VB.CommandButton cmdMakeASP 
      Caption         =   "创建ASP(&M)"
      Height          =   360
      Left            =   4200
      TabIndex        =   16
      ToolTipText     =   "Makes an asp page for image proxy"
      Top             =   4260
      Width           =   1170
   End
   Begin VB.CommandButton cmdClear 
      Caption         =   "设置空值(&N)"
      Height          =   360
      Left            =   4200
      TabIndex        =   15
      ToolTipText     =   "Set database field to null"
      Top             =   3900
      Width           =   1170
   End
   Begin MSComDlg.CommonDialog cDialog 
      Left            =   4785
      Top             =   345
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton cmdSaveImage 
      Caption         =   "保存图象(&S)"
      Height          =   360
      Left            =   4200
      TabIndex        =   14
      ToolTipText     =   "Save image to database"
      Top             =   3540
      Width           =   1170
   End
   Begin VB.CommandButton cmdGet 
      Caption         =   "获取图像(&G)"
      Height          =   345
      Left            =   4200
      TabIndex        =   13
      ToolTipText     =   "Get image from database"
      Top             =   3195
      Width           =   1170
   End
   Begin VB.PictureBox picHolder 
      BackColor       =   &H00000000&
      ForeColor       =   &H000000FF&
      Height          =   2835
      Left            =   90
      ScaleHeight     =   185
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   353
      TabIndex        =   20
      TabStop         =   0   'False
      ToolTipText     =   "Double click to view full screen"
      Top             =   105
      Width           =   5355
      Begin VB.Image imgGet 
         Height          =   915
         Left            =   2070
         ToolTipText     =   "Double click to view full screen"
         Top             =   990
         Width           =   975
      End
   End
   Begin VB.Label lblInfo 
      AutoSize        =   -1  'True
      Caption         =   "欢迎光临枕善居  http://www.mndsoft.com"
      Height          =   180
      Left            =   105
      TabIndex        =   19
      Top             =   5550
      Width           =   3420
   End
   Begin VB.Menu mnuFile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuOpen 
         Caption         =   "打开图片(&O)"
         Shortcut        =   ^O
      End
      Begin VB.Menu mnuSavePixel 
         Caption         =   "保存单象素(&S)"
         Shortcut        =   ^S
      End
      Begin VB.Menu mnuSep0 
         Caption         =   "-"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "退出(&X)"
         Shortcut        =   ^X
      End
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "编辑(&E)"
      Begin VB.Menu mnuCopy 
         Caption         =   "复制(&C)"
         Shortcut        =   ^C
      End
      Begin VB.Menu mnuPaste 
         Caption         =   "粘贴(&P)"
         Shortcut        =   ^V
      End
   End
   Begin VB.Menu mnuOptions 
      Caption         =   "选项(&O)"
      Begin VB.Menu mnuSaveOnGet 
         Caption         =   "&Save Image to Disk on Get"
         Shortcut        =   {F2}
      End
      Begin VB.Menu mnuUseImage 
         Caption         =   "&Use viewing image on DB Save"
         Shortcut        =   {F3}
      End
   End
   Begin VB.Menu mnuView 
      Caption         =   "视图(&V)"
      Begin VB.Menu mnuAutosize 
         Caption         =   "图片自动缩放(&A)"
         Checked         =   -1  'True
         Shortcut        =   ^A
      End
      Begin VB.Menu mnuCenterPic 
         Caption         =   "图片居中(&P)"
         Checked         =   -1  'True
         Shortcut        =   ^P
      End
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu mnuAbout 
         Caption         =   "关于(&A)"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*********************************************
'*  By Shannon Harmon                        *
'*  Copyright 2000 - All rights reserved...  *
'*********************************************

Option Explicit

Dim xImage As New cImage
Dim strTable As String
Dim strColumn As String
Dim strWhere As String

Private Sub Form_Load()
On Error GoTo ProcErr

  Me.Line (0, 0)-(Me.ScaleWidth, 0), &H404040
  Me.Line (0, 1)-(Me.ScaleWidth, 1), &HFFFFFF
  Me.Line (0, 202)-(Me.ScaleWidth, 202), &H404040
  Me.Line (0, 203)-(Me.ScaleWidth, 203), &HFFFFFF
  Me.Line (0, 365)-(Me.ScaleWidth, 365), &H404040
  Me.Line (0, 366)-(Me.ScaleWidth, 366), &HFFFFFF

  Set xImage = New cImage

  '//Setting default values for testing...
  txtConnectionString = "DSN=Northwind;"
  txtUID = "sa"
  txtPassword = ""
  txtDBTable = "Categories"
  txtDBColumn = "Picture"
  txtWhere = "CategoryID=8"

ProcExit:
  Exit Sub
  
ProcErr:
  Debug.Print Err.Description
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyEscape Then Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
  Set xImage = Nothing
End Sub

Private Sub cmdClear_Click()
On Error Resume Next
  
  Dim msgResult As VbMsgBoxResult
  msgResult = MsgBox("Are you sure?", vbYesNo, "Set field to null?")
  If msgResult = vbYes Then
  
    imgGet.Picture = LoadPicture()
    imgGet.Visible = False
    MousePointer = vbHourglass
    xImage.ClearImage strTable, strColumn, strWhere
    MousePointer = vbNormal
  
    If xImage.ErrNumber <> 0 Then
      lblInfo = xImage.ErrDesc
    Else
      lblInfo = "Field set to null successful!"
    End If
  Else
    lblInfo = "Process cancelled!"
  End If
End Sub

Private Sub cmdMakeASP_Click()
On Error Resume Next
  
  Dim strSession As String
  strSession = InputBox("Enter session variable name:", "Session Variable")
  If Trim(strSession) = "" Then

⌨️ 快捷键说明

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