Thread: Simulate Start->Run->OK

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    204

    Simulate Start->Run->OK

    If I click on Start->Run type in something like www.google.com and hit OK, google will open on the default browser. I was wondering how to simulate that programatically. Does anyone know? Thank you.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Possibly something like this?
    Code:
    #include <stdlib.h>
    
    int main(void)
    {
       system("start www.google.com");
       return 0;
    }
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    or
    Code:
    ShellExecute(NULL, TEXT("open") , TEXT("www.google.com"), NULL, NULL, SW_SHOWNORMAL);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Adventures in labyrinth generation.
    By guesst in forum Game Programming
    Replies: 8
    Last Post: 10-12-2008, 01:30 PM
  3. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 11:48 PM
  4. GNOME Desktop won't start (Mandriva)
    By psychopath in forum Tech Board
    Replies: 10
    Last Post: 07-19-2006, 01:21 PM
  5. Where is a good place to start?!
    By bobthefish3 in forum Game Programming
    Replies: 1
    Last Post: 10-09-2001, 11:28 AM