Use VB to write QQ level tools

xiaoxiao2021-03-06  36

I used a tool for a brush QQ level for www.cn90.net. It feels so that it is very boring, it is not difficult, so I try to write one with VB!

============================================================================================================================================================================================================= ====== Option ExplicitPrivate Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As LongPrivate Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long ) As LongPrivate Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Declare Function GetTickCount Lib "kernel32" () As LongConst PROCESS_TERMINATE = 1Dim proID As LongDim strpath As StringDim mm

Private Sub Command1_Click () Command1.Enabled = False Command2.Enabled = True mm = Val (Text2.Text) * 1000 strpath = Text1.Text ProID = Shell (strpath, vbNormalFocus) Timer1.Interval = 1000 Timer1.Enabled = TrueEnd Sub

Private submmand2_click () Timer1.enabled = false command1.enabled = true command2.enabled = falsend sub

PRIVATE SUB FORM_LOAD () Command2.enabled = false Timer1.enabled = falsend Sub

Private Sub Timer1_Timer () Dim hProcess As Long Dim i i = GetTickCount () Do Until GetTickCount ()> i mm DoEvents Loop hProcess = OpenProcess (PROCESS_TERMINATE, False, ProID) TerminateProcess hProcess, 1 CloseHandle hProcess ProID = Shell (strpath, vbNormalFocus ) End Sub

============================================================================================================================================================================================================= ====== CN90 The tool of the brush level is written in BCB, I have written with VB. Two software is not only the same, but the function is almost!

转载请注明原文地址:https://www.9cbs.com/read-57556.html

New Post(0)