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

📄 frmidentify.frm

📁 vb做的数据库 客户管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "msdatgrd.ocx"
Begin VB.Form frmIdentify 
   Caption         =   "图名查询"
   ClientHeight    =   3825
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11310
   LinkTopic       =   "Form1"
   ScaleHeight     =   3825
   ScaleWidth      =   11310
   StartUpPosition =   3  '窗口缺省
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2415
      Left            =   180
      TabIndex        =   4
      Top             =   1020
      Width           =   10995
      _ExtentX        =   19394
      _ExtentY        =   4260
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   6480
      Top             =   360
      Visible         =   0   'False
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   735
      Left            =   180
      TabIndex        =   0
      Top             =   120
      Width           =   10995
      Begin VB.CommandButton cmd_MapName 
         Caption         =   "图名查询"
         Height          =   375
         Left            =   4560
         TabIndex        =   3
         Top             =   240
         Width           =   1035
      End
      Begin VB.TextBox txtMapName 
         Height          =   375
         Left            =   1740
         TabIndex        =   2
         Top             =   240
         Width           =   1875
      End
      Begin VB.Label Label1 
         Caption         =   "图名"
         Height          =   255
         Left            =   960
         TabIndex        =   1
         Top             =   300
         Width           =   555
      End
   End
End
Attribute VB_Name = "frmIdentify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

 Dim cnn As ADODB.Connection
 Dim SearchStr As String
 Dim TmpSource As String
Private Sub Refresh_MapInfo(ByVal TmpSearch As Boolean)

'  TmpSource = " SELECT MapName as 图名,MapNum as 图号,MapYear as 成图时间,MapArea as 图幅区域,MapJWD as 图幅左下角经纬度,MapHCTime as 航测时间,MapScale as 比例尺,MapUnit as 成图单位 + " + "FROM research "
  
  TmpSource = "SELECT MapName AS 图名,MapNum as 图号," _
        + "MapYear AS 成图时间,MapArea as 图幅区域,MapJWD as 图幅左下角经纬度," _
        + "MapHCTime AS 航测时间," + "MapScale AS 比例尺,MapUnit AS 成图单位" _
        + " FROM research "
        
  If TmpSearch = True Then
     TmpSource = TmpSource + " where(MapName LIKE '%" + SearchStr + "%')"
    End If
     Adodc1.ConnectionString = Conn
     Adodc1.RecordSource = TmpSource
     Adodc1.Refresh
     Set DataGrid1.DataSource = Adodc1
'    设置列宽度
    DataGrid1.Columns(0).Width = 1000
    DataGrid1.Columns(1).Width = 1000
    DataGrid1.Columns(2).Width = 1000
    DataGrid1.Columns(3).Width = 1800
    DataGrid1.Columns(4).Width = 1800
    DataGrid1.Columns(5).Width = 1000
    DataGrid1.Columns(6).Width = 1000
    DataGrid1.Columns(7).Width = 1800


  
End Sub

Private Sub cmd_MapName_Click()
  If txtMapName = "" Then
    MsgBox "请输入要查找的图名"
    Exit Sub
  End If
  
  SearchStr = MakeStr(txtMapName)
  Refresh_MapInfo (True)
End Sub

Public Function MakeStr(ByVal Str As String) As String
  MakeStr = Trim(Replace(Str, "'", "''"))
End Function

Private Sub Form_Load()
   
    Set cnn = New ADODB.Connection
    cnn.Open Conn

End Sub
'Dim image_filename As String
' Dim temp_image() As Byte
' Dim sql As String
' Dim rs As ADODB.Recordset
' Dim mapFName As String
' Dim strPath As String
' Dim pRasterLayer As IRasterLayer
'
' Set rs = New ADODB.Recordset
' mapFName = txtName.Text
' sql = "Select * from research "
' rs.Open sql, cn, adOpenDynamic, adLockReadOnly
'
' If In_DB(mapFName) = False Then
'    MsgBox "该图片不存在"
'
' ElseIf In_DB(mapFName) = True Then
'     Response.ContentType = rs4("图像类型")
'Response.BinaryWrite rs4("图像内容").GetChunk(7500000)
'
'
'    image_filename = "d:\sjk\tiff" & "\" & mapFName & "" & ".tiff"
'    Set pRasterLayer = New RasterLayer
'    pRasterLayer.CreateFromFilePath image_filename
'    MapControl1.AddLayer pRasterLayer, MapControl1.LayerCount
''   image_filename = App.path & "\pictures" & "\" & mapFName & "" & ".tiff"
''   Picture1.picture = LoadPicture(image_filename)
'
'   rs.MoveNext
'End If
Private Sub MSFlexGrid1_Click()

End Sub

⌨️ 快捷键说明

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