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


相关文档:

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: 取网页源码

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程序中用ADO对象动态创建数据库和表

    摘要: 本文阐述了在VB程序中利用ADO对象动态创建数据库和数据表的方法,这些方法在开发VB数据库应用程序中很有实用价值,它可以提高数据库程序灵活性。
  关键词:数据库、数据表、ADO、ADOX
  1: 问题的提出
  在Visual Basic中,常用的数据访问接口有下列三种:数据库访问对象(DAO,Data A ......

VB程序中使用脚本支持

 正在开发小秘书系统并不断提高其智能水平,其中用到的是脚本支持的技术
虽然这部分不属于初学者使用,然而有些人想学这个东东,这里就发~~~布出去吧!
新建一个标准exe工程(Standard EXE);
"工程"(Project)-->"部件"(Components)
选定"Microsoft Script Control 1.0" ,位置是C:\WINDOWS\system32\msscript.ocx
添 ......

[vb]使用vb统计.java的行数

 工作需要,针对java文件,作了一个行数统计的工具。统计的主要代码如下:
    Set srcIn = fso.OpenTextFile(fileNm, ForReading)
    
    Do While Not srcIn.AtEndOfStream
        buf = srcIn.ReadLine
 &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号