//browser 内置浏览器
import web.form;
import win.ui.ctrl.static;
import winex;
namespace web; 
  
class browser{

	ctor(option){
		var snapshot = {}
	 	for hwnd,title,theadId,processId in ..winex.each( "IEFrame" ) { 
	 		snapshot[hwnd] = true;
	 	} 
	 	
		this._object =  ..com.CreateObject("InternetExplorer.Application")
	 	this._browser = this._object; 
	 	if(!this._browser){
			return null, err;
		} 
		..table.mixin( this._browser,option);
			
	 	var hwndBrowser;
	 	try{
	 		hwndBrowser = this._object.HWND
	 	}
	 	catch(e){
	 		for hwnd,title,theadId,processId in ..winex.each( "IEFrame" ) { 
	 			if( ! snapshot[hwnd] ){
	 				hwndBrowser = hwnd;
	 			}
	 		} 
	 	}
	 	
	 	this._form = ..table.mixin( ..win.ui.ctrl.static()
	 		,{hwnd = hwndBrowser ;web = this } );  
	}; 
	 
	@_metaProperty;
}
 
namespace browser {  
	_metaProperty =  ..web.form._metaProperty  
}
 
//自动提示
/******intellisense( ) 
web.browser = 内置浏览器  
web.browser(初始化参数) = @.browser(\n	Menubar = false; \n	AddressBar = true; \n	ToolBar = true; \n	Resizable = true; \n	Visible = true;\n)
?web.browser = !wb.
end intellisense******/


 

 