Exploring the Dialogs Controls in Vb.Net - OpenFileDialog Control
(Page 3 of 4 )
When this control's ShowDialog() method is called, an Open dialog window pops up as shown in the next picture. As we shall see later in the example, you can filter the file extension you want opened; that is the reason it is showing (*.htm;*. html) as the extensions.

This next picture shows the class view of this control. However we will be mostly using the properties and methods of the FileDialog class.

The properties used for the example shown, such as the filter for file extension, come because they are inherited from the FileDialog Class as shown here.

SaveFileDialog Control
When this control's ShowDialog() method is called, the Save As window shows up as shown here.

It is possible to code such that a particular file type can be saved to a chosen directory using again the filter for file extension property derived from the FileDialog class. Both this control, as well as the OpenFileDialog control, give access to the OpenFile() method (as System.IO.Stream) which can be very useful.

Next: Usage of these Controls >>
More Visual Basic.NET Articles
More By Jayaram Krishnaswamy