當前位置: 首頁>>代碼示例>>VB.NET>>正文


VB.NET MonthCalendar.AddBoldedDate方法代碼示例

本文整理匯總了VB.NET中System.Windows.Forms.MonthCalendar.AddBoldedDate方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET MonthCalendar.AddBoldedDate方法的具體用法?VB.NET MonthCalendar.AddBoldedDate怎麽用?VB.NET MonthCalendar.AddBoldedDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.MonthCalendar的用法示例。


在下文中一共展示了MonthCalendar.AddBoldedDate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。

示例1: loadDates

' The following method uses Add to add dates that are 
' bolded, followed by an UpdateBoldedDates to make the
' added dates visible.
Private Sub loadDates()
   Dim myInput As [String]
   Try
      Dim myInputStream As StreamReader = File.OpenText("myDates.txt")
      myInput = myInputStream.ReadLine()
      While myInput IsNot Nothing
         monthCalendar1.AddBoldedDate(DateTime.Parse(myInput.Substring(0, myInput.IndexOf(" "))))
         listBox1.Items.Add(myInput)
         myInput = myInputStream.ReadLine()
      End While
      monthCalendar1.UpdateBoldedDates()
      myInputStream.Close()
      File.Delete("myDates.txt")
   Catch fnfe As FileNotFoundException
   End Try
End Sub
開發者ID:VB.NET開發者,項目名稱:System.Windows.Forms,代碼行數:19,代碼來源:MonthCalendar.AddBoldedDate

示例2: MainClass

' 導入命名空間
Imports System
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Imports  System.Diagnostics 
Public Class MainClass
    
    Shared Sub Main()
       Dim form1 As Form = New Form1
       Application.Run(form1)    
    End Sub
End Class

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        calReservation.AddBoldedDate(New Date(2006, 4, 24))
        calReservation.AddBoldedDate(New Date(2006, 4, 25))
        calReservation.AddBoldedDate(New Date(2006, 4, 26))

        
    End Sub

End Class



<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.calReservation = New System.Windows.Forms.MonthCalendar
        Me.SuspendLayout()
        '
        'calReservation
        '
        Me.calReservation.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.calReservation.Location = New System.Drawing.Point(8, 8)
        Me.calReservation.Name = "calReservation"
        Me.calReservation.Size = New System.Drawing.Size(178, 155)
        Me.calReservation.TabIndex = 0
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(272, 174)
        Me.Controls.Add(Me.calReservation)
        Me.Name = "Form1"
        Me.Text = "UseMonthCalendar"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents calReservation As System.Windows.Forms.MonthCalendar

End Class
開發者ID:VB程序員,項目名稱:System.Windows.Forms,代碼行數:76,代碼來源:MonthCalendar.AddBoldedDate


注:本文中的System.Windows.Forms.MonthCalendar.AddBoldedDate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。