Ensure one app runs in full screen; prioritize the other for higher resources due to increased usage.

Swapnil Baad 0 Reputation points
2024-01-25T08:33:49.1833333+00:00

I have two applications ( 1.UI and 2. C++ app ) running which are interdependent. The UI is in full screen mode and the C++ app is running minimzed or in background. The C++ application doesn't need to be in fullscreen mode and uses more resources.

I want the C++ application to have more priority than the UI in terms of using resources.

Update:
Following methods are followed but still I have the above problem:

  1. Increasing the priority of the C++ application in task manager.
  2. Use the function SetPriorityClass method in C++ application
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,213 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,445 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Guido Franzke 2,201 Reputation points
    2024-01-25T09:06:43.98+00:00

  2. Wesley Li 2,630 Reputation points
    2024-01-25T13:56:21.9466667+00:00

    Hello To ensure that your UI application runs in full screen while your C++ application runs in the background with higher priority, you can follow these steps:  

    1. Running the UI Application in Full Screen: You can set the UI application to run in full screen mode through its settings or properties. If it doesn’t have an in-built full screen mode, you can use the Windows shortcut F11 to make a window full screen.  
    2. Prioritizing the C++ Application: You can increase the priority of the C++ application using the Task Manager in Windows. Here’s how:   Open Task Manager (Right Click on the Start Bar and select Task Manager) Click on the Processes tab Right click on the C++ application process and select “Set Priority” You can then select a higher priority Please note that setting a process to a higher priority means that the process will be given preference over other processes in terms of CPU usage. Be careful when changing process priorities as it can impact the performance of other applications.  
    3. Running the C++ Application in the Background: If you want the C++ application to run in the background, you can minimize the application window or you can start the application in the background at system startup.   Please note that these steps are for Windows. If you’re using a different operating system, the steps might be different.