IDataObject.GetDataPresent Method |
System.Windows.Forms.IDataObject
GetDataPresent( format [, autoconvert ])
Field member of the DataFormats class (see later for more information on this) or a Type object representing the format of the data for which to search
True to convert the data to the specified format
Boolean value indicating whether the Clipboard holds data of the specified format or of a format that can be converted to format
Returns a Boolean value indicating whether the Clipboard holds data of the specified format or of a format that the present data can be converted to
The format argument can be one of the following string values:
If format is a string, the autoconvert argument can be supplied in the method call. A value of False indicates that the function should determine whether the data stored by the IDataObject instance is in the format defined by format ; a value of True indicates that the function should determine whether the data stored by the IDataObject instance is in or is capable of being converted to the format defined by format .
The following code will inform us whether the Clipboard contains a bitmap:
Dim di As IDataObject di = clipboard.GetDataObject MsgBox(di.GetDataPresent(Dataformats.Bitmap))
IDataObject.GetData Method, IDataObject.GetFormats Method