Beware - my answer was a bit tongue in cheek.
Better yet, look at Thread.Sleep(??) - basically pauses your
thread.
DoEvents() can cause re-entrancy, and should only ever be
used if you
are well aware of it's pitfalls.
Shame you can't slap some sense into the client - it's
using 100%, but
only cause nothing else is using the CPU...
Dino
-----Original Message-----
From: Discussion of writing applications and components
using Visual
Basic .NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On
Behalf Of Steven
Amani
Sent: Friday, 31 March 2006 20:59
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: [VBDOTNET]
Thanks - I will add that to the code. Its annoying because
the client is
just obsessed with the task manager and its not like there
actually a
performance issue.
-----Original Message-----
From: Dean Cleaver [mailto:dean.cleaver XCEPTIONSOFTWARE.COM]
Sent: 30 March 2006 22:35
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: Re:
Look up DoEvents() and use it liberally throughout your
start-up code
Dino
-----Original Message-----
From: Discussion of writing applications and components
using Visual
Basic .NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On
Behalf Of Steven
Amani
Sent: Friday, 31 March 2006 01:16
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: [VBDOTNET]
Is there a way I can limit my program to only use up to a
maximum level
of the CPU - say 60% - Its just one client is complaining
that an
application (VB.NET) is taking up 100% of CPU when loading.
Regards,
Steve
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|