Some serious help with programming (and multitasking?)

I have been writing programs for the company that I
work for, for about 6 or 7 months.  Most all of the
programs are used to manipulate databases (mainly
SQL server).  My question is...
When I am running a program, it completely locks
me out of it until it is done.  I can't move the
window, I can't stop it, etc.  How can I program
so that I get that kind of functionality?  Is
there some trick to it?

PLEASE help!
netwebsalesAsked:
Who is Participating?
 
mark2150Connect With a Mentor Commented:
Sprinkle DOEVENTS in your loops to give other tasks a time slice...

0
 
netwebsalesAuthor Commented:
So that's all it take, huh?
It looks like you just probably made yourself 300 points
real easy ;-)
Let me try that out before i go ahead and send them over
though.

Thanks!
0
 
mark2150Commented:
Whenever you have a *REALLY TIGHT* loop, the VB will consume all resources. Tossing in the occassional DOEVENTS will give the rest of the system some time to execute.

You also have to do this with certain controls (the internet control comes to mind). Since the internet control is serviced by the OS if you have a tight polling loop on the control status you'll never give the OS a chance to run the control and you'll wait forever!

M

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
netwebsalesAuthor Commented:
So that's all it take, huh?
It looks like you just probably made yourself 300 points
real easy ;-)
Let me try that out before i go ahead and send them over
though.

Thanks!
0
 
netwebsalesAuthor Commented:
thanks for the help!
0
 
mark2150Commented:
Thanks for the points!

M
0
All Courses

From novice to tech pro — start learning today.