Using VB to write the Brush QQ level tool

Source: Internet
Author: User
Today, I used a www.cn90.net original brush QQ level tool. Feel like this software it's written very boring, it is not difficult, so I try to use VB to write a bar!

========================================================
Option Explicit
Private Declare Function terminateprocess Lib "kernel32" (ByVal hprocess as Long, ByVal Uexitcode as long) as long
Private Declare Function openprocess Lib "kernel32" (ByVal dwdesiredaccess as Long, ByVal binherithandle as Long, ByVal DW ProcessID as long) as long
Private Declare Function closehandle Lib "kernel32" (ByVal Hobject as long) as long
Private Declare Function gettickcount Lib "kernel32" () as Long
Const process_terminate = 1
Dim Proid as Long
Dim strpath as String
Dim 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 = True
End Sub

Private Sub Command2_Click ()
timer1.enabled = False
command1.enabled = True
command2.enabled = False
End Sub

Private Sub Form_Load ()
command2.enabled = False
timer1.enabled = False
End 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 Brush Level tool is written in BCB, I wrote this in VB. Two software Although the usage is different, but the function is similar!




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.