Maptitude GISDK Help

LaunchProgram()

Summary

Starts a Windows program.

 

Changes

In Version 2016 added the Display option.

In Version 2021 added Input and Output options.

 

Syntax

LaunchProgram(string command_line, opt array options)

 

Argument Contents
command_line The command line used to run the Windows program; the same string you would type into the Windows Program Manager File/Run dialog

 

Option Type Contents
Display String How to display the application window: "Hidden", "Normal", "Minimized", or "Maximized"
Input String Filename from which Standard Input is redirected
Output String Filename to which Standard Output is redirected
Error String Filename to which Standard Error is redirected

 

Notes

Example

command = "notepad myfile.txt "

opts = {{"Display", "Maximized"}}

on error do

     ResetCursor()

     ShowMessage(GetLastError())

     Return()

     end

 

SetCursor("HourGlass")

LaunchProgram (command, opts)

ResetCursor()

on error default

 

Error Codes

Error Type Meaning
Error LaunchProgram() could not locate the program, or otherwise failed to launch it

 

See Also

Function Summary
RunProgram() Runs a DOS executable program
LaunchDocument() Open a document, executable, or URL with the appropriate program
CallDllFunction() Calls a function in a Dynamic Link Library (DLL)

 

 

©2025 Caliper Corporation www.caliper.com