📄 tqyb.frm
字号:
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Begin VB.Form tqyb
BorderStyle = 3 'Fixed Dialog
Caption = "南充博创软件资讯-天气预报服务"
ClientHeight = 4755
ClientLeft = 45
ClientTop = 330
ClientWidth = 6180
Icon = "tqyb.frx":0000
LinkTopic = "Form3"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4755
ScaleWidth = 6180
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin SHDocVwCtl.WebBrowser W1
Height = 495
Left = 0
TabIndex = 4
Top = 6720
Width = 1455
ExtentX = 2566
ExtentY = 873
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
NoWebView = 0 'False
HideFileNames = 0 'False
SingleClick = 0 'False
SingleSelection = 0 'False
NoFolders = 0 'False
Transparent = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = "about:blank"
End
Begin SHDocVwCtl.WebBrowser W2
Height = 4095
Left = 120
TabIndex = 3
Top = 600
Width = 6015
ExtentX = 10610
ExtentY = 7223
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
NoWebView = 0 'False
HideFileNames = 0 'False
SingleClick = 0 'False
SingleSelection = 0 'False
NoFolders = 0 'False
Transparent = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = "about:blank"
End
Begin VB.TextBox txtName
Height = 345
Left = 120
TabIndex = 1
Text = "南充"
Top = 120
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "查看"
Height = 345
Left = 1770
TabIndex = 0
Top = 150
Width = 1455
End
Begin VB.Label Label1
Height = 255
Left = 3450
TabIndex = 2
Top = 210
Width = 2775
End
End
Attribute VB_Name = "tqyb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim a As String
Private Sub Command1_Click()
a = ""
Call W1.Navigate("http://cgi.news.sina.com.cn/cgi-bin/figureWeather/search.cgi?city=" & txtName.Text)
End Sub
Private Sub Form_Load()
Command1_Click
End Sub
Private Sub W1_DownloadComplete()
Dim i As Long, j As Long
On Error Resume Next
If Len(a) = 0 Then
a = W1.Document.documentElement.innerHTML
i = InStr(a, "<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>")
j = InStr(i + 1500, a, "<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>")
a = Mid(a, i, j - i)
If Len(a) <> 0 Then
Open App.Path & "\index.htm" For Output As #1
a = "<STYLE type=text/css>td,p,li,select,input,textarea {font-size:12px;}</STYLE>" & a
Print #1, a
Close #1
Call W2.Navigate(App.Path & "\index.htm")
Label1.Caption = Date & "天气预报"
End If
End If
err1:
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -