_ClipText() Method



|Visual FoxPro Toolkit for .NET | |

_ClipText() Method

Implementation of the _ClipText Property that allows to get and set data on the clipboard.

[pic]

This method is only available in WinForms and not available for WebForms.

[Visual Basic]

Public Shared Property _ClipText() As String

[C#]

public static string _ClipText

Example

[Visual Basic]

'Updates the windows clipboard with string "My Name". You can now use Windows "Paste"

feature to retrieve the contents or use Ctrl+V

_ClipText = "My Name";

myVar = _ClipText = 'Updates the contents of myVar with data from clipboard

Tip: Get the clipboard contents through the Clipboard object

MyLabel.Text = CStr(Clipboard.GetDataObject().GetData(DataFormats.Text))

[C#]

//Updates the Windows clipboard with string "My Name". You can now use Windows "Paste"

feature to retrieve the contents or use Ctrl+V

VFPToolkit.environmanet._ClipText = "My Name";

myVar = VFPToolkit.environmanet._ClipText //Updates the contents of myVar with data from clipboard

Tip: Get the clipboard contents through the Clipboard object

MyLabel.Text = (string)Clipboard.GetDataObject().GetData(DataFormats.Text);

Implementation

[Visual Basic]

Public Shared Property _ClipText() As String

Get

Return CType(Clipboard.GetDataObject().GetData(DataFormats.Text), String)

End Get

Set(ByVal Value As String)

'In this case update the clipboard contents

Clipboard.SetDataObject(Value)

End Set

End Property

[C#]

public static string _ClipText

{

//Returns the value in the _ClipText Property

get

{

return (string)Clipboard.GetDataObject().GetData(DataFormats.Text);

}

//Updates the value of the property with contents of the clipboard

set

{

//In this case update the clipboard contents

Clipboard.SetDataObject(value);

}

}

Requirements

Namespace: VFPToolkit

Class: VFPToolkit.environment

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: VFPToolkit (in VFPToolkitNET.dll)

See Also

VFPToolkit.environment Members | VFPToolkit Namespace

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download