System.windows.forms.dataobject




















ContainsFileDropList 7. GetFileDropList 6. GetText 6. ContainsImage 5. ContainsText 5. ContainsAudio 4. GetImage 2. SetContentRefs 2. SetComponentRefs 2. SetBatchInfos 2. SetIColorData 2. SetGameObjectRefs 2. SetAudio 1. SetFiles 1. GetAudioStream 1. SetWrappedData 1. Related in langs. CreatePost Go. NewDevice Go. Record Java. Style Java. GetDataPresent public method. Type return bool. DataObject Class Documentation. Example 1. This browser is no longer supported.

Download Microsoft Edge More info. Contents Exit focus mode. Data Object. Set Data Method Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. Forms Assembly: System. SetData Object. Important Calling this method with untrusted data is a security risk. Applies to. Adds an Image to the data object in the Bitmap format. Adds text data to the data object in the UnicodeText format.

Adds text data to the data object in the format indicated by the specified TextDataFormat value. Creates a connection between a data object and an advisory sink. This method is called by an object that supports an advisory sink and enables the advisory sink to be notified of changes in the object's data.

Obtains data from a source data object. Transfers data to the object that implements this method. This method is called by an object that contains a data source. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Data Object Class Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System.

Forms Assembly: System. Implements a basic data transfer mechanism. Note Special considerations may be necessary when using the metafile format with the Clipboard. In this article. DataObject Object. DataObject String, Object. ContainsText TextDataFormat. Equals Object. Determines whether the specified object is equal to the current object. Inherited from Object. GetData String. File: MainForm. Parse DateTextBox. Text, DateTextBox. Culture, DateTimeStyles. Text, MessageTextBox. Text, timeSpan. TotalSeconds, MessageTextBox.

Text ; dataObject. SetData "System. String", messagePlain ; dataObject. SetData "Text", messagePlain ; dataObject. GetBytes messageXml ; dataObject. GetBytes CultureInfo. LCID ; dataObject. Example 2. File: ClipboardSnapshot. GetFormats ; if formats. Cannot be processed in. GetData format ; if o! Example 3. Copy DragDropEffects. Example 4. File: ClipboardTest. Rtf ; Assert. AreEqual false, Clipboard. ContainsText TextDataFormat.

Text , " A1" ; Assert. UnicodeText , " A2" ; Assert. AreEqual true, Clipboard. Rtf , " A3" ; Assert. GetText TextDataFormat. SetData DataFormats. SetDataObject data ; Assert. Text , " B1" ; Assert. UnicodeText , " B2" ; Assert.

Rtf , " B3" ; Assert. Rtf , " B4" ; Assert. GetText , " B5" ; Clipboard. Example 5. File: HtmlDocumentLanguage.

Text, text ; obj2. Example 6. File: SampleCsDropTarget. Show RhUtil. OK, MessageBoxIcon. ActiveDoc ; if null! Example 7. File: Frame.



0コメント

  • 1000 / 1000