ClipboardProxy.ContainsText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines if there is text on the Clipboard.
Overloads
ContainsText() |
Determines if there is text on the Clipboard. |
ContainsText(TextDataFormat) |
Determines if there is text on the Clipboard. |
ContainsText()
- Source:
- ClipboardProxy.vb
- Source:
- ClipboardProxy.vb
- Source:
- ClipboardProxy.vb
Determines if there is text on the Clipboard.
public:
bool ContainsText();
public bool ContainsText ();
member this.ContainsText : unit -> bool
Public Function ContainsText () As Boolean
Returns
True
if the Clipboard contains text; otherwise False
.
Examples
This example determines if HTML text is stored on the Clipboard and reads from the Clipboard if it does.
If My.Computer.Clipboard.ContainsText(
System.Windows.Forms.TextDataFormat.Html) Then
Dim clipText = My.Computer.Clipboard.GetText()
End If
Remarks
Possible formats are CommaSeparatedValue, Html, Rtf and UnicodeText.
Availability by Project Type
Project type | Available |
---|---|
Windows Application | Yes |
Class Library | Yes |
Console Application | Yes |
Windows Control Library | Yes |
Web Control Library | No |
Windows Service | Yes |
Web Site | No |
See also
- Computer
- TextDataFormat
- ContainsText
- GetText
- SetText
- Objects (Visual Basic)
- Storing Data to and Reading From the Clipboard
Applies to
ContainsText(TextDataFormat)
- Source:
- ClipboardProxy.vb
- Source:
- ClipboardProxy.vb
- Source:
- ClipboardProxy.vb
Determines if there is text on the Clipboard.
public:
bool ContainsText(System::Windows::Forms::TextDataFormat format);
public bool ContainsText (System.Windows.Forms.TextDataFormat format);
member this.ContainsText : System.Windows.Forms.TextDataFormat -> bool
Public Function ContainsText (format As TextDataFormat) As Boolean
Parameters
- format
- TextDataFormat
TextDataFormat. If specified, identifies what text format to be checked for. Required.
Returns
True
if the Clipboard contains text; otherwise False
.
Examples
This example determines if HTML text is stored on the Clipboard and reads from the Clipboard if it does.
If My.Computer.Clipboard.ContainsText(
System.Windows.Forms.TextDataFormat.Html) Then
Dim clipText = My.Computer.Clipboard.GetText()
End If
Remarks
Possible formats are CommaSeparatedValue, Html, Rtf and UnicodeText.
Availability by Project Type
Project type | Available |
---|---|
Windows Application | Yes |
Class Library | Yes |
Console Application | Yes |
Windows Control Library | Yes |
Web Control Library | No |
Windows Service | Yes |
Web Site | No |
See also
- Computer
- TextDataFormat
- ContainsText
- GetText
- SetText
- Objects (Visual Basic)
- Storing Data to and Reading From the Clipboard