|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming | |
My First actual VB 2008 application!
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
Overclocker
|
Okay, so I'm working on an application I'm calling "Gamer Mode" and I'm try to figure out how to stop certain processes using a button. Like when someone presses the "begin" button, I want explorer to close, but I can't seem to figure it out. can anyone give me some tips/advice?
__________________
I fold for team 37726![]()
|
|||||||||||||
|
|
|
|
|
#2 (permalink) | ||||||||||||||
|
Programmer
![]()
Join Date: Oct 2007
Location: Toronto, Ontario, Canada
Posts: 707
Rep: 82
![]() Unique Rep: 72
Trader Rating: 2
|
You can probably accomplish this using the Process Class, Process Members (select the framework version you are working with as there coul be slight changes to the class between frameworks). As to how exactly I don't know would have to look at it, no time at the moment.
Sorry this is c#, but it should give you an idea. This would kill everything with a specific name, might be too general. Have a look at the Process class see what other methods it offers. Code:
Process[] processes = Process.GetProcessesByName("SomeProcess");
foreach (Process _process in processes) {
_process.Kill();
}
__________________
Quote:
CPU-Z Validation XBL Gamer Card
Last edited by Polska : 02-03-09 at 10:11 AM |
||||||||||||||
|
|
|
|
|
#3 (permalink) | |||||||||||||
|
2 + 2 = 5
![]()
Join Date: Nov 2006
Location: In a Chair.
Posts: 34,896
Rep: 4167
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Unique Rep: 1904
Trader Rating: 56
|
Download AMD Fuzion.
__________________
To answer most of your questions: (1) a fridge cannot cool a PC (2) 64-bit OS for over 3.4GB (3) If a PCIe card fits, it should work (4) Resolution, not screen size (5) If you have a question, it is not news (6) Report, not respond to Spam (7) Single-Rail/Non-Modular PSUs are not always better than Multi-Rail/Modular
|
|||||||||||||
|
|
|
|
#4 (permalink) | |||||||||||||
|
Overclocker
|
after about 10 hours of fiddling around and searching google, I still can't find anything. All the things I've tried aren't working and it's getting annyoing. btw, I'm using VB 2008 and I'm designing it to use .Net 2.0 farmework.
__________________
I fold for team 37726![]()
|
|||||||||||||
|
|
|
|
|
#5 (permalink) | |||||||||||||
|
Overclocker
|
Well one of my friends, who is quite good with coding and such, gave me the code for a batch file that will close explorer, but now I need to figure out how to include and execute that batch file when I publish the application.
__________________
I fold for team 37726![]()
|
|||||||||||||
|
|
|
|
|
#6 (permalink) | ||||
|
Performance
![]() |
Quote:
It will be same as Polska said, you can do similar code in VB. Imports System.Threading.Thread Dim _pr() As Process _pr = Process.GetProcessesByName("exe name") For Each spr As Process In _pr spr.Kill() Next
__________________
Push to the limit one more time.. ![]()
|
||||
|
|
|
|
#7 (permalink) | |||||||||||||
|
Overclocker
|
Thank You linskingdom! It worked! Y@Y! Thank you thank you thank you!
__________________
I fold for team 37726![]()
|
|||||||||||||
|
|
|
|
|
#8 (permalink) | |||||||||||||
|
Overclocker
|
Poop, it closes explorer but now it opens back up before I want it too... any more ideas?
__________________
I fold for team 37726![]()
|
|||||||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|