Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get more CPU power for my VB6 program?

Posted on 2011-03-07
4
Medium Priority
?
480 Views
Last Modified: 2012-05-11
Hi experts!

 I’m starting a VB6 program (exe) which write in memory via GDI. I’m interesting, what options I have to give it max. bigger priority as thread as I need bigger possible speed I can get . May be some API call which to notify Windows to give it more CPU power?

 Or may be I can do this setting manually in Windows ? The program work primary under Windows XP 32 bit, will be good but it is not a must to work in Win 7 too.

 Thanks.
0
Comment
Question by:dvplayltd
4 Comments
 
LVL 11

Expert Comment

by:Plantwiz
ID: 35063158
You may change the process priorty in Windows 7 through Task Manager.

CTL+ALT+ESC to open task manager
Applications TAB
Select the Application
Right-click and "GO TO PROCESS"
then "SET Priority"
Set anywhere from Realtime-High-Above Normal-Normal-BelowNormal or Low
Confirm you wish to change priority



0
 
LVL 10

Accepted Solution

by:
LMiller7 earned 2000 total points
ID: 35063199
Raising the priority of a process doesn't normally improve it's performance. If your VB6 program is the only CPU bound application running (the usual case) then it will already be receiving almost all the CPU time already. In this case raising it's priority will do nothing useful. If you do have more than one CPU bound application running then you need to deal with that situation.

The Windows API has the SetPriorityClass() function that will raise a processes priority. See MSDN for the details. But don't expect to gain anything by using it.
0
 
LVL 5

Expert Comment

by:BrianVSoft
ID: 35067201
Agree with LM7.. Process priority is rarely the problem if a program seems to be slow.. The problem is usually the way the program is written - or the sheer amount of data/processing it has to do..
There are many "pitfalls to avoid" and many "tricks of the trade" in writing efficient code.
You would probably need to give some details of the process before the guys could give some suggestions.
0
 

Author Closing Comment

by:dvplayltd
ID: 35067909
10x.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question