Thread: System() command opens a dos-box

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    15

    System() command opens a dos-box

    Hi there - I think this is probably a simple problem to fix, but I can't find the solution anywhere.

    When I use the system() command to open a file, eg...

    system(myfile.pdf);

    The document opens up fine in acrobat reader, and all works well. But at the same time, a dos box with the command showing opens up as well, clearly the spawner of the command.

    This dos box will stay on-screen (and on the task bar) until the external program is closed. I don't like that - it's messy. How do I stop it or hide it?

    Thanks

    Phil

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    Look into ShellExecute().

    gg

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    15
    Perfect - thank you!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Virtual Box
    By ssharish2005 in forum Tech Board
    Replies: 3
    Last Post: 02-12-2009, 05:08 AM
  2. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  3. fgets() to list box
    By tao in forum Windows Programming
    Replies: 4
    Last Post: 06-08-2006, 08:23 AM
  4. system() without a DOS box popping out
    By underthesun in forum Windows Programming
    Replies: 3
    Last Post: 02-25-2005, 06:11 PM
  5. eliminating dos box
    By happy dude 82 in forum Windows Programming
    Replies: 1
    Last Post: 04-16-2003, 04:15 AM