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 ......
3,Return without GoSub
5,Invalid procedure call
6,Overflow
7,Out of memory
9,Subscript out of range
10,This array is fixed or temporarily locked
11,Division by zero
13,Type mismatch
14,Out of string space
16,Expression too complex
17,Cant perform requested operation
18,User int ......
VB 字符串处理函数集
收藏
mid(字符串,从第几个开始,长度)
在[字符串]中[从第几个开始]取出[长度个字符串]
例如 mid("小欣无敌",1,3) 则返回 "小欣无"
instr(从第几个开始,字符串1,字符串2)
从规定的位置开始查找 ......
如何让幻灯片在vb的框架里播放
'Microsoft PowerPoint 9.0(Office 2000的,如果是97则是8.0) Object Library)
''Microsoft PowerPoint 11.0(Office 2003) Object Library)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) '延时API声明
Private Sub Form_Load()
Dim ppt As New PowerPoint. ......