Hi, I'm trying to the WebBrowser to automatic refresh, but whit no luck. I made a function with the TObjFunction, if I use it with a button it works nice if I call it inside another function it does not refresh. Can someone explain me why?
Thank You
WebBrowser auto refresh
Re: WebBrowser auto refresh
Dear Sir,
the tObject functions must be called from functions launched in the template. For example onClick function on button or openFunction of template.
Best Regards
the tObject functions must be called from functions launched in the template. For example onClick function on button or openFunction of template.
Best Regards
Re: WebBrowser auto refresh
Hi,
I tryed to run the function from the template openFunction. The first time it refreshes but then it won't anymore.
The function is:
function void onOpen()
while(WindowIsOpen())
TObjFunction(1,1);
Sleep(300000);
end
end
I tryed to run the function from the template openFunction. The first time it refreshes but then it won't anymore.
The function is:
function void onOpen()
while(WindowIsOpen())
TObjFunction(1,1);
Sleep(300000);
end
end
Re: WebBrowser auto refresh
Dear Sir,
I tried your code. It work properly, the refresh is done every 5 minutes (Sleep(300000);)
I don't think that the error is in your code.
You can post a test application?
Regards
I tried your code. It work properly, the refresh is done every 5 minutes (Sleep(300000);)
I don't think that the error is in your code.
You can post a test application?
Regards
Re: WebBrowser auto refresh
Here is the application.
Best Regards
Best Regards
- Attachments
-
- test.zip
- (7.53 KiB) Downloaded 301 times
Re: WebBrowser auto refresh
Dear Sir,
your application works correctly. Every 5 minutes is done the refresch of web page.
To be sure that the function is properly be call I inserted a "MessageBox" that appears on the screen each time you run the refresch (only for test).
Best Regards
your application works correctly. Every 5 minutes is done the refresch of web page.
To be sure that the function is properly be call I inserted a "MessageBox" that appears on the screen each time you run the refresch (only for test).
Best Regards
- Attachments
-
- test.zip
- (9.72 KiB) Downloaded 306 times
Re: WebBrowser auto refresh
Hi,
yes the function works, the message box pops up, the problem is that the image is not updated. The image on the adress updates automaticaly every 10 minutes.
If I open the app now the iamge will be with the hour 13:00, even if I let the app open for 2 hours the image will still be from 13:00 instead of being updated.
yes the function works, the message box pops up, the problem is that the image is not updated. The image on the adress updates automaticaly every 10 minutes.
If I open the app now the iamge will be with the hour 13:00, even if I let the app open for 2 hours the image will still be from 13:00 instead of being updated.
Re: WebBrowser auto refresh
Dear Sir,
I did a test with sleep at 10 seconds and refresch is done properly.
Best Regards
I did a test with sleep at 10 seconds and refresch is done properly.
Best Regards
Re: WebBrowser auto refresh
Hi,
finally resolved the problem.
The problem was not in the code or anywhere in WinLog, but in the Internet Explorer settings.
For thous having the same problem, you have to set Internet Explorer Temporary Internet Files Settings to check everytime you visit the page.
finally resolved the problem.
The problem was not in the code or anywhere in WinLog, but in the Internet Explorer settings.
For thous having the same problem, you have to set Internet Explorer Temporary Internet Files Settings to check everytime you visit the page.
Re: WebBrowser auto refresh
Ok, I understand. I could not find the problem because I already have Internet Explorer set up this way.
Thanks and best regards.
Thanks and best regards.
Return to “Code - Code Builder”
Who is online
Users browsing this forum: No registered users and 1 guest