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

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, _
    ByVal lpfnCB As Long _
    )  As Long Private Const CP_UTF8 = 65001
Private Declare Function MultiByteToWideChar Lib "kernel32" ( _
    ByVal CodePage As Long, ByVal dwFlags As Long, _
    ByVal lpMultiByteStr As Long, ByVal cchMultiByte As Long, _
    ByVal lpWideCharStr As Long, ByVal cchWideChar As Long) As Long '取网页源码
Public Function webTxtGet(ByVal Url1 As String) As String
   Dim strFile As String
   Dim lngReturn As Long
   Dim TextLine As String, textCon As String
   Dim Big5str As String
    Dim tmpUTF8() As Byte
    Dim lLength As Long, lBytes As Long, lWC As Long
On Error Resume Next
   strFile = App.Path & "\txtWeb.txt"
   Open strFile For Output As #1
   Close #1
   lngReturn = URLDownloadToFile(0, Url1, strFile, 0, 0)
   Open strFile For Binary As #1
    webTxtGet = Space(LOF(1))
    Get #1, , webTxtGet
   Close #1
  Kill strFile
End Function '取网页源码_如果网页是UTF-8
Public Function webTxtGet_utf8(ByVal Url1 As String) As String
   Dim strFile As String
   Dim lngReturn As Long
   Dim TextLine As String, textCon As String
   Dim Big5str As String
    Dim tmpUTF8() As Byte
    Dim lLength As Long, lBytes As Long, lWC As Long
On Error Resume Next
   strFile = App.Path & "\


相关文档:

浅谈VB编程中网格控件的选用及使用方法

 内容提要摘要: The software of visual basic developed by Microsoft corporation is becoming one of the main develop tools at today。 As it's remarkable peculiarity, the Grid control has very great practical and active use。 This topic discusses how to use the grid control of VB to develop prati ......

C#中调用VB中Inputbox功能

  C#自己没有Inputbox这个类,但是Inputbox也蛮好用的,所以有两种方法可以使用
   一:.间接调用vb中的Inputbox功能
      1。在项目中添加对Microsoft.VisualBasic引用
      2。在项目中添加命名空间Using Microsoft.VisualBasic;
  &n ......

BarCode 算法 VB类库 1

 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 ......

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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号