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
相关文档:
http://www.Experts-Exchange.com: 非常好的问题 讨论区,高手数不尽,而且这里的人很有专业精神,不会讨论一些和程序无关又无聊的问题。不过想要别人帮你 解决问题,自己也要有真诚的态度。
http://www.Codeguru.com/vb: 有名的源码讨论站 点,特点是在每个源码下面都可以跟帖讨论。
http://www.planet-source-code.co ......
'引用:Microfoft VBScript Regular Expressions 5.5 '一个正则提取功能
Public Function regGetStr_three(ByVal myString As String, ByVal patReg As String) As String()
Dim objRegExp As RegExp
Dim objMatch As Match
Dim colMatches As Ma ......
正在开发小秘书系统并不断提高其智能水平,其中用到的是脚本支持的技术
虽然这部分不属于初学者使用,然而有些人想学这个东东,这里就发~~~布出去吧!
新建一个标准exe工程(Standard EXE);
"工程"(Project)-->"部件"(Components)
选定"Microsoft Script Control 1.0" ,位置是C:\WINDOWS\system32\msscript.ocx
添 ......
VB6里面的安装内容中有JET (IISAM)部件,安装时加以选择,你可以修复安装你的VB6。具体做法如下:
1、重新启动VB安装程序,选取工作站工具和组件=》添加、删除程序=》数据访问=》更改选项=》选中Jet IIsam
2、重装VB,安装时选自定义,全部选中。 ......