System() command opens a dos-box

This is a discussion on System() command opens a dos-box within the Windows Programming forums, part of the Platform Specific Boards category; Hi there - I think this is probably a simple problem to fix, but I can't find the solution anywhere. ...

  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,649
    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, 04:08 AM
  2. Replies: 9
    Last Post: 02-13-2008, 01: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, 05:11 PM
  5. eliminating dos box
    By happy dude 82 in forum Windows Programming
    Replies: 1
    Last Post: 04-16-2003, 04:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21