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

“自动点击按钮”小工具VB源码

“自动点击按钮”小工具VB源码
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
On Error Resume Next '遇错处理
Me.Hide
Dim AppPath$
AppPath = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\") '程序路径
ChDrive Left(AppPath, 2) '切换磁盘
ChDir AppPath '切换路径
iniFileName = AppPath & "AutoClick.ini" '配置文件
If Dir(iniFileName) = "" Then
MsgBox "请在AutoClick.ini中配置信息!"
Unload Me
End If
Dim WinTitle As String
Dim ButTitle As String
Dim WinClass As String
Dim ButClass As String
Dim GameRuns As String
Dim WaitTime%
Dim WinHwnd As Long
Dim ButHwnd As Long
WinTitle = GetIniS("Config", "WinTitle", "")
ButTitle = GetIniS("Config", "ButTitle", "")
WinClass = GetIniS("Config", "WinClass", "")
ButClass = GetIniS("Config", "ButClass", "")
GameRuns = GetIniS("Config", "GameRuns", "")
WaitTime = Val(GetIniS("Config", "WaitTime", "10"))
If WinTitle = "" Then Unload Me
If ButTitle = "" Then Unload Me
If WinClass = "" Then WinClass = vbNullString
If ButClass = "" Then ButClass = vbNullString
If GameRuns <> "" Then Shell "cmd /c Start """" """ & GameRuns & """", 0
If WaitTime < 1 Then WaitTime = 10
Dim YanShi%
DoEvents


相关文档:

VB调整Excel格式

Private Sub Cmd_OK_Click()
    Dim ExcelAppX As Excel.Application
    Dim ExcelBookX As Excel.Workbook
    Dim ExcelSheetX As Excel.Worksheet
   
    Dim a(1 To 3) As Single
    Dim strFormat As Variant ......

(转)VB中创建可以输出函数的DLL

VB中创建的DLL只是COM组件,无法作为输出函数的DLL。今天从朋友哪里搞到一种可以创建输出函数的DLL的方法,欣喜之余,不敢独享,现在把他介绍给大家。
  VB编译文件实际上采取了两次编译的方法,首先是调用c2.exe产生OBJ文件,然后调用Link.exe连接。如果在link的时候添加EXPORT选项,实际上是可以输出函数的。但是,在V ......

VB中filesystemobject对象实现文件存取方法

最简单的方法是使用filesystemobject对象。而它并非VB内置对象,
需引用才可以使用。
1.filesystemObject对象引用
“工程/引用/microsoft scription Runtime”
 在对象浏览器窗口中选“scripting”模块,看到增了许多对象,
drive filesystemobject    textstream &nbs ......

VB中删除数组重复元素

Option Explicit
Function Delete3(Arr As Variant) As Variant
Dim i As Integer
For i = LBound(Arr) To UBound(Arr)
If i > UBound(Arr) Then Exit For
If Arr(i) = 3 Then
Do
Dim j As Integer
For j = i To UBound(Arr) - 1
......

Developer Support Languages VC++, C# and VB.NET


Welcome to Microsoft Developer Support, Languages team blog! You will find a lot of language related troubleshooting resources here.
Troubleshooting PInvoke Related Issues 
I am back with some more PInvoke Stuff.  Recently I was working on a PInvoke issue which I found interesting ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号