i tried to run this program
i tried to run this program bt i don't understand the coding line no 5. and 48.
bdialog.ShowDialog = Windows.Forms.DialogResult.OK
If Me.ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK
plz help me abt it...
Imports System.IO Public Class Form1 Dim index As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If bdialog.ShowDialog = Windows.Forms.DialogResult.OK Then TextBox1.Text = bdialog.SelectedPath index = 0 Me.listbox1.Items.Clear() For Each Image As String In My.Computer.FileSystem.GetFiles(TextBox1.Text, FileIO.SearchOption.SearchTopLevelOnly) ', "*.gif*", "*.jpg*", "*.bmp*", "*.png*") Me.listbox1.Items.Add(Image) index += 1 Next Button4.Enabled = True Button5.Enabled = True Button8.Enabled = True Button9.Enabled = True Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom End If If index > 0 Then listbox1.SelectedIndex = 0 Else Me.listbox1.Items.Add("folder is empty") End If label2.Text = "total number files in this folder are" & index End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom Try PictureBox1.Load(TextBox1.Text) Catch ex As Exception End Try End Sub Private Sub listbox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles listbox1.SelectedIndexChanged TextBox1.Text = listbox1.SelectedItem End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If Me.ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then PictureBox1.BackColor = Me.ColorDialog1.Color End If End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click PictureBox1.BackColor = Color.Transparent() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom Try If listbox1.SelectedIndex < index Then listbox1.SelectedIndex += 1 PictureBox1.Load(listbox1.SelectedItem) Else End If Catch ex As Exception End Try End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom If listbox1.SelectedIndex > 0 Then Try listbox1.SelectedIndex -= 1 PictureBox1.Load(listbox1.SelectedItem) Catch ex As Exception End Try Else End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Normal End Sub End Class
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.