Thema: Delphi Problem with TEmbeddedWB

Einzelnen Beitrag anzeigen

alpha1

Registriert seit: 19. Nov 2005
40 Beiträge
 
#1

Problem with TEmbeddedWB

  Alt 22. Mai 2006, 17:17
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!
  Mit Zitat antworten Zitat