• 0

[VB] Command Lines / Popups


Question

I have 2 problems wondered if they could be fixed.

-----------

I want to load a program from a button so I have the command:

Shell "c:\program\program.exe"

This launches the program on clicking the button but I want to add a "-m" command line like you would have in a shortcut. Is there anyway to launch from button and use command lines plz?

-----------

Also when the program loads that im launching it has a popup window with YES/NO is there a way you can set VB to auto accept this popup so the user doesnt see it?

any help appreciated

thx

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

just add it after the line, it shud work ok.

this code from my hibernate program makes the computer hibernate fine; see it uses a command line:

Shell ("rundll32.exe powrprof.dll,SetSuspendState Hibernate")

your code would be:

Shell ("C:\Program\program.exe -m")

for the popup: add a variable so that it only comes up once. why does it come up anyway?

or you could put:

Private Sub Form_Load()
Unload Me
End Sub

That would be like auto accepting it. if you want it to do something on accepting just put that command before the unload me command

hope this helps,

Prism128

Link to comment
Share on other sites

  • 0

thx dude the command line worked, I thought of that but didnt think it would work :) but it does, cheers.

You misunderstood my popup question. I am loading a external exe from my vb program, the external exe has a box that pops up when you start it saying there is a new version do you want to update YES or No buttons. Is there a way to set my program to auto select the NO button on startup?

thx for help

Link to comment
Share on other sites

  • 0

as far as i know there is no way to do this, but you could try planet-source-code.com vb section. i think there are a few programs there (free of ourse) that can emulate buttons being pressed. just send the enter button to that window. i looked a minute ago but i got not found error...

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.