Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 15
  1. #1

    [VB6] aperture prog esterni .exe e .bat

    Ciao raga, mi serve 1 aiuto. Spero che possiate accontentarmi.

    Volevo sapere come si fa per fare eseguire a VB6 un programma .exe o .bat, semplicemente visualizzare 1 directory eccc...proprio quello che su fa con il comando .Esegui in Start. Esiste un componente .ocx in grado di farlo? O bisogna usare uno specifico codice in VB?


    [ sono alle prime armi ]


    Grazie in anticipo.
    Back €xTRaSEr NgENERATiON 2o0

  2. #2
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    156
    Consulta la guida sul comando shellexecute.

  3. #3
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Basta usare l'istruzione

    Shell

    Dai un'occhiata all'help.

  4. #4
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Originariamente inviato da multijet
    Consulta la guida sul comando shellexecute.
    ShellExecute e' una API.

  5. #5
    PORTESTA CONSIGLIarmi una guida per questo comando (shell)

    GRAZIE
    Back €xTRaSEr NgENERATiON 2o0

  6. #6
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Originariamente inviato da B€ NgENERATiONk
    PORTESTA CONSIGLIarmi una guida per questo comando (shell)

    GRAZIE
    PORTESTA? Non sei italiano ...?

    La guida del VB va benissimo ... anche in inglese se ti viene meglio ...

    Comunque c'e' su MSDN online ...

  7. #7
    SONO ITALIANO, HO SOLO SBAGLIATO A SCRIVERE

    GRAZIE, MA POTRESTI ESSERE + PRECISO...!


    [SONO ALLE PRIME ARMI]
    Back €xTRaSEr NgENERATiON 2o0

  8. #8
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,459
    Originariamente inviato da B€ NgENERATiONk
    [SONO ALLE PRIME ARMI]
    Ok, ma prima o poi le armi dovrai pure comprarle...

    Fai una ricerca, magari con Google, usa le parole chiave che ti hanno suggerito, insomma ingegnati un attimino, perché non saranno senz'altro questi gli scogli che dovrai affrontare nell'attività di programmazione...
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

  9. #9
    Utente di HTML.it L'avatar di oregon
    Registrato dal
    Jul 2005
    residenza
    Roma
    Messaggi
    36,480
    Originariamente inviato da B€ NgENERATiONk
    SONO ITALIANO, HO SOLO SBAGLIATO A SCRIVERE
    Scusa ... ma la parola PORTESTA mi sembrava troppo sbagliata per essere un errore di scrittura ... VVoVe:

    Comunque, dovresti evitare di scrivere in maiuscolo ...

    Originariamente inviato da B€ NgENERATiONk
    GRAZIE, MA POTRESTI ESSERE + PRECISO...!
    Piu' preciso? Ti ho detto qual e' l'istruzione e dove devi cercare ...

    Posso dirti che, per esempio, puoi scrivere

    Shell "Calc"

    per avviare la calcolatrice nel tuo programma ... ma come ti ha detto alka, mettici qualcosa di tuo ...

  10. #10
    Originariamente inviato da B€ NgENERATiONk
    SONO ITALIANO, HO SOLO SBAGLIATO A SCRIVERE

    GRAZIE, MA POTRESTI ESSERE + PRECISO...!


    [SONO ALLE PRIME ARMI]
    La documentazione di VB6 non è più presente sulla MSDN online (di simile c'è solo quella di VBA); riporto la voce inerente la funzione Shell della mia MSDN 6.0.
    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:

    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:

    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.
    In secondo luogo: non scrivere tutto in maiuscolo e studiati un po' di netiquette.
    Amaro C++, il gusto pieno dell'undefined behavior.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.