HelperFunctions.RegisterClipboardFormat Method

An example of an external function. Registers a new clipboard format. This format can then be used as a valid clipboard format.
<DllImport("user32.dll")> _ 
Friend Shared Function RegisterClipboardFormat( _ 
ByVal lpszFormatName As String
) As UInt32
This language is not supported or no code example is available.
[DllImport("user32.dll")] 
internal static extern UInt32 RegisterClipboardFormat( 
string lpszFormatName 
)
This language is not supported or no code example is available.
[<DllImport("user32.dll")>] 
extern UInt32 RegisterClipboardFormat( 
lpszFormatName:string 
)
This language is not supported or no code example is available.
[DllImport("user32.dll")] 
public private:  
static extern UInt32 RegisterClipboardFormat( 
String^ lpszFormatName 
)
This language is not supported or no code example is available.
In JScript, you cannot define your own external method with DllImport.
This language is not supported or no code example is available.

Parameters

lpszFormatName
string

The name of the new format.

Return Value

UInt32

If the function succeeds, the return value identifies the registered clipboard format.

If the function fails, the return value is zero.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Core

Supported in: 1.0, 1.1, 2.0

.NET Standard

Supported in: 2.0

Xamarin.Android

Supported in: 7.1

Portable Class Library

Supported in: Portable Class Library

In this article

Definition