windowsvb�ؼ�Դ��
'你把下面的控控件开代码保存为Form1.frm,然后双击打开该文件,控控件开运行后按提示即可看到结果。控控件开nodejs后端源码加密
'呵呵,控控件开java 服务器源码够详细了,控控件开再不会我也没办法了。控控件开
'====文件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
我做的一个vb软件保存打不开了,保存成了Form1.vb和Form1.Designer.vb两个文件!请高手帮忙!控控件开
你是控控件开数据结构 算法源码直接双击Form1.vb的吧?这样没用的,只能打开Form1.vb这一个文件,控控件开里面只有代码,控控件开窗体设计在Form1.Designer.vb中,应该用下面方法:
1、易语言数据库源码运行VS
2、选择“新建项目”,选择“Visual Basic”模板中的“Windows窗体应用程序”
3、在“解决方案资源管理器”中,java微信公众平台 源码右键点击“Form1.vb”,选“删除”,点确定
4、在“解决方案资源管理器”中,右键点击“Windows Application1”,选“添加”-->“现有项”,将“Form1.vb”添加进来
5、重复第4步,将“Form1.Designer.vb”添加进来
OK了,也许还不能运行,但至少代码和窗体控件找回来了。
2024-12-23 23:49
2024-12-23 23:43
2024-12-23 22:30
2024-12-23 22:13
2024-12-23 22:00