Results 1 to 8 of 8

Thread: Open program....

  1. #1
    haravinth
    Guest

    Question Open program....

    How do i open another program when other program is opening.

    ie. when I double click on a program call "example.exe", "example2.exe" have to open automatically.

  2. #2
    Lively Member FireSlash518's Avatar
    Join Date
    Nov 2001
    Posts
    67
    Code:
    shell "programname.exe"
    should work.

    Leader of the Maxoverkill Mods
    -Fire§lash

  3. #3
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Thumbs up

    You can even add

    Code:
    myInt = Shell "c:\Program2.exe", vbNormalFocus
    
    'This will open the new program in front, not minimized or in any other state, and make myInt 1 if the program loads, and 0 if it fails.
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  4. #4
    haravinth
    Guest
    not that command.

    ie. i have a program that all ready compiled to example.exe and i want to make another new program, if I double click on the example.exe my new program have to open.

    how do i do it..

  5. #5
    haravinth
    Guest
    ie. I want to open a program call microsoft word. i want to make a new program if i double click on microsoft word.exe and then a message box have to appear from my new program and say "Welcome".
    How do i do it????

  6. #6
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    As everyone has said. You compile your EXE to be called whatever. Your code would read as follows.
    VB Code:
    1. msgbox "Hello and welcome to my program",vbokonly,"Hi"
    2. shell "c:\program files\microsoft office\winword.exe",vbnormal
    "If at first you don't succeed, then skydiving is not for you"

  7. #7
    haravinth
    Guest
    not like that. if microsoft word opens, my program have to open tooo.

  8. #8
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    ie. I want to open a program call microsoft word. i want to make a new program if i double click on microsoft word.exe and then a message box have to appear from my new program and say "Welcome".
    You are Canadian and yet.. U dont speak English ??
    What people have given you is what you asked for in your statement above.

    Anyway, never mind.
    What you have to do is run your program in the background with a timer set to monitor all open windows.
    When your program finds the handle of Micorosft Word, it can then intercept and do what you want it to do.
    Search for help on using the findWindow or look at my post to Zero_Flaw and use the code. All you have to do is find what handle MS word uses.

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

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