webbrowser.document.execcommand for .NET

以前的年代都用DHTML去執行ExecCommand
現在來到了.Net時代,我們換用WebBrowser
他也是有ExecCommand可以使用者
其中命令請看
http://msdn.microsoft.com/en-us/library/ms533049.aspx

並列在此處備忘

Command Identifiers

2D-PositionAllows absolutely positioned elements to be moved by dragging.
AbsolutePositionSets an element's position property to "absolute."
BackColorSets or retrieves the background color of the current selection.
BlockDirLTRNot supported.
BlockDirRTLNot supported.
BoldToggles the current selection between bold and nonbold.
BrowseModeNot supported.
ClearAuthenticationCacheClears all authentication credentials from the cache. Applies only to execCommand.
CopyCopies the current selection to the clipboard.
CreateBookmarkCreates a bookmark anchor or retrieves the name of a bookmark anchor for the current selection or insertion point.
CreateLinkInserts a hyperlink on the current selection, or displays a dialog box enabling the user to specify a URL to insert as a hyperlink on the current selection.
CutCopies the current selection to the clipboard and then deletes it.
DeleteDeletes the current selection.
DirLTRNot supported.
DirRTLNot supported.
EditModeNot supported.
FontNameSets or retrieves the font for the current selection.
FontSizeSets or retrieves the font size for the current selection.
ForeColorSets or retrieves the foreground (text) color of the current selection.
FormatBlockSets the current block format tag.
IndentIncreases the indent of the selected text by one indentation increment.
InlineDirLTRNot supported.
InlineDirRTLNot supported.
InsertButtonOverwrites a button control on the text selection.
InsertFieldsetOverwrites a box on the text selection.
InsertHorizontalRuleOverwrites a horizontal line on the text selection.
InsertIFrameOverwrites an inline frame on the text selection.
InsertImageOverwrites an image on the text selection.
InsertInputButtonOverwrites a button control on the text selection.
InsertInputCheckboxOverwrites a check box control on the text selection.
InsertInputFileUploadOverwrites a file upload control on the text selection.
InsertInputHiddenInserts a hidden control on the text selection.
InsertInputImageOverwrites an image control on the text selection.
InsertInputPasswordOverwrites a password control on the text selection.
InsertInputRadioOverwrites a radio control on the text selection.
InsertInputResetOverwrites a reset control on the text selection.
InsertInputSubmitOverwrites a submit control on the text selection.
InsertInputTextOverwrites a text control on the text selection.
InsertMarqueeOverwrites an empty marquee on the text selection.
InsertOrderedListToggles the text selection between an ordered list and a normal format block.
InsertParagraphOverwrites a line break on the text selection.
InsertSelectDropdownOverwrites a drop-down selection control on the text selection.
InsertSelectListboxOverwrites a list box selection control on the text selection.
InsertTextAreaOverwrites a multiline text input control on the text selection.
InsertUnorderedListConverts the text selection into an ordered list.
ItalicToggles the current selection between italic and nonitalic.
JustifyCenterCenters the format block in which the current selection is located.
JustifyFullNot supported.
JustifyLeftLeft-justifies the format block in which the current selection is located.
JustifyNoneNot supported.
JustifyRightRight-justifies the format block in which the current selection is located.
LiveResizeCauses the MSHTML Editor to update an element's appearance continuously during a resizing or moving operation, rather than updating only at the completion of the move or resize.
MultipleSelectionAllows for the selection of more than one site selectable element at a time when the user holds down the SHIFT or CTRL keys.
OpenNot supported.
OutdentDecreases by one increment the indentation of the format block in which the current selection is located.
OverWriteToggles the text-entry mode between insert and overwrite.
PasteOverwrites the contents of the clipboard on the current selection.
PlayImageNot supported.
PrintOpens the print dialog box so the user can print the current page.
RedoNot supported.
RefreshRefreshes the current document.
RemoveFormatRemoves the formatting tags from the current selection.
RemoveParaFormatNot supported.
SaveAs
Saves the current webpage to a file.
SelectAllSelects the entire document.
SizeToControlNot supported.
SizeToControlHeightNot supported.
SizeToControlWidthNot supported.
StopNot supported.
StopImageNot supported.
StrikeThroughNot supported.
SubscriptNot supported.
SuperscriptNot supported.
UnBookmarkRemoves any bookmark from the current selection.
UnderlineToggles the current selection between underlined and not underlined.
UndoUndo the previous command.
UnlinkRemoves any hyperlink from the current selection.
UnselectClears the current selection.

留言

熱門文章