Solved

Some serious help with programming (and multitasking?)

Posted on 1998-11-04
6
173 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 300 total points
Comment Utility
Sprinkle DOEVENTS in your loops to give other tasks a time slice...

0
 

Author Comment

by:netwebsales
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:netwebsales
Comment Utility
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
Comment Utility
thanks for the help!
0
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
Thanks for the points!

M
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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