Thanks in advance,
Kurzweil
If you use the PictureBox you'll get whatever interpolation mode it chooses.
PictureBox is unneccesary though. You can display an image so easily and
choose whatever antialiasing and interpolation modes you like. After my
signature is an image control in Visual Basic that does this.
--
Bob Powell [MVP]
C#, System.Drawing
ANNOUNCING: Well Formed.
The monthy electronic magazine for
Windows Forms and GDI+ engineers
http://www.bobpowell.net/wellformed.htm
Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
---------------------------
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Public Class QuickPicBox
Inherits Control
Dim _image As Image
Public Property Image() As Image
Get
Return _image
End Get
Set(ByVal Value As Image)
_image = Value
End Set
End Property
Protected Overloads Overrides Sub OnPaint(ByVal e As PaintEventArgs)
If _image Is Nothing Then
Return
End If
'set up any interpolation mode you like here...
e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.NearestNeighbor
e.Graphics.DrawImage(_image, New Rectangle(0, 0, Width, Height), New
Rectangle(0, 0, _image.Width, _image.Height), GraphicsUnit.Pixel)
End Sub
End Class
---------------------------
"Kurzweil" <rayk...@hotmail.com> wrote in message
news:10606747...@newsreader2.wirehub.nl...