'宣言 Public Overloads Sub Load( _ ByVal stream As Stream, _ ByVal categories As CalendarLookCategories _ )
public void Load( Stream stream, CalendarLookCategories categories )
ストリームが他の情報を含むことができるため、ストリームはUltraCalendarLook情報の先頭に配置する必要があります。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Try Dim stream As New FileStream("C:\\Layout.bin", FileMode.Open) If (Not stream Is Nothing) Then stream.Seek(0, SeekOrigin.Begin) Me.UltraCalendarLook1.Load(stream, CalendarLookCategories.All) stream.Close() End If Catch Debug.WriteLine("Error encountered while loading stream!") End Try End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button8_Click(object sender, System.EventArgs e) { try { FileStream stream = new FileStream("C:\\Layout.bin", FileMode.Open); if (stream != null) { stream.Seek(0, SeekOrigin.Begin); this.ultraCalendarLook1.Load(stream, CalendarLookCategories.All); stream.Close(); } } catch { Debug.WriteLine("Error encountered while loading stream!"); } }