View Full Version : Automazione e Internet Explorer
Vedi questo link:
http://msdn.microsoft.com/library/d...netexplorer.asp
E' possibile ottenere il controllo di Internet Explorer con l'automazione?
Leggendo la documentazione del link riportato di sopra sembrerebbe di sì ma non ho capito come si fà ad ottenere l'handle dell'oggetto Internet Explorer.
Una volta ottenuto l'oggetto a me serve leggere la proprietà: 'LocationURL'
[ sURL = ] object.LocationURL
Possible Values
sURL String that receives the URL. The caller frees this buffer with the SysFreeString function.
The property is read-only. The property has no default value.
Ciao
Controlla il link, msdn dà 404
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
MSDN Home > MSDN Library > Web Development > Programming and Reusing the Browser > SDK Documentation > WebBrowser Control > Reference for Visual Basic Developers >
InternetExplorer Object Internet Development Index
--------------------------------------------------------------------------------
Controls a remote instance of Microsoft Internet Explorer through Automation.
Members Table
The following table lists the members exposed by the InternetExplorer object. Click a tab on the left to choose the type of member you want to view.
Properties
Show:
Events
Methods
Properties
Property Description
AddressBar Sets or retrieves whether the address bar of the object is visible or hidden.
Application Retrieves the automation object for an application that is hosting the WebBrowser Control.
Busy Retrieves a Boolean value indicating whether the object is engaged in a navigation or downloading operation.
Container Retrieves an object reference to a container.
Document Retrieves the automation object of the active document, if any.
FullName Retrieves the fully qualified path of the Internet Explorer executable file.
FullScreen Sets or retrieves a Boolean value that indicates whether Internet Explorer is in full-screen or normal window mode.
Height Sets or retrieves the height of the Internet Explorer main window.
HWND Retrieves the handle of the Internet Explorer main window.
Left Sets or retrieves the screen coordinate of the left edge of the main window of the object.
LocationName Retrieves the name of the resource that Internet Explorer is currently displaying.
LocationURL Retrieves the URL of the resource that Internet Explorer is currently displaying.
MenuBar Sets or retrieves a Boolean value that indicates whether the Internet Explorer menu bar is visible.
Name Retrieves the name of the object that contains the WebBrowser Control used by Internet Explorer.
Offline Sets or retrieves a Boolean value that indicates whether the object is currently operating in offline mode.
Parent Retrieves the parent of the object.
Path Retrieves the full path to the object.
ReadyState Retrieves the ready state of the object.
RegisterAsBrowser Sets or retrieves a value that indicates whether the object is registered as a top-level browser for target name resolution.
RegisterAsDropTarget Sets or retrieves a value that indicates whether the object is registered as a drop target for navigation.
Resizable Sets or retrieves a value that indicates whether the object can be resized.
Silent Sets or retrieves a value that indicates whether the object can show dialog boxes.
StatusBar Sets or retrieves a value that indicates whether the status bar for the object is visible.
StatusText Sets or retrieves the text in the status bar for the object.
TheaterMode Sets or retrieves a value that indicates whether the object is in theater mode.
ToolBar Sets or retrieves a value that indicates whether the toolbar for the object is visible.
Top Sets or retrieves the screen coordinate of the top edge of the main window of the object.
TopLevelContainer Retrieves a value that indicates whether the object is a top-level container.
Type Retrieves the type name of the contained document object—that is, Windows HTML Viewer.
Visible Sets or retrieves a value that indicates whether the object is visible or hidden.
Width Sets or retrieves the width of the main window for the object.
Events
Event Description
BeforeNavigate Fires before navigation occurs in the given object (on either a window or frameset element).
BeforeNavigate2 Fires before navigation occurs in the given object (on either a window or frameset element).
CommandStateChange Fires when the enabled state of a command changes.
DocumentComplete Fires when a document has been completely loaded and initialized.
DownloadBegin Fires when a navigation operation is beginning.
DownloadComplete Fires when a navigation operation finishes, is halted, or fails.
FileDownload Fires to indicate that a file download is about to occur. If a file download dialog is to be displayed, this event is fired prior to the display of the dialog.
NavigateComplete Fires after a navigation to a link is completed on either a window or frameSet element.
NavigateComplete2 Fires after a navigation to a link is completed on either a window or frameSet element.
NavigateError Fires when an error occurs during navigation.
NewWindow Fires when a new window is to be created.
NewWindow2 Fires when a new window is to be created.
NewWindow3 Raised when a new window is to be created. Extends NewWindow2 with additional information about the new window.
OnFullScreen Fires when the FullScreen property is changed.
OnMenuBar Fires when the MenuBar property is changed.
OnQuit Fires before the Internet Explorer application quits.
OnStatusBar Fires when the StatusBar property is changed.
OnTheaterMode Fires when the TheaterMode property is changed.
OnToolBar Fires when the ToolBar property is changed.
OnVisible Fires when the Visible property of the object is changed.
PrintTemplateInstantiation Fires when a print template has been instantiated.
PrintTemplateTeardown Fires when a print template has been destroyed.
PrivacyImpactedStateChange Fired when an event occurs that impacts privacy or when a user navigates away from a URL that has impacted privacy.
ProgressChange Fires when the progress of a download operation is updated on the object.
PropertyChange Fires when the PutProperty method of the object changes the value of a property.
SetSecureLockIcon Fires when there is a change in encryption level.
StatusTextChange Fires when the status bar text of the object has changed.
TitleChange Fires when the title of a document in the object becomes available or changes.
UpdatePageStatus Not currently implemented.
WindowActivate Not currently implemented.
WindowMove Not currently implemented.
WindowResize Not currently implemented.
Methods
Method Description
ClientToWindow Converts the client coordinates of a point to window coordinates.
ExecWB Executes a command on an OLE object and returns the status of the command execution using the IOleCommandTarget interface.
GetProperty Retrieves the value of a property associated with the given object.
GoBack Navigates backward one item in the history list.
GoForward Navigates forward one item in the history list.
GoHome Navigates to the current home or start page.
GoSearch Navigates to the current search page.
Navigate Navigates to a resource identified by a URL or to the file identified by a full path.
Navigate2 Navigates the browser to a location that might not be able to be expressed as a URL, such as a pointer to an item identifier list (PIDL) for an entity in the Microsoft Windows shell namespace.
PutProperty Sets the value of a property associated with the object.
QueryStatusWB Queries the OLE object for the status of commands using the IOleCommandTarget interface.
Quit Closes the object.
Refresh Reloads the file that is currently displayed in the object.
Refresh2 Reloads the file that is currently displayed in the object. Unlike Refresh, this method contains a parameter that specifies the refresh level.
ShowBrowserBar Shows or hides a specified browser bar.
Stop Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.
Properties
Object Information
CLSID Not available
Minimum operating systems Windows CE 4.0
Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
© 2005 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks |Privacy Statement
Vedi questo link:
http://msdn.microsoft.com/library/d...netexplorer.asp
E' possibile ottenere il controllo di Internet Explorer con l'automazione?
Leggendo la documentazione del link riportato di sopra sembrerebbe di sì ma non ho capito come si fà ad ottenere l'handle dell'oggetto Internet Explorer.
Una volta ottenuto l'oggetto a me serve leggere la proprietà: 'LocationURL'
[ sURL = ] object.LocationURL
Possible Values
sURL String that receives the URL. The caller frees this buffer with the SysFreeString function.
The property is read-only. The property has no default value.
Ciao
Nel doc postato fa sempre riferimento al controllo webbrowser per interfacciarti lo devi usare...
Io ho letto che l'oggetto può essere web Browser oppure Internet Exporer
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.