このメソッドは、LoadFromBinary(Stream) メソッドによってロード可能なデータを保存します。
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinExplorerBar Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button21.Click Try Dim stream As New FileStream("C:\\Layout.bin", FileMode.OpenOrCreate) stream.Seek(0, SeekOrigin.Begin) Try Me.ultraExplorerBar1.SaveAsBinary(stream) Catch MessageBox.Show(Me, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End Try stream.Close() Catch Debug.WriteLine("Error encountered while saving stream!") End Try End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinExplorerBar; private void button21_Click(object sender, System.EventArgs e) { try { FileStream stream = new FileStream("C:\\Layout.bin", FileMode.OpenOrCreate); stream.Seek(0, SeekOrigin.Begin); try { this.ultraExplorerBar1.SaveAsBinary(stream); } catch { MessageBox.Show(this, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } stream.Close(); } catch { Debug.WriteLine("Error encountered while saving stream!"); } }