本文整理汇总了VB.NET中System.Windows.Forms.RichTextBoxStreamType枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET RichTextBoxStreamType枚举的具体用法?VB.NET RichTextBoxStreamType怎么用?VB.NET RichTextBoxStreamType使用的例子?那么, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了RichTextBoxStreamType枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: SaveMyFile
Public Sub SaveMyFile()
' Create a SaveFileDialog to request a path and file name to save to.
Dim saveFile1 As New SaveFileDialog()
' Initialize the SaveFileDialog to specify the RTF extension for the file.
saveFile1.DefaultExt = "*.rtf"
saveFile1.Filter = "RTF Files|*.rtf"
' Determine if the user selected a file name from the saveFileDialog.
If (saveFile1.ShowDialog() = System.Windows.Forms.DialogResult.OK) _
And (saveFile1.FileName.Length) > 0 Then
' Save the contents of the RichTextBox into the file.
richTextBox1.SaveFile(saveFile1.FileName, _
RichTextBoxStreamType.PlainText)
End If
End Sub