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

📄 frm_province_tianjin.frm

📁 本系统为客户管理系统 (1)本系统的数据库为SQL Server 2000
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         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            =   4965
      TabIndex        =   4
      Top             =   6180
      Width           =   950
   End
   Begin VB.Frame Frame1 
      Height          =   1185
      Left            =   4335
      TabIndex        =   1
      Top             =   4470
      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            =   4350
      TabIndex        =   0
      Top             =   150
      Width           =   2430
   End
End
Attribute VB_Name = "Frm_Province_Tianjin"
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_Tianjin_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Index
Case 0
 '蓟县
  Mystr = "蓟县"
  Lbl_Tianjin(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_Tianjin(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_Tianjin(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_Tianjin(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_Tianjin(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_Tianjin(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_Tianjin(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_Tianjin(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
Case 8
 '塘沽区
  Mystr = "塘沽区"
  Lbl_Tianjin(8).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 9
 '东丽区
  Mystr = "东丽区"
  Lbl_Tianjin(9).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 10
 '津南区
  Mystr = "津南区"
  Lbl_Tianjin(10).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 11
 '静海县
  Mystr = "静海县"
  Lbl_Tianjin(11).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 12
 '大港区
  Mystr = "大港区"
  Lbl_Tianjin(12).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 Label9_Click()

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 = 200
  Dgr_Yb.Height = 5500
  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 12
 Lbl_Tianjin(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 + -