Foros del Web » Programación para mayores de 30 ;) » Programación General »

ayuda por favor

Estas en el tema de ayuda por favor en el foro de Programación General en Foros del Web. hola que tal como ya tiene un buen que no tocaba el visual se me estan olvidando cosas tan elementales como la siguiente perdon por ...
  #1 (permalink)  
Antiguo 09/06/2004, 09:24
Avatar de vampirito  
Fecha de Ingreso: enero-2004
Ubicación: h.frias 218-301
Mensajes: 121
Antigüedad: 20 años, 3 meses
Puntos: 0
ayuda por favor

hola que tal como ya tiene un buen que no tocaba el visual se me estan olvidando cosas tan elementales como la siguiente perdon por robarles de su presiado tiempo, pero alguien me podria recordar como es el codigo para ejecutar un programa externo, por eje: pongo un boton que al oprimirlo me ejecute la calculadora de windows
de antemano mil gracias por todo
  #2 (permalink)  
Antiguo 09/06/2004, 09:28
Avatar de Eternal Idol  
Fecha de Ingreso: mayo-2004
Ubicación: Lucentum
Mensajes: 6.192
Antigüedad: 20 años
Puntos: 74
Con la función Shell.

Aca va la ayuda de la MSDN:

Shell Function


Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero.

Syntax

Shell(pathname[,windowstyle])

The Shell function syntax has these named arguments:

Part Description
pathname Required; Variant (String). Name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive.
windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus.


The windowstyle named argument has these values:

Constant Value Description
vbHide 0 Window is hidden and focus is passed to the hidden window.
vbNormalFocus 1 Window has focus and is restored to its original size and position.
vbMinimizedFocus 2 Window is displayed as an icon with focus.
vbMaximizedFocus 3 Window is maximized with focus.
vbNormalNoFocus 4 Window is restored to its most recent size and position. The currently active window remains active.
vbMinimizedNoFocus 6 Window is displayed as an icon. The currently active window remains active.


Remarks

If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs.

Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.
__________________
¡Peron cumple, Evita dignifica! VIVA PERON CARAJO
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:09.