?? frm_province_hubei.frm
字號(hào):
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 = "關(guān)閉退出"
Height = 375
Left = 7470
TabIndex = 4
Top = 3825
Width = 950
End
Begin VB.Frame Frame1
Height = 1170
Left = 6810
TabIndex = 1
Top = 2355
Width = 2325
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 = 6780
TabIndex = 0
Top = 285
Width = 2445
End
End
Attribute VB_Name = "Frm_Province_Hubei"
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_Hubei_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Index
Case 0
'十堰市
Mystr = "十堰市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 1
'襄樊市
Mystr = "襄樊市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 2
'神農(nóng)架林區(qū)
Mystr = "神農(nóng)架林區(qū)"
Lbl_Hubei(2).BorderStyle = 1
rs.Open "select * from tb_Client_csxx where csxx_csmc='" + Mystr + "'", cnn, adOpenKeyset
If rs.RecordCount > 0 Then
Lbl_Info.Caption = "神農(nóng)架林區(qū) 郵政編碼:" + rs.Fields("csxx_yb") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 3
'荊門市
Mystr = "荊門市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 4
'孝感市
Mystr = "孝感市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 5
'武漢市
Mystr = "武漢市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 6
'黃岡
Mystr = "黃岡"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 7
'鄂州市
Mystr = "鄂州市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 8
'黃石市
Mystr = "黃石市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 9
'天門市
Mystr = "天門市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 10
'潛江市
Mystr = "潛江市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 11
'仙桃市
Mystr = "仙桃市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 12
'宜昌市
Mystr = "宜昌市"
Lbl_Hubei(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") + " 電話區(qū)號(hào):" + rs.Fields("csxx_dhqh")
End If
rs.Close
Case 13
'恩施市
Mystr = "恩施市"
Lbl_Hubei(13).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") + " 電話區(qū)號(hào):" + 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 = 200
Dgr_Yb.Left = 200
Dgr_Yb.Height = 3000
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 13
Lbl_Hubei(i).BorderStyle = 0
Next i
Lbl_Info.Caption = ""
End Sub
Sub Dgr_Title() '設(shè)置DataGrid控件的標(biāo)題信息
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 = "電話區(qū)號(hào)"
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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -