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

vb移动窗体的代码

Option Explicit
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Const HTCAPTION = 2
Const WM_NCLBUTTONDOWN = &HA1
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
    If Button = 1 Then ' Checking for Left Button only
        Dim ReturnVal As Long
        x = ReleaseCapture()
        ReturnVal = SendMessage(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
    End If
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button And vbLeftButton Then
        mX = X: mY = Y
    End If
End Sub
 
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button And vbLeftButton Then
        Me.Move Me.Left - mX + X, Me.Top - mY + Y
    End If
End Sub


相关文档:

VB 取地址函数大全

Public Declare Function VarPtrArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
Public Declare Function VarPtrStringArray Lib "msvbvm60.dll" Alias "VarPtr" (Var() As Any) As Long
取对象地址: ObjPtr
取OLE对象的地址: OLE_NAME.LpOleObject
取函数地址: AddressOf
取字符串地址: StrPtr
取 ......

BarCode 算法 VB类库 2

 
Option Explicit
Public Function ascii2Char(strInput As String) As String
Dim i As Integer
Dim strTemp As String
Dim nPos As Integer
Dim nValue As Integer
i = 1
nPos = InStr(i, strInput, "&#", vbTextCompare)
While (nPos > 0)
    ascii2Char = ascii2Char + Left(st ......

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

 

VB 字符串处理函数集

收藏



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

VB显示网页源码或内容

 http://blog.donews.com/sloo/archive/2006/01/29/711269.aspx
1.用Microsoft Internet Transfer Control 控件(在部件中添加),代码非常简单,如下(在form上添加一个Inet1和Text1和Command1):
Private Sub Command1_Click()
Text1.Text = Inet1.OpenURL("http://www.vbgood.com/")
End Sub
2.如果是使用 W ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号