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

vb实现网页自动填表

http://tieba.baidu.com/f?kz=580219489
http://www.anqn.com/vb/154/8974.shtml
http://www.codefans.net/soft/5089.shtml
http://www.mndsoft.com/blog/article.asp?id=1121
 http://topic.csdn.net/t/20020113/14/474848.html
直接运行网页中的JavaScript:
function alllefttab()
WebBrowser1.Document.parentwindow.execScript "insert(2)", "JavaScript"
自动选择下拉列表中的某项2
Dim s
s = "javascript:document.getElementsByName(""w_type"")[0].value='2';void(0)"
WebBrowser1.Document.parentwindow.execscript s
添加一个WebBrowser1
Private Sub Form_Load()
WebBrowser1.Navigate "http://zhidao.stnts.com/"
'WebBrowser1.Navigate "http://zhidao.stnts.com/index.php?act=worklog:loginfo&id="
End Sub
Private Sub Form_Resize()
WebBrowser1.Width = Me.Width - 600
WebBrowser1.Height = Me.Height - 1000
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'登录并转到
If WebBrowser1.LocationURL = "http://zhidao.stnts.com/" Then
Dim vDoc, vTag
Dim i As Integer
Set vDoc = WebBrowser1.Document
For i = 0 To vDoc.All.length - 1
If UCase(vDoc.All(i).tagName) = "INPUT" Then
Set vTag = vDoc.All(i)
If vTag.Type = "text" Or vTag.Type = "password" Then
Select Case vTag.Name
Case "userid"
vTag.Value = "这里是用户"
Case "userps"
vTag.Value = "这里是密码"
End Select
ElseIf vTag.Type = "submit" Then
vTag.Click
End If
End If
Next i
WebBrowser1.Navigate "http://zhidao.stnts.com/index.php?act=worklog:insert"
End If


If WebBrowser1.LocationURL = "http://zhidao.stnts.com/index.php?act=worklo


相关文档:

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

VB错误代码

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

(VB)FTP异步下载

 该方法不需要使用API及第三方控件
这里使用的是VB的UserControl控件的AsyncRead方法
步骤如下:
1、添加一个用户控件,设置InvisibleAtRuntime属性为true,目的是运行时该控件不显示用户界面,就象Timer控件一样。
2、到自定义控件的代码窗口,添加如下代码
Option Explicit
'下载结果枚举
Public Enum Downloa ......

转VB 字符串处理函数集 收藏

 

VB 字符串处理函数集

收藏



mid(字符串,从第几个开始,长度)
  在[字符串]中[从第几个开始]取出[长度个字符串] 
例如 mid("小欣无敌",1,3) 则返回 "小欣无" 
instr(从第几个开始,字符串1,字符串2)
从规定的位置开始查找 ......

VB+SQL编写数据库管理系统

     参照案例教程建立的数据库管理系统在甚多方面都存在问题。可能是新手,不管是对于大一就学过的VB编程还是这个学期刚接触的SQL,很多小问题常常出现在调试过程中。想请熟悉使用这两个平台的高手帮忙指点一下。
     1.如何解决DataGrid中多个column和SQL中多个表的绑定?目的 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号