易截截图软件、单文件、免安装、纯绿色、仅160KB

VB显示网页源码或内容

 http://blog.donews.com/sloo/archive/2006/01/29/711269.aspx
1.用Microsoft Internet Transfer Control 控件(在部件中添加),代码非常简单,如下(在form上添加一个Inet1和Text1和Command1):
Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("http://www.vbgood.com/")
End Sub
2.如果是使用 WebBrowser控件,代码也非常简单,如下(在form上添加一个WebBrowser1和Text1):
Private Sub Form_Load() WebBrowser1.Navigate2 "http://xsuplist.hintsoft.net/game/xsGame"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'显示源码
Text1.Text = WebBrowser1.Document.documentElement.outerHTML
''显示内容
'Text1.Text = WebBrowser1.Document.documentElement.outerTEXT
End Sub
VBS脚本:
Set oDOM = WScript.GetObject("http://baidu.com")
do until oDOM.readyState = "complete"
WScript.sleep 200
loop
WScript.echo oDOM.documentElement.outerText


相关文档:

vb使用open方法读写文件

 
vb使用open方法读写文件
(一)打开和关闭文件
  1、顺序文件
  打开顺序文件,我们可以使用Open语句。它的格式如下:

Open pathname For [Input |Output |Append] As [#]filenumber [Len = buffersize]
  说明:
  (1)参数pathname 表示要打开的文件名,文件名可以包含有驱动器和目 ......

asp vb.net 在线统计 简单版本 和精确版本

 简单
在Global.asa文件中加入如下的代码:
Java代码
1. <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
2.
3. Sub Application_OnStart
4.
5. '当服务器开启时,设置在线用户计数器为0
6. Application("ActiveUsers") = 0
7.
......

VB: 一个正则提取功能

'引用:Microfoft VBScript Regular Expressions 5.5 '一个正则提取功能
Public Function regGetStr_three(ByVal myString As String, ByVal patReg As String) As String()
   Dim objRegExp As RegExp
   Dim objMatch As Match
   Dim colMatches   As Ma ......

VB: 取网页源码

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
    ByVal pCaller As Long, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号