I have a problem regarding displaying the files. Actually, my code displays both pdf's and images. I am thinking to have a script to check whether the file is image or pdf before it gets displayed. Can anyone help in this regard.
// open jpeg
//Open as text
Actually i have written a handler class to deal with thumbnails and fullimages. Can you tell me how can i write a code in thumbnail handler class. I want to check the file before displaying the thumbnail, if the file is pdf then it should be displayed as it is with out being displayed as a thumbnail.
Path.GetExtension(filePath); can also be used to return the file type extension.
If you have written a class then i expect your class has a method which reads the file and returns a thumbnail, since thats the behaviour you wish to alter, you can place the above code inside that method. Check the filetype then return a thumbnail based on the type of the file.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...