This is a simple image viewer that can accepts source directory, view selected image and copy selected image to another selected folder. Software was written in VB.NET
This is a simple image viewer that can accepts source directory, view selected image and copy selected image to another selected folder. Software was written in VB.NET
Here are the preview of the codes:
'View selected image using picture control
Try
If lvFiles.SelectedIndices.Count > 0 Then
strSelectedFileComplete = txtdir.Text + IIf(txtdir.Text.Substring(txtdir.Text.Length - 1) = "\", "", "\") + lvFiles.SelectedItems(0).Text
strSelectedFile = lvFiles.SelectedItems(0).Text
Dim MyImage = New Bitmap(strSelectedFileComplete)
picViewer.SizeMode = PictureBoxSizeMode.StretchImage
picViewer.Image = CType(MyImage, Image)
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
'Enumerate files on the selected source directory
Dim d() As String
d = Directory.GetFiles(prSelectedPath)
Dim en As System.Collections.IEnumerator
en = d.GetEnumerator
lvFiles.Items.Clear()
While en.MoveNext
lvFiles.Items.Add(en.Current.ToString().Substring(prSelectedPath.Length + 1))
End While
To download the source code visit
Free Software ChannelRecommended Products: