Solved

How to get more CPU power for my VB6 program?

Posted on 2011-03-07
4
460 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 500 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now