Results 1 to 16 of 16

Thread: [RESOLVED] Start Desktop Program (How is it done ?? Help pls )

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Resolved [RESOLVED] Start Desktop Program (How is it done ?? Help pls )

    Hi guys I have a question

    I'm making a like a remote control for my desktop now, I have a Program called My Radio.exe

    I would like to Know how I can asign My Radio.exe to my button

    Also if I comopile the program if other person downloads ( the path has to match to Program it self )

    So To make it more clear this is what I want

    I created a Folder on my desktop called ( My Remote )
    Inside that folder there are 2 .exe programs

    1 called MyRemote
    2 called MyRadio

    My question is how can I run MyRadio in my VB6 App by click of the button ( I know I have to put in path ) but will path match to other users pc ? how can I do it so my program is loaded from my ( Or OPersons folder reardless of the foldier location on PC )

    If you guys know what I mean

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Hi,

    You could use the shell command:

    Code:
    shell ("app.path &"/"& myradio.exe")
    Put that code inside the command button!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Nightwalker83
    Hi,

    You could use the shell command:

    Code:
    shell ("app.path &"/"& myradio.exe")
    Put that code inside the command button!

    I tried that and I got an error

    Runtime error 13 type mismatch ( and it crashed my project )

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Breez
    I tried that and I got an error

    Runtime error 13 type mismatch ( and it crashed my project )
    Try removing the end quotes!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    NBow it seas varebol not defined here is the code


    Code:
    Private Sub UserButtonz3_Click()
    Shell (App.Path & " / " & MyRadio.exe)
    End Sub

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Code:
    Private Sub UserButtonz3_Click()
    Shell (App.Path & " / " & "MyRadio.exe")
    End Sub
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Nightwalker83
    Code:
    Private Sub UserButtonz3_Click()
    Shell (App.Path & " / " & "MyRadio.exe")
    End Sub

    Runtime error '5'

    Invalid Procedure Call or argument

  8. #8
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Nightwalker83
    Code:
    Private Sub UserButtonz3_Click()
    Shell (App.Path & " / " & "MyRadio.exe")
    End Sub
    You shouldn't have spaces before and after the backslash.

    Code:
    Shell App.Path & "\MyRadio.exe", vbNormalFocus

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Edgemeal
    You shouldn't have spaces before and after the backslash.

    Code:
    Shell App.Path & "\MyRadio.exe", vbNormalFocus
    Runtime error 53

    File Not Found

    Can you please guys note that This Radio has to start regardless of its location on the computer

    So if its located on my desktop and lets say my girlfriend puts it in her documents when she doenloads ( it will not look for it in desktop but find it in any location of any ones pc who ever downloads my file ) not everyone will put the folder on desktop every one puts in in different location ( thats why I will incluide radio player in folder

    If you guys know what I mean ?

  10. #10
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Breez
    Runtime error 53

    File Not Found

    Can you please guys note that This Radio has to start regardless of its location on the computer
    If the remote and the radio are part of the same setup they shouldn't be in two separate locations.

    Try putting the radio.exe in the same folder as the remote.exe an see if the code works.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Nightwalker83
    If the remote and the radio are part of the same setup they shouldn't be in two separate locations.

    Try putting the radio.exe in the same folder as the remote.exe an see if the code works.

    Thanks that work so now when I zip up folder it will work regardless of the Folder location ?

    Thanks By the way

  12. #12
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Breez
    Thanks that work so now when I zip up folder it will work regardless of the Folder location ?
    Yes, it will work as long as the remote.exe and radio.exe are in the same folder.

    Edit:

    If you have resolved the problem please add "Resolved" to the thread title.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  13. #13

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Quote Originally Posted by Nightwalker83
    Yes, it will work as long as the remote.exe and radio.exe are in the same folder.

    ok another question now I have a program in my programs folder ( by Default everyone that installs this program goes to this path

    C:\Program Files\Teamspeak2_RC2\TeamSpeak.exe

    How can I run above App from it's location ( like I said any one that downloads this will have it in above location )

    So button will need to go to

    C:\Program Files\Teamspeak2_RC2\TeamSpeak.exe

    How can I achive that ? Thanks again propz add it


    I used this command

    Code:
    Private Sub UserButtonz2_Click()
    Shell App.Path & "C:\Program Files\Teamspeak2_RC2\TeamSpeak.exe"
    End Sub
    and that dident work
    Last edited by Breez; Feb 14th, 2009 at 12:09 AM.

  14. #14
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Start Desktop Program (How is it done ?? Help pls )

    Code:
    Shell App.Path & "/" & "TeamSpeak.exe"
    App.path = "C:\Program Files\Teamspeak2_RC2\" or wherever you install the program.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  15. #15
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Start Desktop Program (How is it done ?? Help pls )

    Code:
    Shell "C:\Program Files\Teamspeak2_RC2\TeamSpeak.exe"
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    314

    Re: Start Desktop Program (How is it done ?? Help pls )

    Thanks to both of you propz add it to both koolsid tip has worked thanks again for both of u

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