File DialogSelected Items

The Show method does not actually open the selected file, but places the filename and path into a FileDialogSelectedItems collection. As you will see later, it is possible to allow multiple file selection. In the present example, the user can only select one file. The name of the file is returned from the first item in the FileDialogSelectedItems collection, which is referred to by the SelectedItems property of the FileDialog object.

Use the LoadPicture function to assign the file to the Picture property of the Image control.

0 0

Post a comment