PowerTools PlusPak for Windows Forms 8.0J
Bounds プロパティ (DrawMonthEventArgs)
使用例 

描画される月領域の境界線を表す四角形を取得します。
構文
Public ReadOnly Property Bounds As Rectangle
public Rectangle Bounds {get;}

プロパティ値

描画される月領域の境界線を表す四角形
使用例

次のサンプルコードは、このメンバの使用方法を示します。この例では、イベントハンドラがDrawMonth イベントの発生を通知します。この通知は、イベントの発生およびデバッグに役立ちます。

この例を実行するには、以下のコードをgcCalendar1のインスタンスを含むFormに追加し、イベントハンドラがDrawMonth イベントに関連付けられていることを確認します。また、gcCalendar1がCalendarType.YearMonth および CalendarDrawMode.OwnerDrawMonth モードで初期化されることを確認します。

private void gcCalendar1_DrawMonthInfo(object sender, GrapeCity.Win.Calendar.DrawMonthEventArgs e)
{
    System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
    messageBoxCS.AppendFormat("{0} = {1}", "BackColor", e.BackColor);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "Bounds", e.Bounds);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "ClientBounds", e.ClientBounds);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "Month", e.Month);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "Year", e.Year);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "IsSelected", e.IsSelected);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "Text", e.Text);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "ForeColor", e.ForeColor);
    messageBoxCS.AppendLine();
    messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics);

    MessageBox.Show(messageBoxCS.ToString(), "DrawMonth Event");
}
Private Sub gcCalendar1_DrawMonthInfo(ByVal sender As Object, ByVal e As Global.GrapeCity.Win.Calendar.DrawMonthEventArgs)

    Dim messageBoxVB As New System.Text.StringBuilder()

    messageBoxVB.AppendFormat("{0} = {1}", "BackColor", e.BackColor)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Bounds", e.Bounds)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ClientBounds", e.ClientBounds)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Month", e.Month)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Year", e.Year)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "IsSelected", e.IsSelected)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Text", e.Text)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ForeColor", e.ForeColor)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Graphics", e.Graphics)

    MessageBox.Show(messageBoxVB.ToString(), "DrawMonth Event")
End Sub
プラットフォーム

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

参照

DrawMonthEventArgs クラス
DrawMonthEventArgs メンバ

Send Feedback