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

x
?
Solved

Some serious help with programming (and multitasking?)

Posted on 1998-11-04
6
Medium Priority
?
182 Views
Last Modified: 2010-04-30
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!
0
Comment
Question by:netwebsales
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 1200 total points
ID: 1443169
Sprinkle DOEVENTS in your loops to give other tasks a time slice...

0
 

Author Comment

by:netwebsales
ID: 1443170
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
 
LVL 12

Expert Comment

by:mark2150
ID: 1443171
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:netwebsales
ID: 1443172
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
 

Author Comment

by:netwebsales
ID: 1443173
thanks for the help!
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1443174
Thanks for the points!

M
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

879 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