易截截图软件、单文件、免安装、纯绿色、仅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制作OCX控件

 如今OCX控件在编程中已占领了很重要的地位,我们可以利用OCX控件完成一些相当复杂的编程操作。同时OCX控件还有利于主程序的简单化、功能的重用、隐藏程序实现细节、便于升级、传播方便等优点。现在我们可以利用VB 5.0方便地制作出自己的OCX控件供我们在编程中使用,同时还可以把它送给你周围喜欢编程的朋友!下面列出制 ......

[转载]: 教你如何用VB做控件*.ocx

教你如何用VB做控件*.ocx
一个控件有很多事件如:Click、MouseDown、MouseUp、MouseMove等。要触发这些事件都需要你加入代码。在控件的声明处加入Public Event Click()就表明该控件有一“Click”事件。自己编写的控件有什么事件就在声明处加几条事件
如今OCX控件在编程中已占领了很重要的地位,我们可以利用OC ......

C#中调用VB中Inputbox功能

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

VB.NET压缩ACCESS数据库

'创建数据库
  Private Sub Create(ByVal mdbPath As String)
        If File.Exists(mdbPath) Then
            Throw New Exception("目标数据库已经存在,无法创建")
        ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号