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

vb 锁定鼠标到某一位置

Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Private Sub Command1_Click() '锁定鼠标 到某一位置
    Dim r As RECT
    r.Left = 100: r.Top = 100
    r.Right = 100: r.Bottom = 100
    ClipCursor r
End Sub
Private Sub Command2_Click() '解除锁定
    ClipCursor ByVal 0&
End Sub
'原帖地址:
http://fy5388.blog.163.com/blog/static/5649953720091127115554104/


相关文档:

vb做的大小写字母转换器

'大小写字母转换器vb
'界面包括 command、command1、command2、command3 和一个 text 文本框
'command 为“互转”按钮,command1 为“转大”按钮,command2 为“转小”按钮,command3 为“清除”按钮
Private Sub Command_Click()
Dim i As Integer, n As Integer
Dim x As S ......

vb 连接Access字符串、vb连接Db2的字符串

DB2ConnectionString
b2str = "Provider=MSDASQL.1;Password=a$sk6G7;Persist Security Info=True;User ID=DBA;Data Source=ConDB2SFXXK"
AccessConnectonString
accessstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DMSJK.mdb;Jet OLEDB:database password=" ......

讨论VB中的结构体

讨论VB中的结构体[转载]
2009年10月20日 星期二 11:30
VB里面的结构体是一种WORD/DWORD对齐的结构体,这一点在编程中尤其要注意,如果是纯VB编程,则结构体的各个域如何排列可以基本不用关心,
而如果是调用API或者是调用其他的动态链接库,则很容易出问题,原因就在于:这些动态链接库是用C/C++写的,而大部分C/C++环境 ......

VB 无标题窗口置顶

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const a& = -1
Private Const b& = &H1
Private Const c& = &H2
Priva ......

VB 将长路径转为短路径 & 获取剪粘板中的文件的列表

将长路径转为短路径
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
Private Function ShortPath(ByVal FileName As String) As String
Dim S As String
On Error GoTo exitFu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号