用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 ......
Private Sub PrintTxt(txt As String, ConWidth As Long, LeftPosition As Long)
Dim str As String
Dim str1 As String
Dim len1 As Long
str = txt
len1 = ConWidth
&nbs ......
利用API把一个控件绑定到另一个控件里
利用API把一个控件绑定到另一个控件里。不过要控件有HWND属性。例如:
New_OldParent& = SetParent(Me.Text_txt.hWnd, Me.picture_bj.hWnd)
把txt控件添加到picture控件里使用。
注:使用 ......
相信现在绝大多数计算机上使用的是IE浏览器。如何通过编程控制IE的操作呢,本文将一步步介绍如何通过VB
调用IE的对象库来对IE进行控制。
本文使用的编程工具是VB6英文企业版,浏览器是IE5,以下的代码只能在IE4及以上版本下运行。另外为了能深
入了解程序代码,最好能安装MSDN。 ......