UserControl や継承コントロールを作成する際にライセンス情報を継承する方法

文書番号 : 25932     文書種別 : 使用方法     最終更新日 : 2008/07/01
文書を印刷する
対象製品
MultiRow for Windows Forms 5.0J
詳細
製品のコントロールを継承して独自のコントロールを作成したり、他のコントロールと組み合わせて UserControl を作成する場合は、LicenseProvider 属性を設定する必要があります。
コントロールに LicenseProvider 属性を設定するには、次のように、クラスの宣言の前に LicenseProvider 属性を設定します。

[Visual Basic]
Imports System.Drawing
Imports System.Windows.Forms
Imports System.ComponentModel

' 継承コントロールの場合
<LicenseProviderAttribute(GetType(LicenseProvider))> _
Public Class MyControl
  Inherits GrapeCity.Win.MultiRow.GcMultiRow
  ...
End Class

' ユーザーコントロールの場合
<LicenseProviderAttribute(GetType(LicenseProvider))> _
Public Class UserControl1
  ...
End Class


[C#]
using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;

// 継承コントロールの場合
[LicenseProviderAttribute(typeof(LicenseProvider))]
public partial class MyControl : GrapeCity.Win.MultiRow.GcMultiRow
{
  ...
}

// ユーザーコントロールの場合
[LicenseProviderAttribute(typeof(LicenseProvider))]
public partial class UserControl1 : UserControl
{
  ...
}

この文書は、以前は次のFAQ IDで公開されていました : 11301