EDN Admin
Well-known member
Hi Good People
Mr Monkeyboy helped me to get this far. On my form1 I have Textbox1 and Textbox2 a button1 and a RichTextbox1. and what happens is in textbox1 I type the Driveletter I require IE D: or F: I am viewing files on my CD/DVDs and Flash Drives the Files that I have put on them they can be Photos Office Forms/Bills.
would it be possible to somehow View the picture in a Picturebox Or View the Office forms In a thumb nail that i have selected in the Rich textbox1.
upto now in textbox1 I type the drive letter where I want to view my files in textbox2 I type the File I wish to search for example: Textbox1= D:....... Textbox2 I type the file 09032010a, this is a photo but if or when The Richtextbox1 Displays the file I want to click on that File in the Rich Textbox1 I would like a thumbnail to display the Picture to see if the picture is the right one i am looking for.
But if it is an office form, I would like a thumbnail to show the form if I click on the file that is found in the Richtextbox1
I hope you can understand the question. the code I have right now is below:Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If TextBox1.TextLength > 0 And TextBox2.TextLength > 0 Then
Dim Test = Directory.EnumerateFiles(TextBox1.Text, TextBox2.Text, SearchOption.AllDirectories)
For Each Item In Test
RichTextBox1.AppendText(Item & vbCrLf)
Next
End If
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
End Sub
Private Sub Label1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Label2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Label2.Click
End Sub
Private Sub RichTextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RichTextBox1.TextChanged
End Sub
End Class
Kind Regards
Gary
Gary Simpson
View the full article
Mr Monkeyboy helped me to get this far. On my form1 I have Textbox1 and Textbox2 a button1 and a RichTextbox1. and what happens is in textbox1 I type the Driveletter I require IE D: or F: I am viewing files on my CD/DVDs and Flash Drives the Files that I have put on them they can be Photos Office Forms/Bills.
would it be possible to somehow View the picture in a Picturebox Or View the Office forms In a thumb nail that i have selected in the Rich textbox1.
upto now in textbox1 I type the drive letter where I want to view my files in textbox2 I type the File I wish to search for example: Textbox1= D:....... Textbox2 I type the file 09032010a, this is a photo but if or when The Richtextbox1 Displays the file I want to click on that File in the Rich Textbox1 I would like a thumbnail to display the Picture to see if the picture is the right one i am looking for.
But if it is an office form, I would like a thumbnail to show the form if I click on the file that is found in the Richtextbox1
I hope you can understand the question. the code I have right now is below:Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
If TextBox1.TextLength > 0 And TextBox2.TextLength > 0 Then
Dim Test = Directory.EnumerateFiles(TextBox1.Text, TextBox2.Text, SearchOption.AllDirectories)
For Each Item In Test
RichTextBox1.AppendText(Item & vbCrLf)
Next
End If
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
End Sub
Private Sub Label1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Label2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Label2.Click
End Sub
Private Sub RichTextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles RichTextBox1.TextChanged
End Sub
End Class
Kind Regards
Gary
Gary Simpson
View the full article