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

📄 frmmapnum.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 frmMapNum 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "图名查询"
   ClientHeight    =   3780
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   12810
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3780
   ScaleWidth      =   12810
   StartUpPosition =   3  '窗口缺省
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   2775
      Left            =   180
      TabIndex        =   4
      Top             =   960
      Width           =   12495
      _ExtentX        =   22040
      _ExtentY        =   4895
      _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 VB.Frame Frame1 
      Height          =   735
      Left            =   180
      TabIndex        =   0
      Top             =   120
      Width           =   12435
      Begin VB.CheckBox Check1 
         Caption         =   "全部"
         Height          =   315
         Left            =   3900
         TabIndex        =   6
         Top             =   300
         Width           =   1275
      End
      Begin VB.CommandButton cmd_exit 
         Caption         =   "返回"
         Height          =   375
         Left            =   7920
         TabIndex        =   5
         Top             =   240
         Width           =   915
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   9300
         Top             =   300
         Visible         =   0   'False
         Width           =   1860
         _ExtentX        =   3281
         _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.CommandButton cmd_MapNum 
         Caption         =   "图号查询"
         Height          =   375
         Left            =   6060
         TabIndex        =   3
         Top             =   240
         Width           =   1035
      End
      Begin VB.TextBox txtMapNum 
         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 = "frmMapNum"
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 MapCode as 产品代号,MapName as 图名,MapNum as 图号," _
             + "MapScale as 比例尺分母,MapYear as 生产日期,MapProperty as 产品所有权," _
             + "MapLongRange as 图廓角点经度范围,MaplatiRange as 图廓角点纬度范围," _
             + "MapWNRef as 西南图廓坐标,MapWSRef_1 as 西南图廓坐标_1," _
             + "MapWNRef as 西北图廓坐标,MapWNRef_1 as 西北图廓坐标_1," _
             + "MapENRef as 东北图廓坐标,MapENRef_1 as 东北图廓坐标_1," _
             + "MapESRef as 东南图廓坐标,MapESRef_1 as 东南图廓坐标_1," _
             + "MapReference as 采用的大地坐标系,MapRojection as 地图投影名," _
             + "MapMeridian as 中央子午线,MapShear as 分带方式," _
             + "MapUnit as 坐标单位,MapElevation as 高程系名称," _
             + "MapEleBenchmark as 高程基准 FROM research "
         
  If TmpSearch = True Then
     TmpSource = TmpSource + " where(MapNum 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 = 1000
    DataGrid1.Columns(4).Width = 1000
    DataGrid1.Columns(5).Width = 1000
    DataGrid1.Columns(6).Width = 1800
    DataGrid1.Columns(7).Width = 1800
    DataGrid1.Columns(8).Width = 1200
    DataGrid1.Columns(9).Width = 1200
    DataGrid1.Columns(10).Width = 1200
    DataGrid1.Columns(11).Width = 1200
    DataGrid1.Columns(12).Width = 1200
    DataGrid1.Columns(12).Width = 1200
    DataGrid1.Columns(14).Width = 1200
    DataGrid1.Columns(15).Width = 1200
    DataGrid1.Columns(16).Width = 1000
    DataGrid1.Columns(17).Width = 1000
    DataGrid1.Columns(18).Width = 1000
    DataGrid1.Columns(19).Width = 1000
    DataGrid1.Columns(20).Width = 1000
    DataGrid1.Columns(19).Width = 1000
    DataGrid1.Columns(20).Width = 1000
  
  
End Sub

Private Sub Check1_Click()
Refresh_MapInfo (falsh)
End Sub

Private Sub cmd_Exit_Click()
Unload Me
End Sub

Private Sub cmd_MapNum_Click()
  If txtMapNum = "" Then
    MsgBox "请输入要查找的图名"
    Exit Sub
  End If
  
  SearchStr = MakeStr(txtMapNum)
  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


⌨️ 快捷键说明

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