Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 02-03-09   #1 (permalink)
Overclocker
 
MC-Sammer's Avatar
 
intel ati

Join Date: Oct 2007
Location: Home
Posts: 86

Rep: 2 MC-Sammer Unknown
Unique Rep: 2
Folding Team Rank: 664
Trader Rating: 0
Default My First actual VB 2008 application!

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
4.21 GHz - 920 i7 D0

System: La Tigre
CPU
i7 920 D0 @ {Working on it}
Motherboard
ASUS P6T V2
Memory
12GB OCZ PC-12800
Graphics Card
Visiontek Radeon 4890
Hard Drive
x2 WD 500GB RAID 0
Sound Card
Onboard
Power Supply
Antec CP-850
Case
Antec 1200
CPU cooling
Thermalright IFX-14 w/ 2xSythe Slipstream 1900 RPM
GPU cooling
Stock
OS
Vista Ultimate x64
Monitor
ASUS 24"
MC-Sammer is offline I fold for Overclock.net   Reply With Quote
Old 02-03-09   #2 (permalink)
Programmer
 
Polska's Avatar
 
intel nvidia

Join Date: Oct 2007
Location: Toronto, Ontario, Canada
Posts: 707

Rep: 82 Polska is acknowledged by some
Unique Rep: 72
Trader Rating: 2
Default

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:
Originally Posted by roningai
Never,eva go AS5 to mouth....
GPU-Z Validation
CPU-Z Validation
XBL Gamer Card

System: Big Polish Sausage
CPU
E6850 3.7Ghz @ 1.45v
Motherboard
Gigabyte GA-EP45-UD3P
Memory
Corsair Dual Channel TWINX 2048MB PC6400 DDR2 800
Graphics Card
EVGA 8800 GTS 640MB @ 650/1000
Hard Drive
WD Raptor 150Gb , WD Black 500Gb
Sound Card
Turtle Beach - Montego DDL
Power Supply
Ultra 700W
Case
Ultra Grid ATX Case
CPU cooling
zalman 9700
GPU cooling
stock
OS
Windows 7 Pro RTM (32 bit)
Monitor
Samsung 226BW

Last edited by Polska : 02-03-09 at 10:11 AM
Polska is offline   Reply With Quote
Old 02-03-09   #3 (permalink)
2 + 2 = 5
 
DuckieHo's Avatar
 
intel nvidia

Join Date: Nov 2006
Location: In a Chair.
Posts: 34,896

Rep: 4167 DuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guruDuckieHo is a guru
Unique Rep: 1904
Trader Rating: 56
Default

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


System: Three Dead Mobos in a Year
CPU
Q6600 (3.4GHz)
Motherboard
EVGA 780i
Memory
2x2GB OCZ Reaper 1096MHz
Graphics Card
GTX260 55nm
Hard Drive
PERC 6/i: 3xRAID0 7200.12 500GB
Sound Card
X-Fi XtremeMusic
Power Supply
Corsair 620HX
Case
Li Lian PC-V2100 [10x120mm fans]
CPU cooling
FuZion V2 + Quad-Heatercore
GPU cooling
EK Block + DDC-3.2
OS
Vista Ultimate 64
Monitor
Samsung 226BW "C" + Sceptre 19"
DuckieHo is online now Overclocked Account DuckieHo's Gallery   Reply With Quote
Old 02-03-09   #4 (permalink)
Overclocker
 
MC-Sammer's Avatar
 
intel ati

Join Date: Oct 2007
Location: Home
Posts: 86

Rep: 2 MC-Sammer Unknown
Unique Rep: 2
Folding Team Rank: 664
Trader Rating: 0
Default

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
4.21 GHz - 920 i7 D0

System: La Tigre
CPU
i7 920 D0 @ {Working on it}
Motherboard
ASUS P6T V2
Memory
12GB OCZ PC-12800
Graphics Card
Visiontek Radeon 4890
Hard Drive
x2 WD 500GB RAID 0
Sound Card
Onboard
Power Supply
Antec CP-850
Case
Antec 1200
CPU cooling
Thermalright IFX-14 w/ 2xSythe Slipstream 1900 RPM
GPU cooling
Stock
OS
Vista Ultimate x64
Monitor
ASUS 24"
MC-Sammer is offline I fold for Overclock.net   Reply With Quote
Old 02-04-09   #5 (permalink)
Overclocker
 
MC-Sammer's Avatar
 
intel ati

Join Date: Oct 2007
Location: Home
Posts: 86

Rep: 2 MC-Sammer Unknown
Unique Rep: 2
Folding Team Rank: 664
Trader Rating: 0
Default

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
4.21 GHz - 920 i7 D0

System: La Tigre
CPU
i7 920 D0 @ {Working on it}
Motherboard
ASUS P6T V2
Memory
12GB OCZ PC-12800
Graphics Card
Visiontek Radeon 4890
Hard Drive
x2 WD 500GB RAID 0
Sound Card
Onboard
Power Supply
Antec CP-850
Case
Antec 1200
CPU cooling
Thermalright IFX-14 w/ 2xSythe Slipstream 1900 RPM
GPU cooling
Stock
OS
Vista Ultimate x64
Monitor
ASUS 24"
MC-Sammer is offline I fold for Overclock.net   Reply With Quote
Old 02-04-09   #6 (permalink)
Performance
 
linskingdom's Avatar
 
intel nvidia

Join Date: Jun 2007
Location: In Office
Posts: 13,419

Rep: 3340 linskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a gurulinskingdom is a guru
Unique Rep: 1406
Trader Rating: 7
Default

Quote:
Originally Posted by Polska View Post
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();
}

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..


System: QD65D45
CPU
E8500
Motherboard
Gigabyte EP45-UD3P
linskingdom is offline Overclocked Account linskingdom's Gallery   Reply With Quote
Old 02-04-09   #7 (permalink)
Overclocker
 
MC-Sammer's Avatar
 
intel ati

Join Date: Oct 2007
Location: Home
Posts: 86

Rep: 2 MC-Sammer Unknown
Unique Rep: 2
Folding Team Rank: 664
Trader Rating: 0
Default

Thank You linskingdom! It worked! Y@Y! Thank you thank you thank you!
__________________
I fold for team 37726
4.21 GHz - 920 i7 D0

System: La Tigre
CPU
i7 920 D0 @ {Working on it}
Motherboard
ASUS P6T V2
Memory
12GB OCZ PC-12800
Graphics Card
Visiontek Radeon 4890
Hard Drive
x2 WD 500GB RAID 0
Sound Card
Onboard
Power Supply
Antec CP-850
Case
Antec 1200
CPU cooling
Thermalright IFX-14 w/ 2xSythe Slipstream 1900 RPM
GPU cooling
Stock
OS
Vista Ultimate x64
Monitor
ASUS 24"
MC-Sammer is offline I fold for Overclock.net   Reply With Quote
Old 02-04-09   #8 (permalink)
Overclocker
 
MC-Sammer's Avatar
 
intel ati

Join Date: Oct 2007
Location: Home
Posts: 86

Rep: 2 MC-Sammer Unknown
Unique Rep: 2
Folding Team Rank: 664
Trader Rating: 0
Default

Poop, it closes explorer but now it opens back up before I want it too... any more ideas?
__________________
I fold for team 37726
4.21 GHz - 920 i7 D0

System: La Tigre
CPU
i7 920 D0 @ {Working on it}
Motherboard
ASUS P6T V2
Memory
12GB OCZ PC-12800
Graphics Card
Visiontek Radeon 4890
Hard Drive
x2 WD 500GB RAID 0
Sound Card
Onboard
Power Supply
Antec CP-850
Case
Antec 1200
CPU cooling
Thermalright IFX-14 w/ 2xSythe Slipstream 1900 RPM
GPU cooling
Stock
OS
Vista Ultimate x64
Monitor
ASUS 24"
MC-Sammer is offline I fold for Overclock.net   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 04:11 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.13755 seconds with 8 queries