Private _SrcText As String = "" Public ReadOnly Property SrcText() As String Get Return _SrcText End Get End Property
Private _AltText As String = "" Public ReadOnly Property AltText() As String Get Return _AltText End Get End Property
If Me.DialogResult = System.Windows.Forms.DialogResult.OK Then _SrcText = TextBox1.Text '画像の場所 _AltText = TextBox2.Text '代替テキスト Else _SrcText = "" _AltText = "" End If
Using f As New Form4() If f.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK Then RichTextBox1.SelectedText = String.Format( _ "<IMG src=""{0}"" alt=""{1}"">", _ f.SrcText, f.AltText) End If End Using