online education, free education, online learning, online degree, beginner guide, computer guides, health guides, parenting guides, guides for beginner, online education degree, online education courses, free education online, free education journals, free software guides

Beginner Guide Simple Image Viewer in VB .NET header
Login Join Sitemap Contact Forums
Sponsors
This site offers the best selection of colleges, universities, online degree and career advancement programs on the Web
his site offers the best selection of colleges, universities, online degree and career advancement programs on the Web
Simple Image Viewer in VB .NET6/6/2007 7:05:43 PM
Visual Basic .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
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 Channel

Recommended Products:
Website:http://www.free-software-channel.info/content.asp?contentid=606
Views:1356  Rating:(0)    Submit rating