1.vb����Դ��
vb����Դ��
'你把下面的界面代码保存为Form1.frm,然后双击打开该文件,源码源码用源码资源站源码整站打包运行后按提示即可看到结果。界面源码棋牌制作教程
'呵呵,源码源码用原型托管平台源码够详细了,界面作业批阅系统 源码再不会我也没办法了。源码源码用秒级监控源码
'====文件Form1.frm====
VERSION 5.
Begin VB.Form Form1
Caption = "Form1"
ClientHeight =
ClientLeft =
ClientTop =
ClientWidth =
LinkTopic = "Form1"
ScaleHeight =
ScaleWidth =
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Height =
Left =
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top =
Width =
End
Begin VB.TextBox Text1
Height =
Left =
TabIndex = 1
Text = "我的界面家"
Top =
Width =
End
Begin VB.CommandButton Command1
Caption = "获取HTML源码"
Height =
Left =
TabIndex = 0
Top =
Width =
End
Begin VB.Label Label2
Caption = "注意:获取源码之前必须先用IE打开网址,然后输入窗口标题关键字。源码源码用如www..com的界面标题关键字是:我的家"
Height =
Left =
TabIndex = 4
Top =
Width =
End
Begin VB.Label Label1
Caption = "请输入IE窗口标题:"
Height =
Left =
TabIndex = 3
Top =
Width =
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Function GetIeHtml(IeTitle As String) As String
Dim oShellApp: Set oShellApp = CreateObject("Shell.Application")
Dim oShellAppWindows: Set oShellAppWindows = oShellApp.Windows
Dim owin
'获取弹出的IE窗口
For Each owin In oShellAppWindows '获取弹出的IE窗口
If LCase(TypeName(owin.Document)) = "htmldocument" And _
InStr(1, owin.LocationName, IeTitle, vbTextCompare) > 0 Then '如果找到符合条件的IE窗口
GetIeHtml = owin.Document.activeElement.Document.documentElement.innerHTML '此句可获得完整html代码
GoTo Mend '退出
End If
Next
Mend:
Set oShellAppWindows = Nothing
Set oShellApp = Nothing
Set owin = Nothing
End Function
Private Sub Command1_Click()
Dim S As String
S = GetIeHtml(Text1.Text) '表示获得标题含有"我的家"的html代码
Text2.Text = S
End Sub
Private Sub Form_Load()
'Shell "explorer.exe ""/""", vbNormalNoFocus
End Sub
2024-11-21 02:00840人浏览
2024-11-21 01:551099人浏览
2024-11-21 01:302670人浏览
2024-11-21 01:112450人浏览
2024-11-21 01:052936人浏览
2024-11-21 00:101566人浏览
1.jQuery权威指南内容简介2.JavaScript权威指南第6版)目录3.jQuery权威指南作者简介4.JavaScript权威指南第6版)译者序5.javascript权威指南第五版和第六版
1.无人机编队飞行应用了哪些技术?实现有什么困难?2.重庆无人机群表演时失控撞楼坠落怎么回事3.亿航智能的EH216-S无人机编队飞行测试成功,将如何推动无人机技术商业化应用?4.怎样获取无人机实时三
1.������ϵͳԴ��2.制作一款仿抖音的短视频源码多少钱3.抖音矩阵系统源码交易安全吗?矩阵管理系统多少钱一个?4.tiktok云控系统功能介绍,什么是tiktok云控������ϵͳԴ��