用vb怎么获取网页标题
http://tieba.baidu.com/f?kz=255370663
搜集到一个程序
几乎都用它来完成采集任务了!贡献出来啊,很简单滴
Function strCut(strContent, StrStart, StrEnd) As String '通用截取函数
Dim strHtml, S1, S2 As String
dim strstart,strend as string
strHtml = strContent
On Error Resume Next
S1 = InStr(strHtml, StrStart) + Len(StrStart)
S2 = InStr(S1, strHtml, StrEnd)
strCut = Mid(strHtml, S1, S2 - S1)
End Function
Private Sub Form_Load()
Dim hunzi1, hunzi2 As String
hunzi1 = "<html><title>this is title</title></html>"
hunzi2 = strCut(hunzi1, "<title>", "</title>")
MsgBox hunzi2
End Sub
相关文档:
有静态和动态两种,静态的需要lib而动态的只需要一个dll就可以了(但是要知道函数的定义一般是头文
件)动态相对复杂一点!但是掌握了也不是很难
//第一步 定义函数指针就是你要调用的函数,参数必须一致,不然就内存泄露
typedef HANDLE ......
代码:
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetW ......
要想在VB6.0中使用OpenGL绘图,必须先下载一个SDK,名字叫vbogl.tlb。我用的版本是2.1,这个月要出3.0版本的了。
下载该文件后,直接在VB6.0“工程”-“引用”里面引用
1、在form中加入一个PictureBox控件
2、要在Windows里面使用OpenGL,必须先进行像素格式设置,函数代码如下
Dim hRC ......
本文来自此帖的冗长讨论,感谢Tiger_Zhao的全程指点和陈辉、阿勇、马云剑等很多朋友的热心参与。本文其他部分在:(二)、(三)、(四)。
话说VB6是个很认真细致的妈妈,它会悄没声地帮你做很多事。今天我们来说的是VB6在API调用时自动对字符串参数进行转换的“好人好事”。
第一节 体贴的VB妈 ......
Option Explicit
Dim FSO As New FileSystemObject
Dim currentFolder As Folder
Dim currentFolderName As String
Dim folderItem, fileItem
Private Sub Form_Load()
currentFolderName = FSO.GetFolder(App.Path) & "\content"
SeachFolder (FSO.GetFolder(currentFolderName))
End Sub ......