如何改变默认进程优先级

时间:2022-11-02 20:49:22
我想让我编译的程序运行后就自动改变优先级 如 高 高于标准 实时,请问怎么弄?
谢谢了。

5 个解决方案

#1


该回复于2012-01-17 09:01:46被版主删除

#2


Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

#3


楼上正解

#4


引用 2 楼 jiuhexuan 的回复:
Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

up

#5


引用 2 楼 jiuhexuan 的回复:
Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

C# 的写法

下面这个是VB.Net

Private current As Process = Process.GetCurrentProcess
current.PriorityClass = ProcessPriorityClass.High

#1


该回复于2012-01-17 09:01:46被版主删除

#2


Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

#3


楼上正解

#4


引用 2 楼 jiuhexuan 的回复:
Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

up

#5


引用 2 楼 jiuhexuan 的回复:
Process current = Process.GetCurrentProcess();
current.PriorityClass = ProcessPriorityClass.High;

C# 的写法

下面这个是VB.Net

Private current As Process = Process.GetCurrentProcess
current.PriorityClass = ProcessPriorityClass.High