.NETGURU
Creating thumbnails with GDI+
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-drawing' list.


=?iso-8859-1?Q?Andr=E9_Colbi=F6rnsen?=
-- Moved from [aspngfreeforall] to [ngfx-drawing] by James Avery <Click here to reveal e-mail address> --

In the VS.Net help, I have found a very interesting chapter re how to
create thumbnails. Problem is, the code is obviously written in C++ or
something and I have no clue how to translate this int VB.Net.

Here is the code from the example:

Image image(L"Compass.bmp");
Image* pThumbnail =3D image.GetThumbnailImage(100, 100, NULL, NULL);
graphics.DrawImage(pThumbnail, 10, 10,=20
pThumbnail->GetWidth(), pThumbnail->GetHeight());=20

Could anybody tell me where I could find some good gdi+ examples written
in VB.Net (or perhaps tell me how the above code should be written in
VB.Net)?

Tia

Regards/H=E4lsningar

Andr=E9 Colbi=F6rnsen
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail: Click here to reveal e-mail address
Web.: www.sonnenburg.se
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D

Reply to this message...
 
    
Peter Brunone
Andre,

    It looks like C# to me, assuming some weird character conversions from your
system.

    For a great bunch of System.Drawing articles (including thumbnailing), read
Chris Garrett's column at AspAlliance.com:
http://www.aspalliance.com/chrisg .

Cheers,

Peter

|-----Original Message-----
|From: André Colbiörnsen [mailto:Click here to reveal e-mail address]
|Sent: Saturday, April 27, 2002 10:50 AM
|To: ngfx-drawing
|Subject: [ngfx-drawing] Creating thumbnails with GDI+
|
|
|-- Moved from [aspngfreeforall] to [ngfx-drawing] by James Avery
|<Click here to reveal e-mail address> --
|
|In the VS.Net help, I have found a very interesting chapter re how to
|create thumbnails. Problem is, the code is obviously written in C++ or
|something and I have no clue how to translate this int VB.Net.
|
|Here is the code from the example:
|
|Image image(L"Compass.bmp");
|Image* pThumbnail =3D image.GetThumbnailImage(100, 100, NULL, NULL);
|graphics.DrawImage(pThumbnail, 10, 10,=20
|pThumbnail->GetWidth(), pThumbnail->GetHeight());=20
|
|Could anybody tell me where I could find some good gdi+ examples written
|in VB.Net (or perhaps tell me how the above code should be written in
|VB.Net)?
|
|Tia
|
|Regards/H=E4lsningar
|
|Andr=E9 Colbi=F6rnsen
|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
|3D=3D=3D=
|=3D=3D=3D=3D=3D=3D=3D
|Sonnenburg Communications
|Bergsgatan 3,
|SE-211 54 Malm=F6
|Sweden
|Tel.: +46-(0)40-97 78 80
|Fax.: +46-(0)40-97 78 80
|Mob.: +46-(0)708-97 78 79
|Mail: Click here to reveal e-mail address
|Web.: www.sonnenburg.se
|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
|3D=3D=3D=
|=3D=3D=3D=3D=3D=3D=3D
|| [ngfx-drawing] member Click here to reveal e-mail address = YOUR ID
|| http://www.aspfriends.com/aspfriends/ngfx-drawing.asp = JOIN/QUIT
|
|

Reply to this message...
 
    
minh@one.net
Actually, it looks like managed C++.
Calls to the CLR should be similar to other languages. Just ignore the *, -
> and you should convert most things just fine.

>     It looks like C# to me, assuming some weird character conversions
from your
[Original message clipped]

-------------------------------------------
This message was sent using Us.Net Webmail.
------------ http://www.us.net ------------

Reply to this message...
 
    
dave montmorency
(Type your message here)

try this:

Dim image = New Bitmap("compass.bmp")
Dim pThumbnail As Image = image.GetThumbnailImage(100, 100, Nothing, New IntPtr())

e.Graphics.DrawImage( pThumbnail, 0,10,pThumbnail.Width,pThumbnail.Height)

--------------------------------
From: dave montmorency
Reply to this message...
 
 
System.IntPtr




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification