DataGridViewCell.GetClipboardContent メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Protected Overridable Function GetClipboardContent ( _ rowIndex As Integer, _ firstCell As Boolean, _ lastCell As Boolean, _ inFirstRow As Boolean, _ inLastRow As Boolean, _ format As String _ ) As Object
Dim rowIndex As Integer Dim firstCell As Boolean Dim lastCell As Boolean Dim inFirstRow As Boolean Dim inLastRow As Boolean Dim format As String Dim returnValue As Object returnValue = Me.GetClipboardContent(rowIndex, firstCell, lastCell, inFirstRow, inLastRow, format)
protected virtual Object GetClipboardContent ( int rowIndex, bool firstCell, bool lastCell, bool inFirstRow, bool inLastRow, string format )
protected: virtual Object^ GetClipboardContent ( int rowIndex, bool firstCell, bool lastCell, bool inFirstRow, bool inLastRow, String^ format )
protected Object GetClipboardContent ( int rowIndex, boolean firstCell, boolean lastCell, boolean inFirstRow, boolean inLastRow, String format )
protected function GetClipboardContent ( rowIndex : int, firstCell : boolean, lastCell : boolean, inFirstRow : boolean, inLastRow : boolean, format : String ) : Object
戻り値
Clipboard にコピーするセルの値を表す Object。


このメソッドは、セル値を表すクリップボード形式の値を取得するために、DataGridView.GetClipboardContent メソッドによって呼び出されます。
セル値は、最初にその表示形式で GetEditedFormattedValue メソッドから取得されます。これにより、値の書式を設定するための DataGridView.CellFormatting イベント、および書式設定が失敗した場合は DataGridView.DataError イベントが発生することがあります。
このメソッドの位置に関連するパラメータは、DataGridView コントロール内で選択されたセルによって定義される領域を表すデータ テーブルにおいて、このセルがどの位置にあるのかを示します。セルの位置によっては、このメソッドによって、表示形式のセル値の他に追加の書式指定情報も返される場合があります。たとえば、行の最初の列にあるセルの HTML 形式には、行の始まりを示すタグが含まれています。
サポートされているクリップボード形式は、DataFormats.Text、DataFormats.UnicodeText、DataFormats.Html、および DataFormats.CommaSeparatedValue です。
詳細については、Clipboard クラスのトピックを参照してください。
継承時の注意 カスタマイズされたクリップボード値を指定するには、このメソッドをオーバーライドします。たとえば、このメソッドをオーバーライドして、カスタムのセル型からの値のコピーをサポートできます。
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DataGridViewCell.GetClipboardContent メソッドのページへのリンク