Solved

Making Thumbnails

Posted on 2003-10-29
6
200 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 60
A macro to Count the number of rows across all worksheets 3 127
MsgBox 2 59
MS Access Search and Replace Using VBA 6 81
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

860 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