易截截图软件、单文件、免安装、纯绿色、仅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根据窗口标题获取应用程序完整路径(来自网络)

VB根据窗口标题获取应用程序完整路径(来自网络)
Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId A ......

.net中用DropDownList选择日期(vb代码)

看了别人写的C#的 自己转了一下 然后后重新改了改 写成了这个
另外还有一个我写的验证日期是否合法的代码 在后面 都是vb的 c#只会看不会写
  '判断闰年=======================
Private Function CheckLeap(ByVal year As Integer) As Boolean
If (year Mod 4 = 0) AndAlso (year Mod 100 <> ......

[VB]GDI+ IStream、StdPicture、Byte() 互转

很多年前就想做一个远程控制的软件,只是一直以来图片的压缩速度总是提升不上去,而我也参考过很多网上的关于图片压缩的例子,比如zyl910的GIF_LZW压缩方法,Huffman压缩方法,以至到GDI+的直接生成JPG、PNG的方法(这种方法无论从压缩率和速度上都是最佳的,可惜这种方法网上一直没找到直接保存为Byte()的例子,见得最多的 ......

VB 取得指定exe文件版本号

【函数】  
  GetFileVersionInfo  
   
  【操作系统】  
  Win9X:Yes  
  WinNT:Yes  
   
  【声明】  
  GetFileVersionInfo   Lib   "version.dll"     Alias   "GetFileVersionInfoA" &n ......

VB与Matlab混合编程

VB与Matlab混合编程有多种方式,这里讨论Matlab将M文件编译成com组件共VB调用的方式。
Matlab版本:Matlab 7.7. 0.471 R2008b
VB版本:VB 6.0 & VB 2008
首先写好完成某个功能的m文件,比如在m文件中写入如下函数
function [returns,stderr]=GetReturns(prices)
    returns=price2ret(prices)&nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号