Shell ("z:\data\vb6\programma1\start.exe")
*wrong anwer* 
* stylee heeft al een lange tijd geen vb geprogrammeerd..
* stylee heeft al een lange tijd geen vb geprogrammeerd..
Bijna, alleen die haakjes weg, dusOp dinsdag 09 januari 2001 14:48 schreef Snake het volgende:
Shell ("z:\data\vb6\programma1\start.exe")
Shell "z:\data\vb6\programma1\start.exe"
Waar heb je het over?????Op dinsdag 09 januari 2001 14:55 schreef janst het volgende:
[..]
Bijna, alleen die haakjes weg, dus
Shell "z:\data\vb6\programma1\start.exe"
Graag meer uitleg:?}:0
Fresh> Wat snap je er verder niet aan? Het is toch zo duidelijk als wat?
Shell "<PATHNAME>\<PROGJE>"
Shell "<PATHNAME>\<PROGJE>"
Verwijderd
Het moet dus zijn shell "command.exe" of var = shell("command.exe").
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 thesenamed arguments:
Part Description
pathname Required; Variant (String). Name of the program to execute and any requiredarguments orcommand-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.
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 thesenamed arguments:
Part Description
pathname Required; Variant (String). Name of the program to execute and any requiredarguments orcommand-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.
Dit zocht ik het werkt!, ik maak namelijk een kleine proggie voor mijn zelfgemaakte utilities cd, dan kan ik via dat proggie al mijn programma's installeren.
Iemand nog tips verder??
Iemand nog tips verder??
Normale titles geven aan je topic.Op dinsdag 09 januari 2001 15:06 schreef Fresh het volgende:
Iemand nog tips verder??
Verwijderd
Uhm, als die ander geen VB runtime gezeik heeft, zal je programma voor je aps-cd dus niet werken ei, vergeet dat niet.
oudere windows-versies (95) hebben vaak ook nog oude runtime-gezeik> Ik weet niet welke versie je van vb gebruikt, maar je moet maar ff kijken.
En een setup maken voor zo'n programma vinden de meeste mensen waarschijnlijk ook niet erg fijn
oudere windows-versies (95) hebben vaak ook nog oude runtime-gezeik> Ik weet niet welke versie je van vb gebruikt, maar je moet maar ff kijken.
En een setup maken voor zo'n programma vinden de meeste mensen waarschijnlijk ook niet erg fijn
Verwijderd
okee, ik wil dus ook een proggie laten runnen, maar dat moet dan full screen, en op de voorgrond (als active window dus) maar dat wil niet lukken. ik heb al geprobeerd:
maar dat doet hij niet en zo nog wat variaties...
maar het wil echt niet
wie weet hoe het wel moet
(en of je me dan ook kan vertellen hoe en niet alleen dat je het weet
)
THNX
code:
1
| Shell("a:\exes\output.exe", vbNormalFocus) As Double |
maar dat doet hij niet en zo nog wat variaties...
maar het wil echt niet
wie weet hoe het wel moet
(en of je me dan ook kan vertellen hoe en niet alleen dat je het weet
THNX
Sweet Jebus, dat As Double zou ik weg halen, het is geen declaratie.
Maar euuh, beginnersboekje zou niet gek zijn.
Maar euuh, beginnersboekje zou niet gek zijn.
oogjes open, snaveltjes dicht
Verwijderd
thnx, maar dat had ik al geprobeerd....
helaas krijg ik dan ook een error:
dus dat deed het ook niet
helaas krijg ik dan ook een error:
code:
1
| COMPILE ERROR: expected = |
dus dat deed het ook niet
Verwijderd
Zorgen dat je de runtimes meeleverd als je t met een CD verspreid.Op dinsdag 09 januari 2001 15:06 schreef Fresh het volgende:
Dit zocht ik het werkt!, ik maak namelijk een kleine proggie voor mijn zelfgemaakte utilities cd, dan kan ik via dat proggie al mijn programma's installeren.
Iemand nog tips verder??
Dat komt dus omdat je die haakjes hebt. Het is een VB-vaagheid dat als je de output van een functie te weten wilt komen haakjes moet neerzetten, en geen haakjes als je er geen variabele aan koppelt.
Wil je maximized draaien, dan zou vbMaximizeFocus ook geen overbodige luxe zijn
.
Wil je maximized draaien, dan zou vbMaximizeFocus ook geen overbodige luxe zijn
Ja half, maar als je jezelf aanleert door gewoonOp dinsdag 12 februari 2002 13:44 schreef Kjev het volgende:
Dat komt dus omdat je die haakjes hebt. Het is een VB-vaagheid dat als je de output van een functie te weten wilt komen haakjes moet neerzetten, en geen haakjes als je er geen variabele aan koppelt.
Call Functienaam(param1, param2)
te doen (behalve als je natuurlijk de return value wil opvangen in een var) heb je daar nooit gezeur mee...
[VB] vraag hier
had een betere topictitel geweest
Exact expert nodig?
Verwijderd
Volgens mij werkt Shell niet onder Win2000/XP/NT. Maar dat weet ik niet zeker...
Het is in ieder geval een ranzige methode, en je kan beter de ShellExecute API gebruiken. Zie m'n sig. voor voorbeelden.
Het is in ieder geval een ranzige methode, en je kan beter de ShellExecute API gebruiken. Zie m'n sig. voor voorbeelden.
code:
1
2
| 'Hiermee kan je Shell commandos geven, ook onder NT Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long |
Fresh:
1. Voortaan een betere topic-titel kiezen.
2. Voortaan even documentatie raadplegen
.
3. Voortaan iets meer inzet tonen in een topic.
sgt:
Je vraag in dit topic is een beetje verwarrend (het is niet duidelijk dat het een nieuwe en specifiekere vraag is). Misschien kan je beter even een nieuw topic openen over je probleem (fullscreen en op de voorgrond).
1. Voortaan een betere topic-titel kiezen.
2. Voortaan even documentatie raadplegen
3. Voortaan iets meer inzet tonen in een topic.
sgt:
Je vraag in dit topic is een beetje verwarrend (het is niet duidelijk dat het een nieuwe en specifiekere vraag is). Misschien kan je beter even een nieuw topic openen over je probleem (fullscreen en op de voorgrond).
Blog, Stratego/XT: Program Transformation, SDF: Syntax Definition, Nix: Software Deployment
Pagina: 1
Dit topic is gesloten.
![]()