Solved

Some serious help with programming (and multitasking?)

Posted on 1998-11-04
6
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 300 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
Technology Partners: 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 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