Solved

How to get more CPU power for my VB6 program?

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exe program is not a valid Win 32 application 15 106
Validating VB6 Function 19 56
Windows Script Host failed (Access is denied.) error 6 109
Computer software inventory 5 79
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 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…

867 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

12 Experts available now in Live!

Get 1:1 Help Now