Thread: [ HELP ] automaticly open an url

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    [ HELP ] automaticly open an url

    in writing a program for school atm , and need to open some site automaticly on run time , and close it again if need be ...

    i searched the board but couldnt find an answer, please help me


    ta in advande

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>i searched the board but couldnt find an answer
    Then you didn't search hard enough.... this question was asked just yesterday.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    lies , that didnt work

    and instead of flaming me u could help ...

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Are you working on a web browser? Otherwise, look up SheelExecute() at MSDN.

    Kuphryn

  5. #5
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    Under windows:

    char* urlStr = "http://www.addr.com";

    ShellExecute(Handle, "open", urlStr, NULL, NULL, SW_MAXIMIZE);

    Where:

    The ShellExecute function opens or prints a specified file. The file can be an executable file or a document file. See ShellExecuteEx also.

    HINSTANCE ShellExecute(

    HWND hwnd, // handle to parent window
    LPCTSTR lpOperation, // pointer to string that specifies operation to perform
    LPCTSTR lpFile, // pointer to filename or folder name string
    LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
    LPCTSTR lpDirectory, // pointer to string that specifies default directory
    INT nShowCmd // whether file is shown when opened
    );
    Last edited by Davros; 10-16-2002 at 12:38 PM.
    OS: Windows XP
    Compilers: MinGW (Code::Blocks), BCB 5

    BigAngryDog.com

  6. #6
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    Thumbs up

    tnx for ur help peeps , ill test it asap

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. open URL using C program
    By ashok449 in forum C Programming
    Replies: 3
    Last Post: 11-12-2007, 09:36 AM
  2. Open URL in new window
    By Magos in forum Windows Programming
    Replies: 1
    Last Post: 04-17-2006, 02:17 AM
  3. Open IE, go to URL, close
    By ober in forum C++ Programming
    Replies: 10
    Last Post: 04-07-2006, 02:21 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM