Results 1 to 4 of 4

Thread: Delphi, TWebBrowser, Auto-Refresh???

  1. #1
    Join Date
    Jul 2010
    Posts
    37

    Delphi, TWebBrowser, Auto-Refresh???

    Can I make that TWebBrowser refresh loaded URL every second or every minutes? Or specify the time when it has to refresh the URL?!

  2. #2
    Join Date
    Jun 2006
    Posts
    623

    Re: Delphi, TWebBrowser, Auto-Refresh???

    I use the below code for my Webbrowser to control it every 10 seconds, you can try to use something similar, but note that it consumes lot of resources:

    Code:
    mymethod() 
    { 
        WebBrowser wbmessages = new WebBrowser(); 
        Uri myuri = new Uri("http://mysite/message.aspx); 
        wbmessages.Url = myuri; 
        mypanel.Controls.Add(wbmessages); 
    }
    In my http://mysite/message.aspx page load event I've printed a unique value like this:

    Code:
    System.Guid gid = System.Guid.NewGuid(); 
    Response.Write(gid.ToString());

  3. #3
    Join Date
    Jul 2010
    Posts
    37

    Re: Delphi, TWebBrowser, Auto-Refresh???

    Can you provide me some tutorial to follow? Where, should I starts to write "mymethod"?

    Sorry, I am novice?

  4. #4
    Join Date
    Dec 2007
    Posts
    2,288

    Re: Delphi, TWebBrowser, Auto-Refresh???

    Reload the currently displayed item.

    Code:
    Reloads the currently displayed item.
    
    procedure Refresh2; overload;
    procedure Refresh2(var Level: OleVariant); overload;
    where:-

    Level is one of:

    Code:
    TRefreshConstants = ( 
    REFRESH_NORMAL = 0, 
    Default. 
    REFRESH_IFEXPIRED = 1, 
    Refresh only occurs if the page has expired. 
    REFRESH_CONTINUE = 2, 
    For WebBrowser internal use. Do not use. 
    REFRESH_COMPLETELY = 3 ); 
    Sends "pragma:nocache" to the server, requesting that the returned copy is refreshed and not a cached version.
    More information here.

Similar Threads

  1. TWebBrowser popup window Problem (Delphi)
    By lucky3664 in forum Software Development
    Replies: 2
    Last Post: 06-03-2012, 11:25 AM
  2. Delphi, TWebBrowser, Centralized Window?!
    By alex198555 in forum Software Development
    Replies: 3
    Last Post: 29-07-2010, 11:21 AM
  3. Delphi, TWebBrowser & Java Scripts.
    By alex198555 in forum Software Development
    Replies: 1
    Last Post: 28-07-2010, 11:23 AM
  4. Delphi, TWebBrowser, Web-Site Login?!
    By alex198555 in forum Software Development
    Replies: 1
    Last Post: 28-07-2010, 11:11 AM
  5. Delphi, TWebBrowser, Disable Scrollbars???
    By alex198555 in forum Software Development
    Replies: 4
    Last Post: 26-07-2010, 11:02 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,751,240,743.60337 seconds with 16 queries