Hello!
I have webbrowser with TEmbeddedWB component and I have one problem:
I have written procedure, which must read options for webbrowser:
Delphi-Quellcode:
procedure TForm1.ReadWBOptions;
begin
Ini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + 'data.ini');
try
if Ini.ReadBool('Options', 'LoadPictures', True) = True
then CurrentWB.DownloadOptions := [DLCTL_DLIMAGES];
except
CurrentWB.DownloadOptions := [DLCTL_DLIMAGES];
end;
end;
But when I add this procedure somewhere, it doesnt work
(my webbrowser doesnt load pictures, when "LoadPictures' boolean is true).
When I add somewhere this code(not procedure):
Delphi-Quellcode:
Ini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + 'data.ini');
try
if Ini.ReadBool('Options', 'LoadPictures', True) = True
then CurrentWB.DownloadOptions := [DLCTL_DLIMAGES];
except
CurrentWB.DownloadOptions := [DLCTL_DLIMAGES];
end;
all works great...
Where is the trouble?
Thank`s!