VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Change the priority of available windows to idle or high

by Jake (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 24th May 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Change the priority of available windows to idle or high

API Declarations


Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function SetPriorityClass Lib "kernel32" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
Private Const NORMAL_PRIORITY_CLASS = &H20
Private Const IDLE_PRIORITY_CLASS = &H40
Private Const HIGH_PRIORITY_CLASS = &H80
private we as long,proc as long

Rate Change the priority of available windows to idle or high



GetWindowThreadProcessId(Me.hwnd, we)
'Get process handle of your window
proc = OpenProcess(0, False, we)
'Set the priority class of the window
SetPriorityClass proc, HIGH_PRIORITY_CLASS

Download this snippet    Add to My Saved Code

Change the priority of available windows to idle or high Comments

No comments have been posted about Change the priority of available windows to idle or high. Why not be the first to post a comment about Change the priority of available windows to idle or high.

Post your comment

Subject:
Message:
0/1000 characters