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


Program execution.

Posted on 2002-04-17
Medium Priority
Last Modified: 2010-05-02
I want to have one part of my VB6 program running with a cycletime of 10 seconds and with higher priority then other parts.

If I am using Common dialog or a Message box then my whole application holds until the input is done.

Do I have to split my program into two programs or can I make interuption of the Common dialog and Message boxes.
Question by:sek

Accepted Solution

skhorshid earned 200 total points
ID: 6947902
You need threading, It can be done in VB6 but its messy and impossible to debug.  I suggest you use VB.net,  or another programming lang.

If you really want to use VB6 then you can look at


there are probably many examples at www.planetsourcecode.com


Expert Comment

ID: 6948002
There are other methods you can use.  You can create an asyncronous ActiveX EXE file that will work the Timer, or you can create a MsgBox with a form.

Not too sure about the Common Dialog, though I don't believe you can interrupt it.

Maybe someone else has a better answer.


Expert Comment

ID: 6948196
I think you should split your program.
One to capture user’s input and save it to a file or access database.
and another one to read it and process.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Expert Comment

ID: 6955751

For the message part of your program, you may want to create a new form simply to pop up a message without pausing your program.

For the commondialog part of your program, you could simply use the common dialog apis to handle that.  Simply set the handle to 0 for the parameters in the API and it'll not disturb your program at all unless your program works in such a way:

' your coding that needs immediate attention without pausing
'call commondialog
' your coding that needs immediate attention without pausing

If the above method is how your program is programmed, you may want to use a timer to fire that comondialog event and end the timer after use.

Here's a file for you over the net to help you with the API part:

Description: To make it easy to use the common dialog through API calls. This saves on program sizes over using the common dialog OCX. Also no need for OCX to be registered since calls all done directly through API.

Anyway, there's another advantage to using APIs - you do not need to include your ocx files when exporting your proggy to other PCs.

That's it!

glass cookie : )
LVL 49

Expert Comment

ID: 7660429
Hi sek@avtech,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept skhorshid's comment(s) as an answer.

sek@avtech, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 7755137
per recommendation

Community Support Moderator @Experts Exchange

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…

886 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