Visual Basic 6.0 is a programming language created by the Microsoft corporation. It uses the Beginner's All-purpose Symbolic Instruction Code (BASIC) language to help you program graphical environments, in addition to allowing you to add buttons and text boxes within the program to customise your work. When you are running a certain process within 6.0, you may want to stop it at some point. Kill a 6.0 process by typing in a few commands within the program.
- Skill level:
Other People Are Reading
Things you need
Click the process in Visual Basic 6.0 you want to stop to highlight it, and type "target_hwnd = FindWindow" into the program. Press "Enter" or "Return" to view the process' window handle, and write this information down with the pencil and paper.
Type "GetWindowThreadProcessId target_hwnd, target_process_id" and press "Enter" or "Return" to find the process' identification, and write it down with the pencil and paper.
Open the process' handle by typing in "target_process_handle = OpenProcess" and pressing "Enter" or "Return." Write the handle down with the pencil and paper.
Use the names you wrote down for the target handle, process identification and process handle to terminate the process; for example, if "Cheap Rental" appeared as the name for all three names, then type it in where appropriate after the first line of code, pressing "Enter" or "Return" after you type in each line:
"Private Sub cmdTerminate_Click()"
"Dim target_hwnd Cheap Rental"
"Dim target_process_id Cheap Rental"
"Dim target_process_handle Cheap Rental"
Type "End" and press "Enter" or "Return" to terminate the process.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for