The code shown below was copied from a previous post & it works fine for
"image files". I would like to make this work like "Windows file
Explorer" works when you change the view to "Thumbnail" but for CAD
(AutoCAD) files. While in explorer, I could see the thumbnail of my CAD
files. Can this be accomplished? I already know about the
"dwgthumbnail.ocx" thats all over the NET but it doesn't quite work for
me. Thanks in advance for your help.
William
Imports System.Drawing
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim ofd As New OpenFileDialog
ofd.Filter = "Image Files(*.BMP;*.JPG;*.TIF)|*.BMP;*.JPG;*.TIF|All files
(*.*)|*.*"
If ofd.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim image As New Bitmap(ofd.FileName)
Dim pThumbnail As Image = image.GetThumbnailImage(PictureBox1.Width,
PictureBox1.Height, Nothing, _
New IntPtr())
PictureBox1.Image = pThumbnail
End If
End Sub
End Class
*** Sent via Developersdex http://www.developersdex.com ***