Download Options
NewsProductsDownloadsSupportForumCredits

TEmbeddedWB 
History 
HtmlEdit 
TIEAddress 
TIEDownload 
TIEDownloadManager 
IEGuid 
TIEParser 
Favorites 
TIESecurityManager 
IE5Tools 
TIETravelLog 
TLinksBar 
Protocols 
TRichEditWB 
TWebUpdater 
ResourceTool 
UI - lessParser 
Delphi Links 
[Home][Support][TEmbeddedWB][Download Options]


DialogsDownload OptionsEventsEvents OrderInterfaceMethods 1Methods 2Message HandlerMenus and shortcutsPrint OptionsPropertiesUpdatesZones & SecurityTWebBrowser Members A-LTWebBrowser Members M-ZTWebBrowser Methods

 

Download Options

 

DownloadOptions

 

DownloadOptions let you control what the webbrowser control can download and execute. The implementation of IDispatch makes it possible to take control when IDispatch.Invoke is called with dispid=DISPID_AMBIENT_DLCONTROL. VarResult parameter is set to a combination of flags that indicates what can be executed and downloaded.

 

DownloadBGSounds
(DLCTL_BGSOUNDS)
The browsing component will play background sounds associated with the document.
DownloadImages
(DLCTL_DLIMAGES)
The browsing component will download images from the server.
DLCTL_DOWNLOADONLY The browsing component will download the page but not display it.
DLCTL_FORCEOFFLINE The browsing component will always operate in offline mode. This causes the BINDF_OFFLINEOPERATION flag to be set even if the computer is connected to the Internet when making requests through URLMON.
DontDownloadBehaviours
(DLCTL_NO_BEHAVIORS)
The browsing component will not execute any behaviors.
DontPerformClientPull
(DLCTL_NO_CLIENTPULL)
The browsing component will not perform any client pull operations.
DLCTL_NO_DLACTIVEXCTLS The browsing component will not download any ActiveX Controls in the document.
DLCTL_NO_FRAMEDOWNLOAD The browsing component will not download frames but will download and parse the frameset page. The browsing component will also ignore the frameset and render no frame tags.
DLCTL_NO_JAVA The browsing component will not execute any Java applets.
DLCTL_NO_METACHARSET The browsing component will suppress HTML characters set reflected by META elements in the document.
DontExecuteActiveX
(DLCTL_NO_RUNACTIVEXCTLS)
The browsing component will not execute any ActiveX Controls in the document.
DontExecuteScripts
(DLCTL_NO_SCRIPTS)
The browsing component will not execute any scripts.
WorkOffline
(DLCTL_OFFLINE)
Same as DLCTL_OFFLINEIFNOTCONNECTED.
DLCTL_OFFLINEIFNOTCONNECTED The browsing component will operate in offline mode if not connected to the Internet. This causes the BINDF_GETFROMCACHE_IF_NET_FAIL flag to be set if the computer is connected to the Internet when making requests through URLMON.
DownloadAndIgnoreCache
(DLCTL_PRAGMA_NO_CACHE)
The browsing component will force the request through to the server and ignore the proxy, even if the proxy indicates that the data is up to date. This causes the BINDF_PRAGMA_NO_CACHE flag to be set when making requests through URLMON.
CheckPageREsynchronize
(DLCTL_RESYNCHRONIZE)
The browsing component will ignore what is in the cache and ask the server for updated information. The cached information will be used if the server indicates that the cached information is up to date. This causes the BINDF_RESYNCHRONIZE flag to be set when making requests through URLMON.
DownloadInSilentMode
(DLCTL_SILENT)
The browsing component will not display any user interface. This causes the BINDF_SILENTOPERATION flag to be set when making requests through URLMON.
DLCTL_URL_ENCODING_DISABLE_UTF8 The browsing component will disable UTF-8 encoding.
DLCTL_URL_ENCODING_ENABLE_UTF8 The browsing component will enable UTF-8 encoding.
DownloadVideos
(DLCTL_VIDEOS)
The browsing component will play any video clips that are contained in the document.

 

The following sample demonstrates the use of DownloadOptions.
Button1 starts a normal download of 'www.microsoft.com'. Button2 downloads the same page, but without images and scripts. Removing DLCTL_DLIMAGES does not tell the webbrowser not to display images, but not to download them. That's why we add DLCTL_PRAGMA_NO_CACHE, so also the cache is ignored.

 


procedure TForm1.Button1Click(Sender: TObject);
begin
   // Using default settings: DLCTL_DLIMAGES, DLCTL_BGSOUNDS,DLCTL_VIDEOS
  EmbeddedWB1.Go('http://www.microsoft.com');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  EmbeddedWB1.DownloadOptions:=EmbeddedWb1.DownloadOptions
  - [DLCTL_DLIMAGES]
  + [DLCTL_PRAGMA_NO_CACHE, DLCTL_NO_SCRIPTS];
  EmbeddedWB1.Go('http://www.microsoft.com');
end;

The following procedure shows a different way to change the DownloadOptions:

procedure TForm1.Button2Click(Sender: TObject);
var
  NewOptions: TDlOptions;
begin
  NewOptions := EmbeddedWB1.DownloadOptions;
  Exclude(NewOptions, DLCTL_DLIMAGES);
  Include(NewOptions, DLCTL_PRAGMA_NO_CACHE);
  Include(NewOptions, DLCTL_NO_SCRIPTS);
  EmbeddedWB1.DownloadOptions := NewOptions;
  EmbeddedWB1.Go('http://www.microsoft.com');
end;

 

 

[Home][News][Products][Downloads][Support][Forum][Credits]

Created   by
Per Lindsų Larsen

Copyright (c) 2005 bsalsa productions. All rights reserved.

bsalsa@bsalsa.no-ip.info