Loading... <table cellspacing="0" cellpadding="0" width="590" align="center"> <tbody> <tr> <td style="background-color: rgb(200,224,238)" valign="middle" width="590" height="20"> </td> </tr> <tr> <td style="background-color: rgb(204,204,204)" valign="middle" width="590" height="465"> <p class="MsoNormal"><font size="2">This page is still Under Construction</font></p> <p><strong><font size="2">AddHtmlToAboutBlank: </font></strong><font size="2">This function allow you to add a string to the blank pages (Like "About : Blank") to create your own personal blank page.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AddHtmlToAboutBlank('Enhanced Browser 2006'); </font></p> <p><strong><font size="2">AutoFillIEFormAndExcecute:</font></strong><font size="2"> A procedure that can help you analyze and auto fill common forms that contain field name like 'INPUT', 'Text', 'FindWindow', 'Submit' and 'Search'.<br /> You must remember that web sites programmers not always use the standard text and it will not function without the equal text fields.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AutoFillIEFormAndExcecute;</font></p> <p><strong><font size="2">AddToRestrictedSiteList(URL :String)</font></strong><font size="2">: A procedure that will add the URL string into the list of "Restricted Site List".<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AddToRestrictedSiteList('porn.com');</font></p> <p><strong><font size="2">AddToTreustedSiteList(URL :String)</font></strong><font size="2">: A procedure that will add the URL string into the list of "Trusted Site List".<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AddToTrustedSiteList('microsoft.com');</font></p> <p><strong><font size="2">AddToFavorites(URL: String, Title: String);</font></strong><font size="2"> A procedure that will add a site to your favorites sites. You can enter only URL but then you will loose the proper display.<br /> </font><font color="#0000cc" size="2"> </font><font color="#0000ff" size="2">EmbeddedWB1.AddToFavorites('bsalsa.com', 'Embedded Web Browser page'); </font></p> <p><strong><font size="2">AssignDocument:</font></strong><font size="2"> A procedure which will navigate to "About:Blank" page and wait until the page is fully loaded.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AssignDocument; </font></p> <p><strong><font size="2">Assign</font></strong><font size="2">(Source: TPersistent)<strong>:</strong> This procedure comes from Classes.pas.<br /> Call Assign to copy the properties or other attributes of one object from another. <br /> </font><font color="#0000ff" size="2">EmbeddedWB1.Assign(Source); </font></p> <p><strong><font size="2">AfterConstruction: </font></strong><font size="2">This procedure is called automatically after the object's last constructor has executed. Do not call it explicitly in your applications.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.AfterConstruction;</font></p> <p><strong><font size="2">BrowseProperties:</font></strong><font size="2"> The procedure comes from OleCtrls and <strong>NOT</strong> supported anymore.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.BrowseProperties; </font></p> <p><strong><font size="2">Broadcast(</font></strong><font size="2">var Message)<strong>:</strong> This procedure comes from TWinControl.<br /> Use Broadcast when you want to send the same message to each of the child controls contained within the windowed control. Specify the message to be passed as the value of the Message parameter<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.Broadcast(TheMessage); </font></p> <p><strong><font size="2">BeginDrag(Immediate: Boolean; Threshold: Integer):</font></strong><font size="2"><br /> <span class="para">Call BeginDrag to start a drag operation. BeginDrag is called in application code only when the value of the control's DragMode is dmManual. If DragMode is dmAutomatic, BeginDrag is called automatically.</span> <span class="para">If the Immediate parameter is true, the mouse pointer changes to the value of the DragCursor property and dragging begins immediately. If Immediate is false, the mouse pointer doesn't change to the value of the DragCursor property and dragging doesn't begin until the user moves the mouse pointer the number of pixels specified by the Threshold parameter. If the caller passes a Threshold value less than 0 (such as the default value for this parameter), BeginDrag uses the DragThreshold property of the global Mouse variable.</span> <span class="para">Setting Immediate to false allows the control to accept mouse clicks without beginning a drag-and-drop or drag-and-dock operation</span>.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.BeginDrag(true);</font></p> <p><strong><font size="2">BringToFront: </font></strong><font size="2">Comes from Controls. You should <span class="para">Call BringToFront to ensure that a form is visible or to reorder overlapping controls within a form.<br /> Without BringToFront, controls are stacked in their order they were placed on the form. <br /> </span></font><font color="#0000ff" size="2">EmbeddedWB1.BringToFront;</font></p> <p><strong><font size="2">BeforeDestruction:</font></strong><font size="2"> <span class="para">BeforeDestruction is called automatically immediately before the component's first destructor executes. Do not call it explicitly in your applications.<br /> </span></font><font color="#0000ff" size="2">EmbeddedWB1.BeforeDestruction;</font></p> <p><strong><font size="2">CheckOnlineStatus:</font></strong><font size="2"> Call CheckOnlineStatus function to check your online status. It will return true if you are online and false for offline.<br /> </font><strong><font color="#0000ff" size="2">If</font></strong><font color="#0000ff" size="2"> EmbeddedWB1.CheckOnlineStatus <strong>then</strong>...</font></p> <p><strong><font size="2">CheckIfInTrustedList(URL:String): </font></strong><font size="2">Call CheckIfInTrustedList function to check if a URL is in the Trusted List.<br /> Return true if the URL is in the Trusted List<br /> </font><strong><font size="2"> </font><font color="#0000ff" size="2">if</font></strong><font color="#0000ff" size="2"> EmbeddedWB1.CheckIfInTrustedList('borland.com') </font><strong><font color="#0000ff" size="2">then</font></strong><font color="#0000ff" size="2"> ...</font></p> <p><strong><font size="2">CheckIfInRestrictedList(URL:String): </font></strong><font size="2">Call CheckIfInRestrictedList function to check if a URL is in the Restricted List.<br /> Return true if the URL is in the Restricted List<br /> </font><strong><font size="2"> </font><font color="#0000cc" size="2">if</font></strong><font color="#0000cc" size="2"> EmbeddedWB1.CheckIfInRestrictedList('borland.com') </font><strong><font color="#0000cc" size="2">then</font></strong><font color="#0000cc" size="2"> ...</font></p> <p><strong><font size="2">ClearCache: </font></strong><font size="2">Call ClearCache procedure to clear all the pc cache.<br /> You should remember that this procedure is irreversable and will delete also entire IE cache also.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.ClearCache; </font></p> <p><strong><font size="2">ClearHistory: </font></strong><font size="2">Call ClearHistory procedure to clear all the internet History.<br /> You should remember that this procedure is irreversable and will delete also entire IE History also.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.ClearHistory;</font></p> <p><strong><font size="2">ClearTypedUrls:</font></strong><font size="2"> Call ClearTypedUrls procedure to clear all the Typed Urls as they appear in the address bar.<br /> You should remember that this procedure is irreversable and will delete also entire IE Typed Urls also.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.ClearTypedUrls; </font></p> <p><strong><font size="2">ClientToWindow</font></strong><code><strong><font size="2"><span style="line-height: 160%">(var pcx: SYSINT; var pcy: SYSINT):</span></font></strong><font size="2"><span style="line-height: 160%"> </span></font></code><font size="2">Do not use this method. It is included in the TEmbeddedWB interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer uses ClientToWindow to convert between client coordinates and window coordinates.</font></p> <p><strong><font size="2">Copy:</font></strong><font size="2"> Copy procedure will copy the selected text or image to the clipboard.<br /> Remember to select something before trying to copy.<br /> </font><font color="#0000cc" size="2">EmbeddedWB1.Copy;</font></p> <p><strong><font size="2">CreateDesktopShortcut:</font></strong><font size="2"> This procedure will create a shortcut to the current web site location on your desktop.<br /> The procedure supports the web site address, title and favicon. <br /> </font><font color="#0000ff" size="2">EmbeddedWB1.CreateDesktopShortcut; </font></p> <p><strong><font size="2">CreateNewMail:</font></strong><font size="2"> This procedure will lunch your default Email client by creating a new mail without a context.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.CreateNewMail;</font></p> <p><strong><font size="2">Cut:</font></strong><font size="2"> Cut procedure will cut the selected text or image to the clipboard.<br /> Remember to select something before trying to cut, and that cut procedure is <span style="font-family: 'Times New Roman'">available </span>under its terms.<br /> </font><font color="#0000ff" size="2">EmbeddedWB1.Cut;</font></p> <p><strong><font size="2">Create(Owner: TComponent):</font></strong><font size="2"> The Create constructor allow you to create TEmbeddedWB </font><font face="Verdana" size="2">dynamically.</font><font size="2"><br /> </font><strong><font face="Verdana" color="#0000ff" size="2">procedure</font></strong><font face="Verdana" color="#0000ff" size="2"> TForm1.Button1Click(Sender: TObject);<br /> <strong>var</strong><br /> WB: TEmbeddedWB;<br /> <strong>begin<br /> </strong>WB := TEmbeddedWB.Create(nil);<br /> TControl(WB).Parent := panel1; //or whatever... <br /> Wb.Align:=alClient;<br /> WB.Loaded;<br /> WB.Visible := True;<br /> </font><strong><font face="Verdana" color="#0000ff" size="2">end;</font></strong></p> <p><strong><font face="Verdana" color="#000000" size="2">or: </font></strong></p> <p><font face="Verdana" color="#0000ff" size="2"> WB</font><font color="#0000ff" size="2"> := </font><font face="Verdana" color="#0000ff" size="2">TEmbeddedWB.</font><font color="#0000ff" size="2">(self); <br /> <br /> <strong>with</strong> TControl(</font><font face="Verdana" color="#0000ff" size="2">WB</font><font color="#0000ff" size="2">) <strong>do</strong> <br /> <strong>Begin</strong> <br /> Parent := self; //or whatever... <br /> width:=800; <br /> height:=600; <br /> <strong>End</strong>; <br /> <strong>with</strong> </font><font face="Verdana" color="#0000ff" size="2">WB</font><font color="#0000ff" size="2"> <strong>do<br /> begin</strong> <br /> Loaded; <br /> Visible := True; <br /> DownloadOptions:=[ DLCTL_NO_SCRIPTS , DLCTL_NO_JAVA <br /> ,DLCTL_NO_RUNACTIVEXCTLS ,DLCTL_NO_DLACTIVEXCTLS ]; <br /> <strong>End; </strong> </font></p> <p><strong><font color="#000000" size="2">CanFocus:</font></strong><font color="#000000" size="2"> </font><font size="2"><span class="para">Call CanFocus to find out if the control can receive input from the user.</span> <span class="para">CanFocus returns true if both the control and its parent(s) have their Visible and Enabled properties set to true. If any of the Visible and Enabled properties of the control or the controls in which it is contained are not true, then CanFocus returns false. <br /> </span></font><span class="para"><strong><font color="#0000cc" size="2">If</font></strong><font color="#0000cc" size="2"> EmbeddedWb1.CanFocus </font><strong><font color="#0000cc" size="2">then</font></strong></span><font color="#0000cc" size="2"><span class="para">...</span></font></p> <p><strong><font size="2"><span class="para">CleanupInstance:</span></font></strong><font size="2"><span class="para"> Do not call CleanupInstance directly. CleanupInstance is called automatically when the object instance is destroyed.</span> <span class="para">CleanupInstance releases all long strings and variants. It sets long strings to empty and variants to Unassigned.</span> </font></p> <p><strong><font size="2"><span class="para">DesignMode:</span></font></strong><font size="2"><span class="para"> Use this function to change to design mode on and off.<br /> </span>DesignMode <span class="para">w</span>ill return true for on state and false for off state.<br /> </font><strong><font color="#0000cc" size="2">if</font></strong><font color="#0000cc" size="2"> <span class="para">EmbeddedWb1.DesaignMode<strong> then.</strong>.</span></font></p> <p><strong><font size="2">Destroy:</font></strong><font size="2"> Destroy is the component destructor. You do not use it within your application.</font></p> <p><strong><font size="2">DocumentLoaded:</font></strong><font size="2"> Use this function to query the loaded document.<br /> It will return false if the document = nil and true if the document is assigned.<br /> </font><strong><font color="#0000cc" size="2">if</font></strong><font color="#0000cc" size="2"> <span class="para">EmbeddedWb1.</span>DocumentLoaded<span class="para"> <strong>then</strong>..</span></font></p> <p><strong><font size="2">ExploreFolder</font></strong><font size="2">(Path: String): This procedure will lunch Windows Explorer by the given path using ShellAPI.<br /> </font><font color="#0000cc" size="2">EmbeddedWB1.ExploreFolder('C:\Windows');</font></p> <p><strong><font size="2">ExecWB: </font></strong><font size="2"><span class="para">ExecWB lets you use the IOleCommandTarget interface to pass a command to the Web browser control. For more information, see the Microsoft documentation of IOleCommandTarget.</span> <span class="para">cmdID specifies the command to execute. The Web Browser does not support all of the commands for which Microsoft providesconstants. Use the QueryStatusWB method to determine what commands can be used.</span> <span class="para">cmdexecopt modifies how the command is executed.</span> <span class="para">pvaIn specifies a Variant array that contains any input arguments. This value can be omitted if there are not input arguments.</span> <span class="para">pvaOutspecifies a Variant that receives the results of the command, if any. This value can be omitted if there are no results</span></font><font color="#0000cc" size="2"><br /> if ( ActiveControl is TWebBrowser ) then begin WebBrowser1.ExecWB( OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT ); </font></p> <p><strong><font size="2">FillForm</font></strong><font size="2">(FieldName: string; Value: string):This function allow you to auto insert details into a web page<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.FillFormWithPersonalDetails1Click(Sender: TObject);<br /> <strong>begin</strong><br /> EmbeddedWB1.Navigate('http://edit.yahoo.com/config/eval_register?.<br /> done=http://groups.yahoo.com%2fgroup%2fdelphi-webbrowser%2f&.src=ygrp&.intl=us');<br /> <strong>while</strong> EmbeddedWB1.ReadyState <> READYSTATE_COMPLETE <strong>do</strong><br /> <strong>begin</strong><br /> Forms.Application.ProcessMessages;<br /> <strong>end;</strong><br /> <strong>with </strong>EmbeddedWB1<strong> do</strong><br /> <strong>begin</strong><br /> FillForm('login', 'Mozart');<br /> FillForm('passwd', 'Bethoven');<br /> FillForm('.fn', 'lol1');<br /> FillForm('.ln', 'lol2');<br /> FillForm('.ln', 'lol2');<br /> FillForm('.pw', 'lol3333');<br /> FillForm('.pw2', 'lol444');<br /> FillForm('.pw_a', 'lolypop');<br /> FillForm('.pwqa_a', 'lolypop');<br /> FillForm('.em', 'loly@pop.com');<br /> FillForm('.pc', '123456');<br /> FillForm('.secword', ':)');<br /> </font><strong><font color="#0000cc" size="2"> end;<br /> end;</font></strong></p> <p><strong><font size="2">FrameCount: </font></strong><font size="2">This function will return a LongInt that contain the document frames number.<br /> </font><font color="#0000cc" size="2">i:= EmbeddedWB1.FramesCount;</font></p> <p><strong><font size="2">FrameCountFromDocument</font></strong><font size="2">(SourceDocIHtmlDocument2)):This function is an enhanced FrameCount and will return a integer that contain the document frames number.<br /> </font><font color="#0000cc" size="2">i:= EmbeddedWB1.FramesCountFromDocument('bla.html');</font></p> <p><strong><font color="#000000" size="2">GetCachedFileFromURL</font></strong><font color="#000000" size="2">(</font><font size="2">strUL: string; var strLocalFile: string</font><font color="#000000" size="2">): This function will return the path to a specific file in the cache<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetCachedPathClick(Sender: TObject);<br /> <strong>var</strong><br /> str : string;<br /> <strong>begin</strong><br /> EmbeddedWB1.GetCachedFileFromURL(IEAddress1.Text, str);<br /> ShowMessage(str);<br /> <strong>end;</strong> </font></p> <p><strong><font size="2">GetCookie:</font></strong><font size="2"> This function will return the Cookie name as a string, if the page contains a cookie. If the page does not contain a cookie, it will return an empty string.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.CookiesCheck1Click(Sender: TObject);<br /> <strong>var</strong><br /> st : string;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetCookie;<br /> SetLength(st, 180);<br /> <strong>if</strong> st <> ''<strong> then</strong> ShowMessage('The web site has just added a cookie:<br /> +#10+#13+ st) else ShowMessage('No cookies were found.');<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong></p> <p><strong><font size="2">GetCookiesPath:</font></strong><font size="2"> If you Call this function the result will be the IE Cookies path.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetCookiesClick(Sender: TObject);<br /> <strong>var</strong><br /> st : string;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetCookiesPath;<br /> ShowMessage('Cookies Path: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong><font size="2"> </font></p> <p><strong><font size="2">GetHistoryPath</font></strong><font size="2">:If you Call this function the result will be the IE History path.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetHistoryClick(Sender: TObject);<br /> <strong>var</strong><br /> st : string;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetHistoryPath;<br /> ShowMessage('History Path: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong><font size="2"> </font></p> <p><strong><font size="2">GetFavoritesPath:</font></strong><font size="2"> If you Call this function the result will be the IE Favorites path.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetFavoritesClick(Sender: TObject);<br /> <strong>var</strong><br /> st : string;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetFavoritesPath;<br /> ShowMessage('Favorites Path: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong><font size="2"> <br /> <br /> </font><strong><font size="2">GetFrame(FrameNo : Integer) : IWebbrowser2;</font></strong><font size="2">:Returns Iwebbrowser2-interface to the specified frame. You can use it to print a particular frame, view frame-source etc</font></p> <p><strong><font size="2">GetDefaultBrowserFromRegistry: </font></strong><font size="2">This function will return the Default Browser name as a string (if there is a Default Browser). If no Default Browser is set, then it will return 'No default browser was found' string.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetBrowserClick(Sender: TObject);<br /> <strong>var</strong><br /> st : string;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetDefaultBrowserFromRegistry;<br /> ShowMessage('Default Browser: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong><font size="2"> </font></p> <p><strong><font size="2">GetIEHomePage:</font></strong><font size="2"> This function will return the IE Home Page as a string. <br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetIEHomePageClick(Sender: TObject);<br /> <strong>var</strong><br /> st : <strong>string;</strong><br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetIEHomePage;<br /> ShowMessage('Default Browser: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong></p> <p><strong><font size="2">GetIEHandle</font></strong><font size="2">(WebBrowser: TEmbeddedWB; ClassName: string): HWND: This function returns the handle of the Internet Explorer window (HWND) to assist the programer Invoke Hidden Commands in the EmbeddedWB.<br /> </font><em><font face="Courier New" color="#000080" size="2"><span class="sourcecode">The following codes demonstrates an innovative way to invoke hidden commands to show modal dialogs such as "Add To Favorite" dialog, "Import/Export Wizard" dialog in your WebBrowser-based application Command IDs Handled by 'Shell DocObject View'<br /> </span></font></em><u><font size="2">Const Uses:<br /> </font></u><strong><font face="Courier New" size="2"><span class="sourcecode">const </span></font></strong><font face="Courier New" size="2"><span class="sourcecode">ID_IE_FILE_PAGESETUP = 259;<br /> <strong>const </strong>ID_IE_FILE_PRINT = 260;<br /> <strong>const </strong>ID_IE_FILE_NEWWINDOW = 275;<br /> <strong>const </strong>ID_IE_FILE_PRINTPREVIEW = 277;<br /> <strong>const </strong>ID_IE_FILE_NEWMAIL = 279;<br /> <strong>const </strong>ID_IE_FILE_SENDPAGE = 282;<br /> <strong>const </strong>ID_IE_FILE_SENDLINK = 283;<br /> <strong>const </strong>ID_IE_FILE_SENDDESKTOPSHORTCUT = 284;<br /> <strong>const </strong>ID_IE_HELP_VERSIONINFO = 336;<br /> <strong>const </strong>ID_IE_HELP_HELPINDEX = 337;<br /> <strong>const </strong>ID_IE_HELP_WEBTUTORIAL = 338;<br /> <strong>const </strong>ID_IE_HELP_FREESTUFF = 341;<br /> <strong>const </strong>ID_IE_HELP_PRODUCTUPDATE = 342;<br /> <strong>const </strong>ID_IE_HELP_FAQ = 343;<br /> <strong>const </strong>ID_IE_HELP_ONLINESUPPORT = 344;<br /> <strong>const </strong>ID_IE_HELP_FEEDBACK = 345;<br /> <strong>const </strong>ID_IE_HELP_BESTPAGE = 346;<br /> <strong>const </strong>ID_IE_HELP_SEARCHWEB = 347;<br /> <strong>const </strong>ID_IE_HELP_MSHOME = 348;<br /> <strong>const </strong>ID_IE_HELP_VISITINTERNET = 349;<br /> <strong>const </strong>ID_IE_HELP_STARTPAGE = 350;<br /> <strong>const </strong>ID_IE_HELP_NETSCAPEUSER = 351;<br /> <strong>const </strong>ID_IE_FILE_IMPORTEXPORT = 374;<br /> <strong>const </strong>ID_IE_HELP_ENHANCEDSECURITY = 375;<br /> <strong>const </strong>ID_IE_FILE_ADDTRUST = 376;<br /> <strong>const </strong>ID_IE_FILE_ADDLOCAL = 377;<br /> <strong>const </strong>ID_IE_FILE_NEWPUBLISHINFO = 387;<br /> <strong>const </strong>ID_IE_FILE_NEWPEOPLE = 390;<br /> <strong>const </strong>ID_IE_FILE_NEWCALL =395;<br /> </span></font><span class="sourcecode"><em><font face="Courier New" color="#000080" size="2">Command IDs Handled by 'Internet Explorer_Server'<br /> </font></em><strong><font face="Courier New" size="2">const </font></strong></span><font face="Courier New" size="2"><span class="sourcecode">ID_IE_CONTEXTMENU_NEWWINDOW = 2137;<br /> <strong>const </strong>ID_IE_CONTEXTMENU_ADDFAV = 2261;<br /> <strong>const </strong>ID_IE_CONTEXTMENU_REFRESH = 6042;</span></font><font size="2"><br /> </font><strong><font color="#0000cc" size="2"><span class="sourcecode">procedure </span></font></strong><font color="#0000cc" size="2"><span class="sourcecode">TForm1.ToolButton2Click(Sender: TObject);<br /> <strong>begin<br /> </strong><em>//Invoke "Add To Favorite" Dialog<br /> </em>SendMessage(</span>GetIEHandle<span class="sourcecode">(web, 'Internet Explorer_Server'), WM_COMMAND,<br /> ID_IE_CONTEXTMENU_ADDFAV, 0);<br /> <strong>end</strong>;<br /> <br /> <strong>procedure </strong>TForm1.ToolButton3Click(Sender: TObject);<br /> <strong>begin<br /> </strong><em>//Invoke "Import/Export Wizard" Dialog<br /> </em>SendMessage(</span>GetIEHandle<span class="sourcecode">(web, 'Shell DocObject View'), WM_COMMAND,<br /> ID_IE_FILE_IMPORTEXPORT, 0);<br /> <strong>end</strong>;<br /> <br /> </span></font><strong><font face="Verdana" color="#3a546c" size="2">Function GetIEVersion : String; </font></strong><font face="Verdana" color="#3a546c" size="2">Use this function to determine which version of Internet Explorer is installed on the computer.<br /> The function returns the fileversion of shdocvw.dll. <br /> The following chart lists the different versions of the Shdocvw.dll file and the corresponding versions of Internet Explorer:<br /> </font></p> <p class="FIXEDTEXT"><font size="2">Version P</font><font color="#3a546c" size="2">ro</font><font size="2">duct<br /> --------------------------------------------------------------<br /> 4.70.1155 Internet Explorer 3.0<br /> 4.70.1158 Internet Explorer 3.0 (OSR2)<br /> 4.70.1215 Internet Explorer 3.01<br /> 4.70.1300 Internet Explorer 3.02<br /> 4.71.1008.3 Internet Explorer 4.0 PP2<br /> 4.71.1712.5 Internet Explorer 4.0<br /> 4.72.2106.7 Internet Explorer 4.01<br /> 4.72.3110.3 Internet Explorer 4.01 Service Pack 1<br /> 4.72.3612.1707 Internet Explorer 4.01 SP2<br /> 5.00.0518.5 Internet Explorer 5 Developer Preview (Beta 1)<br /> 5.00.0910.1308 Internet Explorer 5 Beta (Beta 2)<br /> 5.00.2014.213 Internet Explorer 5<br /> 5.0.2717.2000 Internet Explorer 5 with Update for "Malformed<br /> Favorites Icon" Security Issue installed <br /> 5.00.2721.1400 Internet Explorer 5 with Update for "ImportExport <br /> Favorites()" Security Issue installed <br /> 5.00.2919.800 Internet Explorer 5 (Windows 2000 RC1, build 5.00.2072) <br /> 5.00.2919.3800 Internet Explorer 5 (Windows 2000 RC2, build 5.00.2128) <br /> 5.00.2919.6307 Internet Explorer 5.01 <br /> 5.50.3825.1300 Internet Explorer 5.5 Developer Preview (Beta)</font><font face="Verdana" size="2"><br /> <br /> Link: </font><a href="https://www.samool.com/go/aHR0cDovL3N1cHBvcnQubWljcm9zb2Z0LmNvbS9zdXBwb3J0L2tiL2FydGljbGVzL3ExNjQvNS8zOS5hc3A=" target="_blank" ><font face="Verdana" color="#1a74d0" size="2">Determing Which Version of Internet Explorer you are using</font></a><font face="Verdana" size="2"><br /> <br /> </font></p> <p><strong><font size="2">GetLastVisitedPage</font></strong><font size="2">(var LastVisitedPage: string): Call this function to get the last visited page (before your browser was closed).<br /> You must use SaveLastVisitedPage function on you form close event to enable this feature.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetLastVisitedPageClick(Sender: TObject);<br /> <strong>var</strong><br /> st : <strong>string</strong>;<br /> <strong>begin</strong><br /> st:= EmbeddedWB1.GetLastVisitedPage;<br /> ShowMessage('Default Browser: '+ st);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong></p> <p><strong><font size="2">GetIPAndHostName</font></strong><font size="2">(var HostName, IPaddr, WSAErr: string): Boolean: Call this function to get the pc Host name and IP address (True result).<br /> In case of an error, WSAErr will hold an error string and the result will be false. <br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetHostAndIP1Click(Sender: TObject);<br /> <strong>var</strong><br /> HostN,HostIP,Err : <strong>string;</strong><br /> <strong> begin</strong><br /> <strong>if</strong> EmbeddedWB1.GetIPAndHostName(HostN, HostIP, Err)<strong> then</strong><br /> MessageDlg('PC Host Name: '+HostN + #10+#13+'Your Internal<br /> IP: ' + HostIP, mtInformation, [mbOk], 0)<br /> <strong>else</strong> MessageDlg(Err, mtError, [mbOk], 0);<br /> </font><strong><font color="#0000cc" size="2">end;</font></strong><font size="2"> </font></p> <p><strong><font size="2">GetSpecialFolderPath</font></strong><font size="2">(CallerHandle: THandle; CSIDL: Integer): PChar: Call the function to retrive the path to windows special folders path.</font></p> <p><u><font size="2">Const Uses:</font></u></p> <ul> <li> <p><font size="2">CSIDL_ALTSTARTUP</font></p> </li> <li> <p><font size="2">CSIDL_APPDATA </font></p> </li> <li> <p><font size="2">CSIDL_BITBUCKET</font></p> </li> <li> <p><font size="2">CSIDL_COMMON_ALTSTARTUP </font></p> </li> <li> <p><font size="2">CSIDL_COMMON_DESKTOPDIRECTORY </font></p> </li> <li> <p><font size="2">CSIDL_COMMON_FAVORITES </font></p> </li> <li> <p><font size="2">CSIDL_COMMON_PROGRAMS </font></p> </li> <li> <p><font size="2">CSIDL_COMMON_STARTMENU </font></p> </li> <li> <p><font size="2">CSIDL_COMMON_STARTUP</font></p> </li> <li> <p><font size="2">CSIDL_CONTROLS </font></p> </li> <li> <p><font size="2">CSIDL_COOKIES </font></p> </li> <li> <p><font size="2">CSIDL_DESKTOP</font></p> </li> <li> <p><font size="2">CSIDL_DESKTOPDIRECTORY </font></p> </li> <li> <p><font size="2">CSIDL_DRIVES</font></p> </li> <li> <p><font size="2">CSIDL_FAVORITES </font></p> </li> <li> <p><font size="2">CSIDL_FONTS </font></p> </li> <li> <p><font size="2">CSIDL_HISTORY </font></p> </li> <li> <p><font size="2">CSIDL_INTERNET </font></p> </li> <li> <p><font size="2">CSIDL_INTERNET_CACHE </font></p> </li> <li> <p><font size="2">CSIDL_NETHOOD </font></p> </li> <li> <p><font size="2">CSIDL_NETWORK</font></p> </li> <li> <p><font size="2">CSIDL_PERSONAL</font></p> </li> <li> <p><font size="2">CSIDL_PRINTERS</font></p> </li> <li> <p><font size="2">CSIDL_PRINTHOOD</font></p> </li> <li> <p><font size="2">CSIDL_PROGRAMS </font></p> </li> <li> <p><font size="2">CSIDL_RECENT</font></p> </li> <li> <p><font size="2">CSIDL_SENDTO</font></p> </li> <li> <p><font size="2">CSIDL_STARTMENU </font></p> </li> <li> <p><font size="2">CSIDL_STARTUP</font></p> </li> <li> <p><font size="2">CSIDL_TEMPLATES<br /> </font></p> </li> </ul> <p><strong><font face="Courier New" color="#0000cc" size="2"><span class="sourcecode">procedure </span></font></strong><font face="Courier New" color="#0000cc" size="2"><span class="sourcecode">TForm1.Button1Click(Sender: TObject);<br /> <strong>begin<br /> </strong>OrganizeFavorite(Handle, GetSpecialFolderPath(Handle,<br /> CSIDL_FAVORITES));<br /> <strong>end</strong>;<br /> </span></font></p> <p><strong><font color="#000000" size="2">GetBmpFromBrowser</font></strong><font color="#000000" size="2">(FileName : String): Boolean: Call GetBmpFromBrowser to create a screen capture of your page. Remember to enter a valid name or path with name for the file.<br /> Result will be true if the process will end succesfuly.<br /> </font><font color="#0000cc" size="2"> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.getAScreanCapture1Click(Sender: TObject);<br /> </font><strong><font color="#0000cc" size="2">begin<br /> if </font></strong><font color="#0000cc" size="2">EmbeddedWB1.GetBmpFromBrowser('site.bmp')then<br /> </font><strong><font color="#0000cc" size="2">begin</font></strong><font color="#0000cc" size="2"><br /> UpdateImage;<br /> Image1.Picture.LoadFromFile('.site.bmp');<br /> ShowMessage('The screen capture is in your application folder.');<br /> </font><strong><font color="#0000cc" size="2"> end;<br /> end</font></strong></p> <p><strong><font size="2">GetDocument:</font></strong><font size="2"> IHtmlDocument2 The result of this function will be the current loaded document as IHtmlDocument2.<br /> In case of an error, a proper message will be shown.<br /> </font><strong><font color="#0000cc" size="2">if</font></strong><font color="#0000cc" size="2"> EmbeddedWB1.GetDocument </font><strong><font color="#0000cc" size="2">then</font></strong><font color="#0000cc" size="2">.</font><strong><font color="#0000cc" size="2">.</font></strong></p> <p><strong><font size="2">GetJPEGfromBrowser</font></strong><font size="2">(FileName: string; SourceHeight, SourceWidth, TargetHeight, TargetWidth: integer): Boolean;<br /> This function is a different method to get a screen capture.<br /> This method is more flexible and you can set also the height and width.<br /> </font><strong><font color="#0000cc" size="2">procedure</font></strong><font color="#0000cc" size="2"> TfrmMain.GetJpegPageCapture1Click(Sender: TObject);<br /> </font><strong><font color="#0000cc" size="2">begin</font></strong><font color="#0000cc" size="2"><br /> </font><strong><font color="#0000cc" size="2">if</font></strong><font color="#0000cc" size="2"> EmbeddedWB1.GetJpegFromBrowser('.\Site.jpg', Height, Width, Height, Width) </font><strong><font color="#0000cc" size="2">then</font></strong><font color="#0000cc" size="2"><br /> begin<br /> Image1.Picture.LoadFromFile('.\Site.jpg');<br /> ShowMessage('The page screen capture is in your application folder.')<br /> </font><strong><font color="#0000cc" size="2"> end;<br /> end;<br /> <br /> </font><font size="2"><span class="para">GoBack: </span></font></strong><font size="2"> <span class="para">Navigates to the previous item in the history list.<br /> Call GoBack to return to the last document in the history list. GoBack has no effect unless the history list contains additional documents. </span></font></p> <table class="notes"> <tbody> <tr> <td class="notes"> <p class="note"><font size="2">Note: </font></p> </td> <td class="notes"> <p><font size="2">The <span class="link">Navigate</span> or <span class="link">Navigate2</span> command can change the history list, depending on the specified flags.</font></p> </td> </tr> </tbody> </table> <p><strong><font size="2">GoForward: </font></strong><font size="2">Navigates to the next item in the history list.</font><strong><font size="2"><br /> </font></strong><font size="2">Call GoForward to return to the next document in the history list. GoForward reverses the effect of the last <span class="link">GoBack</span> command.<br /> <br /> <strong>GoHome: </strong><span class="para">Navigates to the current start page.<br /> Call GoHome to navigate to the registered home or start page. The URL for this page is specified in the Registry at</span><br /> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main<span class="para"><br /> under the name Startpage. You can change this value using the TRegistry or TRegistryIniFile object, or using Navigation tab of the Internet Explorer's Options dialog.<br /> </span><br /> <strong>GoSearch: </strong>Navigates to the current search page.<br /> <span class="para">Call GoSearch to navigate to the registered search page. The URL for this page is specified in the Registry at</span><br /> HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main<span class="para"><br /> under the name SearchPage. You can change this value using the TRegistry or TRegistryIniFile object, or using Navigation tab of the Internet Explorer's Options dialog.</span></font></p> </td> </tr> </tbody></table> 相关文章 idhttp与Webbrowser共享Cookie Idhttp伪造来源地址、Cookie欺骗、通过代理访问 TEmbeddedWB Methods2 Last modification:August 16th, 2009 at 12:30 pm © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat