Results 1 to 4 of 4

Thread: Delphi, How to load the web-site.

  1. #1
    Join Date
    Jul 2010
    Posts
    37

    Delphi, How to load the web-site.

    Hi, everyone! I am working on my University project. Trying to learn Delphi programming.

    Can anyone knows how can I load the web-site using Delphi and the login name and password will be typed automatically. I need to load the web-site which will require the login and the password.

    I tried to use TWebBrowser component and I didn't reach the solution. Please, help?!

  2. #2
    Join Date
    Nov 2008
    Posts
    1,022

    Re: Delphi, How to load the web-site.

    Here is a sample code to load the website in Delphi:

    Code:
    uses
       Registry, ShellAPI;
    
    function BrowseURL(const URL: string) : boolean;
    var
       Browser: string;
    begin
       Result := True;
       Browser := '';
       with TRegistry.Create do
       try
         RootKey := HKEY_CLASSES_ROOT;
    Access := KEY_QUERY_VALUE;
         if OpenKey('\htmlfile\shell\open\command', False) then
           Browser := ReadString('') ;
         CloseKey;
       finally
         Free;
       end;
       if Browser = '' then
       begin
         Result := False;
         Exit;
       end;
       Browser := Copy(Browser, Pos('"', Browser) + 1, Length(Browser)) ;
       Browser := Copy(Browser, 1, Pos('"', Browser) - 1) ;
       ShellExecute(0, 'open', PChar(Browser), PChar(URL), nil, SW_SHOW) ;
    end;

  3. #3
    Join Date
    Jul 2010
    Posts
    37

    Re: Delphi, How to load the web-site.

    Can you be more specific? I am getting several errors!!!

  4. #4
    Join Date
    Apr 2009
    Posts
    745

    Re: Delphi, How to load the web-site.

    It is possible to run a file from Delphi. For that it is better if you can go through some ready made codes. You can use the ShellExecute for that. I cannot provide you the code for the same. But there are ample of example online. You must first checkout the coding work as copying out any code will not give you much help. Try youtube for video tutorials.

Similar Threads

  1. Cannot load bookmarked site with Firefox 6
    By Memphis M in forum Technology & Internet
    Replies: 3
    Last Post: 20-08-2011, 11:19 PM
  2. Cannot load site from Mozilla website as well getting BSOD
    By Abélard in forum Technology & Internet
    Replies: 6
    Last Post: 19-06-2011, 09:50 PM
  3. Delphi, TWebBrowser, Web-Site Login?!
    By alex198555 in forum Software Development
    Replies: 1
    Last Post: 28-07-2010, 11:11 AM
  4. Could not load all ISAPI filters for site/service
    By Achraj in forum Small Business Server
    Replies: 1
    Last Post: 17-08-2009, 08:29 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,015,883.79515 seconds with 16 queries