System.Windows.Forms.IDataObject.SetData(string, object)

Here are the examples of the csharp api class System.Windows.Forms.IDataObject.SetData(string, object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: SystemEx
Source File: OleDropData.cs
View license
public void SetData(string format, object data)
            this.underlyingDataObject.SetData(format, data);

2. Example

Project: ClearCanvas
Source File: DragDropObject.cs
View license
public void SetData(string format, object data)
			_dataObject.SetData(format, data);

3. Example

Project: OpenLiveWriter
Source File: DataObjectBase.cs
View license
public void SetData(string format, object data)
            m_dataObject.SetData(format, data);

4. Example

Project: SkypeQuoteCreator
Source File: MainForm.cs
View license
private void SaveToClipboard()
            // Clear the current clipboard.
            Clipboard.SetText(" ");

            DateTime dateTime;

            // If the DateTime is invalid, we'll just stop right here.
            if (!DateTime.TryParse(uxTimestamp.Text, out dateTime))

            string user = uxName.Text;
            string message = uxMessage.Text;
            string skypeMessageFragment = new XDocument(
                new XElement("quote",
                    new XAttribute("author", user),
                    new XAttribute("authorname", user),
                    new XAttribute("timestamp", (dateTime.ToUniversalTime() - epoch).TotalSeconds),

            IDataObject dataObject = new DataObject();
            dataObject.SetData("System.String", message);
            dataObject.SetData("Text", message);
            dataObject.SetData("UnicodeText", message);
            dataObject.SetData("OEMText", message);

                new MemoryStream(Encoding.UTF8.GetBytes(skypeMessageFragment)));

                new MemoryStream(BitConverter.GetBytes(CultureInfo.CurrentCulture.LCID)));