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

📄 frm_province_chongqing.frm

📁 本系统为客户管理系统 (1)本系统的数据库为SQL Server 2000
💻 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 Frm_Province_Chongqing 
   Caption         =   "重庆市"
   ClientHeight    =   6525
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9450
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   6525
   ScaleWidth      =   9450
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture1 
      BorderStyle     =   0  'None
      Height          =   6555
      Left            =   -45
      Picture         =   "Frm_Province_Chongqing.frx":0000
      ScaleHeight     =   6555
      ScaleWidth      =   6750
      TabIndex        =   9
      Top             =   -15
      Width           =   6750
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   315
         Index           =   4
         Left            =   4830
         TabIndex        =   17
         Top             =   5805
         Width           =   495
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   330
         Index           =   3
         Left            =   4620
         TabIndex        =   16
         Top             =   5130
         Width           =   615
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   300
         Index           =   2
         Left            =   4440
         TabIndex        =   15
         Top             =   4185
         Width           =   570
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   345
         Index           =   6
         Left            =   1590
         TabIndex        =   14
         Top             =   4020
         Width           =   735
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   285
         Index           =   7
         Left            =   495
         TabIndex        =   13
         Top             =   3045
         Width           =   510
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   360
         Index           =   5
         Left            =   2655
         TabIndex        =   12
         Top             =   3915
         Width           =   510
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   345
         Index           =   1
         Left            =   3990
         TabIndex        =   11
         Top             =   1995
         Width           =   750
      End
      Begin VB.Label Lbl_Chongqing 
         BackStyle       =   0  'Transparent
         Height          =   300
         Index           =   0
         Left            =   4260
         TabIndex        =   10
         Top             =   345
         Width           =   525
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "查询"
      Height          =   765
      Left            =   270
      TabIndex        =   6
      Top             =   5500
      Visible         =   0   'False
      Width           =   5010
      Begin VB.TextBox Txt_Key 
         Height          =   350
         Left            =   2040
         TabIndex        =   7
         Top             =   255
         Width           =   2580
      End
      Begin VB.Label Label1 
         Caption         =   "请输入城市名称"
         Height          =   255
         Left            =   420
         TabIndex        =   8
         Top             =   315
         Width           =   1425
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   345
      Left            =   5580
      Top             =   6465
      Visible         =   0   'False
      Width           =   1620
      _ExtentX        =   2858
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_Client"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_Client"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tb_Client_csxx where csxx_sfmc='重庆市'"
      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 MSDataGridLib.DataGrid Dgr_Yb 
      Bindings        =   "Frm_Province_Chongqing.frx":1C177
      Height          =   1395
      Left            =   135
      TabIndex        =   5
      Top             =   7020
      Width           =   5475
      _ExtentX        =   9657
      _ExtentY        =   2461
      _Version        =   393216
      AllowUpdate     =   0   'False
      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.CommandButton Cmd_Exit 
      Caption         =   "关闭退出"
      Height          =   375
      Left            =   7515
      TabIndex        =   4
      Top             =   5850
      Width           =   950
   End
   Begin VB.Frame Frame1 
      Height          =   1185
      Left            =   6840
      TabIndex        =   1
      Top             =   4455
      Width           =   2490
      Begin VB.OptionButton Otn_Lb 
         Caption         =   "列表显示"
         Height          =   285
         Left            =   555
         TabIndex        =   3
         Top             =   750
         Width           =   1215
      End
      Begin VB.OptionButton Otn_Dt 
         Caption         =   "地图显示"
         Height          =   315
         Left            =   540
         TabIndex        =   2
         Top             =   285
         Value           =   -1  'True
         Width           =   1305
      End
   End
   Begin VB.Label Lbl_Info 
      Caption         =   "Lbl_Info"
      Height          =   1350
      Left            =   6840
      TabIndex        =   0
      Top             =   540
      Width           =   2415
   End
End
Attribute VB_Name = "Frm_Province_Chongqing"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Dim Mystr As String

Private Sub Cmd_Exit_Click()
Unload Me
End Sub

Private Sub Form_Load()
Lbl_Info.Caption = ""
Adodc1.ConnectionString = PublicStr
End Sub

Private Sub Lbl_Chongqing_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Index
Case 0
 '城口县
  Mystr = "城口县"
  Lbl_Chongqing(0).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "城口县   邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 1
  '万州
  Mystr = "万州"
  Lbl_Chongqing(1).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "万州   邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 2
  '黔江县
  Mystr = "黔江县"
  Lbl_Chongqing(2).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "黔江县   邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 3
  '酉阳
  Mystr = "酉阳"
  Lbl_Chongqing(3).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "酉阳    邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 4
  '秀山
  Mystr = "秀山"
  Lbl_Chongqing(4).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "秀山    邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 5
  '涪陵市
  Mystr = "涪陵市"
  Lbl_Chongqing(5).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "涪陵市   邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 6
  '重庆
  Mystr = "重庆"
  Lbl_Chongqing(6).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "重庆    邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
Case 7
  '潼南县
  Mystr = "潼南县"
  Lbl_Chongqing(7).BorderStyle = 1
  rs.Open "select * from tb_Client_csxx where csxx_csmc ='" + Mystr + "'", cnn, adOpenKeyset
  If rs.RecordCount > 0 Then
    Lbl_Info.Caption = "潼南县   邮政编码:" + rs.Fields("csxx_yb") + "           电话区号:" + rs.Fields("csxx_dhqh")
  End If
  rs.Close
End Select

End Sub


Private Sub Otn_Dt_Click()
'地图显示
If Otn_Dt.Value = True Then
  Picture1.Visible = True
  Dgr_Yb.Visible = False
  Frame2.Visible = False
End If

End Sub

Private Sub Otn_Lb_Click()   '列表显示
If Otn_Lb.Value = True Then
  Picture1.Visible = False
  Dgr_Yb.Visible = True
  Dgr_Yb.Top = 300
  Dgr_Yb.Left = 105
  Dgr_Yb.Height = 5000
  Frame2.Visible = True
  Txt_Key.Text = ""
  Call Dgr_Title
End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
For i = 0 To 7
 Lbl_Chongqing(i).BorderStyle = 0
Next i
Lbl_Info.Caption = ""
End Sub

Sub Dgr_Title()   '设置DataGrid控件的标题信息
Dgr_Yb.Columns(0).Caption = "省份简称"
Dgr_Yb.Columns(1).Caption = "省份名称"
Dgr_Yb.Columns(2).Caption = "城市名称"
Dgr_Yb.Columns(3).Caption = "邮政编码"
Dgr_Yb.Columns(4).Caption = "电话区号"
End Sub

Private Sub Txt_Key_Change()
Adodc1.RecordSource = "select * from tb_Client_csxx where csxx_sfmc='重庆市'and csxx_csmc like +'%'+'" + Txt_Key + "'+'%'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Set Dgr_Yb.DataSource = Adodc1
Call Dgr_Title
Else
Call Dgr_Title
End If
  
End Sub

Private Sub Txt_Key_GotFocus()
Txt_Key.BackColor = &HFFFF80
End Sub

Private Sub Txt_Key_LostFocus()
Txt_Key.BackColor = &HFFFFFF
End Sub

⌨️ 快捷键说明

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