Public Class Form1 Inherits System.Windows.Forms.Form Private myAppSettings As AppSettings #Region " Windows フォーム デザイナで生成されたコード " Public Sub New() MyBase.New() ' この呼び出しは Windows フォーム デザイナで必要です。 InitializeComponent() ' InitializeComponent() 呼び出しの後に初期化を追加します。 Me.myAppSettings = New AppSettings() End Sub ' Form は dispose をオーバーライドしてコンポーネント一覧を消去します。 Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub ' Windows フォーム デザイナで必要です。 Private components As System.ComponentModel.IContainer ' メモ : 以下のプロシージャは、Windows フォーム デザイナで必要です。 ' Windows フォーム デザイナを使って変更してください。 ' コード エディタは使用しないでください。 Friend WithEvents propertyGrid1 As System.Windows.Forms.PropertyGrid Private Sub InitializeComponent() Me.PropertyGrid1 = New System.Windows.Forms.PropertyGrid() Me.SuspendLayout() ' 'propertyGrid1 ' Me.PropertyGrid1.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right) Me.PropertyGrid1.CommandsVisibleIfAvailable = True Me.PropertyGrid1.LargeButtons = False Me.PropertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar Me.PropertyGrid1.Location = New System.Drawing.Point(16, 16) Me.PropertyGrid1.Name = "propertyGrid1" Me.PropertyGrid1.Size = New System.Drawing.Size(264, 240) Me.PropertyGrid1.TabIndex = 0 Me.PropertyGrid1.Text = "propertyGrid1" Me.PropertyGrid1.ViewBackColor = System.Drawing.SystemColors.Window Me.PropertyGrid1.ViewForeColor = System.Drawing.SystemColors.WindowText ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12) Me.ClientSize = New System.Drawing.Size(292, 266) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.PropertyGrid1}) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.PropertyGrid1.SelectedObject = Me.myAppSettings End Sub End Class