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

 Option Explicit
' VB / VBA Functions for Code128(A, B,C), UCC/EAN 128
' Copyright 2004 by MW6 Technologies Inc. All rights reserved.
'
' This code may not be modified or distributed unless you purchase
' the license from MW6.
Public UFPrefixFunctions As Boolean
Private I As Integer
Pri ......

VB程序中用ADO对象动态创建数据库和表

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

转:WinForm使用WebService自动升级 (VB + .Net)

转自:http://hi.baidu.com/sunward08/blog/item/cb64ac224657014dac34de2d.html 
 
WinForm使用WebService自动升级
2009-08-08 10:49
winform程序相对web程序而言,功能更强大,编程更方便,但软件更新却相当麻烦,要到客户端一台一台地升级,面对这个实际问题,在最近的一个小项目中,本人设计了一个通过软 ......

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

 

VB 字符串处理函数集

收藏



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

[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号