Solved

system call in VB

Posted on 2002-07-02
7
637 Views
Last Modified: 2012-06-21
Hi

I'm looking for a system call in VB, to execute an outside application.

In C programming I can use: system([application name]).

Please help
0
Comment
Question by:lirong
7 Comments
 
LVL 4

Expert Comment

by:Steve Sirica
ID: 7125169
If it's an exe then the easiest way is to use the "shell" command.
0
 
LVL 4

Expert Comment

by:Steve Sirica
ID: 7125178
There are more elaborate/involved ways to accomplish the same thing shell does.  Hard to tell exactly what your trying to do...you were a bit vague in your question.
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 7125210

As SSirica said, you can use the shell() function to execute an external program. But this executes the program and does not wait for it to terminate.

But, I think that the system() call in C is syncronous; if so, you can use:

Declare Function FSyncShell Lib "STKIT432.DLL" Alias "SyncShell" (ByVal strCmdLine As String, ByVal intCmdShow As Long) As Long

if you want to "shell and wait" you application to be completed.
Hope this helps you.
Marco
0
Industry Leaders: 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!

 
LVL 2

Accepted Solution

by:
Ber earned 50 total points
ID: 7125520
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7125820
FSyncShell!, every day i learn something new (to me)
:)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7971234
Hi lirong,
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 Ber's comment(s) as an answer.

lirong, 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
0
 

Expert Comment

by:SpideyMod
ID: 8018775
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

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!

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

685 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