" GetThumbnailImage " Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • William Cruz

    #1

    " GetThumbnailImage " Question

    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.o cx" 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(B yVal sender As System.Object, ByVal e As
    System.EventArg s) Handles Button1.Click

    Dim ofd As New OpenFileDialog

    ofd.Filter = "Image Files(*.BMP;*.J PG;*.TIF)|*.BMP ;*.JPG;*.TIF|Al l files
    (*.*)|*.*"

    If ofd.ShowDialog( ) = Windows.Forms.D ialogResult.OK Then

    Dim image As New Bitmap(ofd.File Name)

    Dim pThumbnail As Image = image.GetThumbn ailImage(Pictur eBox1.Width,
    PictureBox1.Hei ght, Nothing, _

    New IntPtr())

    PictureBox1.Ima ge = pThumbnail

    End If

    End Sub

    End Class

    *** Sent via Developersdex http://www.developersdex.com ***
Working...