Puts a text string on the Clipboard object using the specified Clipboard object format.
Clipboard.SetText(sText [, enFormat ] )
The SetText method syntax has the following parts:
|
Name |
Type |
Description |
|
The system clipboard internal variable |
||
|
sText |
String |
Text string to be set to the clipboard |
|
enFormat |
Optional. An integer that specifies the Clipboard object text string format. |
|
Name |
Value |
Description |
|
acfText |
1 |
Text string |
|
acfBitmap |
2 |
Bitmap picture (N/A for this method) |
|
acfMetafile |
3 |
Metafile picture (N/A for this method) |
|
acfDIB |
8 |
Device-independent bitmap picture (N/A for this method) |
|
acfPalette |
9 |
Pallete (N/A for this method) |
|
acfEnhMetafile |
14 |
Enhanced metafile picture (N/A for this method) |
|
acfDDELink |
0xBF00 |
DDE Conversation Information text string |
|
acfRTF |
0xBF01 |
Rich text format text string |
|
acfIcon |
0xBF02 |
Icon picture (N/A for this method) |
If no text string on the Clipboard object matches the expected format, a zero-length string ("") is returned.
The following statement sets the clipboard with the edit control selection (copy command) :
Clipboard.SetText(edt.SelText)