IEWebBrowser元件的execWB方法 (轉)

worldblog發表於2007-12-14
IEWebBrowser元件的execWB方法 (轉)[@more@] 

我對IEBrowser這個的execWB方法整理了一下﹐希望對大家有所幫助。
1. < id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
2. 方法。
WebBrowser.ExecWB nCmdID, nCmdExecOpt, [pvaIn], [pvaOut]
3. 引數說明。
(a).nCmdID
OLECMDID_OPEN = 1,
OLECMDID_NEW = 2,
OLECMDID_SAVE = 3,
OLECMDID_SAVEAS = 4,
OLECMDID_SAVECOPYAS = 5,
OLECMDID_PRINT = 6,
OLECMDID_PRINTPREVIEW = 7,
OLECMDID_PAGESETUP = 8,
OLECMDID_SPELL = 9,
OLECMDID_PROPERTIES = 10,
OLECMDID_CUT = 11,
OLECMDID_COPY = 12,
OLECMDID_PASTE = 13,
OLECMDID_PASTESPECIAL = 14,
OLECMDID_UNDO = 15,
OLECMDID_REDO = 16,
OLECMDID_ALL = 17,
OLECMDID_CLEARSELECTION = 18,
OLECMDID_ZOOM = 19,
OLECMDID_GETZOOMRANGE = 20
OLECMDID_UPDATECOMMANDS = 21
OLECMDID_REFRESH = 22
OLECMDID_STOP = 23
OLECMDID_HTOOLBARS = 24
OLECMDID_SETPROGRESSMAX = 25
OLECMDID_SETPROGRESSP= 26
OLECMDID_SETPROGRESSTEXT = 27
OLECMDID_SETTITLE = 28
OLECMDID_SETSTATE = 29
OLECMDID_STOPDOWNLOAD = 30
上面的關鍵詞都可以在的選單裡面找到對應的選項﹐大家一看就明白的﹗
(b).nCmdExecOpt
OLECMDEXECOPT_DODEFAULT = 0,
OLECMDEXECOPT_PROMPTUSER = 1,
LECMDEXECOPT_DONTPROMPTUSER = 2,
OLECMDEXECOPT_SHOWHELP = 3
對於這個引數﹐一般來說﹐選1就可以了。

這是呼叫IE的”另存為”功能的示例﹕:namespace prefix = o ns = "urn:schemas--com::office" />


Save-


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752043/viewspace-993091/,如需轉載,請註明出處,否則將追究法律責任。

相關文章