Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Dieser Konstruktor unterstützt die .NET Framework-Infrastruktur und ist nicht für die direkte Verwendung in Code bestimmt.
Initialisiert eine neue Instanz der DataFormats.Format-Klasse mit einem booleschen Wert, der angibt, ob ein Win32-Handle erwartet wird.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
Public Sub New ( _
name As String, _
id As Integer _
)
'Usage
Dim name As String
Dim id As Integer
Dim instance As New Format(name, id)
public Format (
string name,
int id
)
public:
Format (
String^ name,
int id
)
public Format (
String name,
int id
)
public function Format (
name : String,
id : int
)
Parameter
- name
Der Name dieses Formats.
- id
Die ID-Nummer für dieses Format.
Beispiel
Im folgenden Codebeispiel wird ein neues Format für einen Namen und eine eindeutige ID-Nummer erstellt. Für das neue Format ist kein Windows-Handle erforderlich. Dafür ist es erforderlich, dass textBox1 instanziiert wurde.
Private Sub CreateMyFormat2()
Dim myFormat As New DataFormats.Format("AnotherNewFormat", 20916)
' Displays the contents of myFormat.
textBox1.Text = "ID value: " + myFormat.Id.ToString() + ControlChars.Cr _
+ "Format name: " + myFormat.Name
End Sub
private void CreateMyFormat2() {
DataFormats.Format myFormat = new DataFormats.Format("AnotherNewFormat", 20916);
// Displays the contents of myFormat.
textBox1.Text = "ID value: " + myFormat.Id + '\n' +
"Format name: " + myFormat.Name;
}
private:
void CreateMyFormat2()
{
DataFormats::Format^ myFormat = gcnew DataFormats::Format(
"AnotherNewFormat", 20916 );
// Displays the contents of myFormat.
textBox1->Text = String::Format( "ID value: {0}\nFormat name: {1}",
myFormat->Id, myFormat->Name );
}
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
DataFormats.Format-Klasse
DataFormats.Format-Member
System.Windows.Forms-Namespace