CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Shell command

  1. #1
    Join Date
    Oct 1999
    Location
    England
    Posts
    1

    Shell command

    I have a requirement to run a windows Prog from a vb5 App and depending on certain criteria close or keep the windows Prog running. I do not wish to resort to sendKeys.
    Does anyone have any ideas.
    Thanx in adv.


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Shell command

    to start a program you can use:
    - the VB shell command
    - the CreateProcess API
    - the ShellExecute(Ex) API

    to wait for the end of the program use the CreateProcess/WaitForSingleObject API combination.
    To terminate a process use the TerminateProcess API (carefully).


  3. #3
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Shell command

    Hi,

    use the following; change according to your requirment...

    X = Shell("C:\Windows\Calc.exe", vbMaximizedFocus)




    :-)

    Santulan

  4. #4
    Guest

    Re: Shell command

    HI

    thanx for the reply. More specifically, I require to be able to shut down the windows prog.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured