Restricting File Formats

Windows Forms User's Guide > Howto: Work With Files

By default, the Load and Save methods will display all file formats Text Control supports. If you wish to support a subset of these formats, or if you have a version of Text Control that does not support all of the formats, you can specify the formats to be displayed as a parameter. Several members of Text Control's StreamType enumeration can be combined to, for instance, only support HTML and RTF:

private void mnuFile_OpenFile_Click(object sender, 
                                      System.EventArgs e)
    textControl1.Load(TXTextControl.StreamType.HTMLFormat |
[Visual Basic]
Private Sub mnuFile_OpenFile_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles mnuFile_OpenFile.Click
    TextControl1.Load(TXTextControl.StreamType.HTMLFormat + _
End Sub