With Me.ColorDialog1
.ShowDialog()
TxtListen.BackColor = .Color
End With
End Sub
2) “字体”按钮单击事件代码
Private Sub BtFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtFont.Click
With Me.FontDialog1
.ShowDialog()
TxtListen.Font = .Font
End With
End Sub
3) “打开”按钮单击事件代码
Private Sub BtOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtOpen.Click
Dim FilePath As String
With Me.OpenFileDialog1
.Title = "打开听写记录"
.CheckFileExists = True
.CheckPathExists = True
.Multiselect = False
.Filter = "文本文件(.txt)|*.txt"
If .ShowDialog() = Windows.Forms.DialogResult.Cancel Then
Exit Sub
End If
|