Solved

system call in VB

Posted on 2002-07-02
7
628 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

746 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

11 Experts available now in Live!

Get 1:1 Help Now