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下如何编写CRC校验程序
随着计算机技术的不断发展,在现代工业中,利用微机进行数据通讯的工业控制应用得也越来越广泛。由于传输距离、现场状况等诸多可能出现的因素影响,计算机与受控设备之间的通讯数据常会发生无法预测的错误。为了防止错误所带来的影响,一般在通讯时采取数据校验的办法,而循环冗余码校 ......
Option Explicit
' VB / VBA Functions for Code128(A, B,C), UCC/EAN 128
' Copyright 2004 by MW6 Technologies Inc. All rights reserved.
'
' This code may not be modified or distributed unless you purchase
' the license from MW6.
Public UFPrefixFunctions As Boolean
Private I As Integer
Pri ......
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
......
http://topic.csdn.net/t/20030306/11/1497896.html#
工程文件名:Chdsp.vbp
Type=Exe
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\PWIN95\SYSTEM\\STDOLE2.TLB#OLE Automation
Module=Module1; ChDsp.bas
Form=ChDsp.frm
Startup="Form1"
He ......
3,Return without GoSub
5,Invalid procedure call
6,Overflow
7,Out of memory
9,Subscript out of range
10,This array is fixed or temporarily locked
11,Division by zero
13,Type mismatch
14,Out of string space
16,Expression too complex
17,Cant perform requested operation
18,User int ......