Solved

Making Thumbnails

Posted on 2003-10-29
6
198 Views
Last Modified: 2010-05-03
Sorry for the lack of points experts, it's all I had left. Many thanks for looking into this though! I was wondering how I would make a program in VB that generated a thumbnail from an existing picture. (Using it's filename to locate it) Thanks a ton!
0
Comment
Question by:momonja
6 Comments
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 33 total points
ID: 9646998
0
 

Author Comment

by:momonja
ID: 9647226
that example is good, but I want to be able to export the thumbnails into a jpg, bmp, gif, etc. I don't want them to be in some treeview control.
0
 

Assisted Solution

by:Boyidiot
Boyidiot earned 32 total points
ID: 9653944
Option Explicit
Dim Temp As StdPicture,Wid As Single, Hei As Single

Private Sub cmdOpen_Click()
CommonDialog1.ShowOpen

Set Temp = LoadPicture(CommonDialog1.FileName)
Wid = ScaleX(Temp.Width, vbHimetric, picThumbnail.ScaleMode)
Hei = ScaleY(Temp.Height, vbHimetric, picThumbnail.ScaleMode)

picThumbnail.PaintPicture Temp, 0, 0, picThumbnail.ScaleWidth, picThumbnail.ScaleHeight, 0, 0, Wid, Hei

End Sub

Hope this helps
boyidiot
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now