AttachToHWND - web automation method

Creates a web automation library Browser object from a 'Internet Explorer_Server', 'IEFrame' or 'TabWindowClass' window handle.

Applies to:
Core
  var b = coreObj.AttachToHWND(hWnd);
Arguments:
Remarks:
Returns a Browser web automation library object. The hWnd parameter is the handle of a Internet Explorer_Server, IEFrame or TabWindowClass window of Internet Explorer browser. It could be obtained using other ways than Twebst web automation library features. It could be also obtained by using ieWindow, tabWindow or topWindow properties. This method is useful when you need to automate an existing IE browser instance for which you have a Win32 API window handle.
Example:
// hwnd is a valid handle of a 'Internet Explorer_Server', 'IEFrame' or 'TabWindowClass' window inside IE.
var hwnd    = 0x1C05B8;
var core    = new ActiveXObject("Twebst.Core");
var browser = core.AttachToHWND(hwnd);

browser.Navigate("http://www.codecentrix.com/");
    
See also:
Core | Browser | AttachToNativeBrowser | AttachToNativeElement | AttachToNativeFrame

© 2017 CodeCentrix Software. All rights reserved.