473,787 Members | 2,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

" GetThumbnailIma ge " 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 ***
Apr 19 '07 #1
0 1054

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5630
by: Andrew Banks | last post by:
Is it possible to use GetThumbnailImage with images being pulled from an SQL DB and if so how? All examples I've seen refer to working with an actual image stored on the server. My code for pulling the image from the DB is below if it makes a difference. Thanks in advance private void Page_Load(object sender, System.EventArgs e) {
1
3350
by: Comcast | last post by:
I understand that one of the limitations of the Image.GetThumbnailImage() function is that it's not really good for creating "large" thumbnails because if it exists in the image file, the function will take the embedded thumbnail and actually blow it up to the requested height/width. Does anyone know if Microsoft will be fixing this "feature" or whether there's a work around to force the function to use the full image to scale? Thanks...
5
331
by: John | last post by:
I am trying to convert the regular sized images in a directory to thumbnails and then display the thumbnails in a datalist. My code below is displaying the first image and nothing else after it. What do I have to do to have the thumbnails displayed in my datalist? Thanks. Dim strFile As String Dim pics As ArrayList = New ArrayList ' Get image folder path on server - use "\" string if root
8
3212
by: Fabricio Sperandio | last post by:
Hi everyone, I am trying to generate some thumbnails using System.Drawing.Image Class. Actually the GetThumnailImage method. The question is: How can I get a better thumbnail picture? I mean, when the original size is big, for example, 800x600 and I generate a small picture (160x120) the quality is terrible for a jpeg and even orse for a gif. How can I get some better images? There is another class? There is some resolution propertie I...
3
1206
by: Rudy | last post by:
Hello, I'm hoping went through Scott Mitcell's article on true image resizing. Looking through the article, it's not clear where to put the "GetThumbNailImage" method http://aspnet.4guysfromrolla.com/articles/012203-1.aspx Thanks! Rudy
1
9858
by: GrandpaB | last post by:
I am having difficulty implementing the GetThumbnailImage method. I have read the "Help" files on this method, but remain confused. My problem is understanding the last two parameters that the method requires. I don't understand the callback concept in genreal. What are the callback and callbackData parameters, how are they set up and how are they used? Dim MyImage As Image MyImage = Image.FromFile("C:\Chris6.jpg")
4
3820
by: Greg | last post by:
I've searched everywhere for a solution Microsoft .NET Framework V 2.0.50727 AutoEventWireup="false" image2.aspx resize an image on the fly but Page_Load is triggered twice: Any suggestion? Here is the code behind:
3
2206
by: boeledi | last post by:
Dear All, (First of all this is not a c# piece of code but it does not really matter). I would really appreciate if someone could help me. I am developing an ASP.NET web site and I have to deal with images upload. When the user is selecting an image, I save it as such together with a thumbnail version.
0
1888
by: billsahiker | last post by:
Does anyone know how to call GetthumbnailImage in VB6? I am posting this here because .NET is where most of the use of GDIPlus is found and many of you are/were VB6 folks. I registered the gdiplus.dll and gdipluswrapper.dll and am able to successfully use many of the GDI+ functions in VB6, but my call to GetthumbnailImage generates a "Bad DLL calling convention" error. Function GetThumbnailImage(thumbWidth As Long, thumbHeight As...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.