Pixel Plotting

J

Jacky Luk

Hi
PSet with VB6 seems obsolete. What is the replacement for .NET 2002?
Thanks a lot
Jack
 
L

Larry Lard

Jacky said:
Hi
PSet with VB6 seems obsolete. What is the replacement for .NET 2002?
Thanks a lot

The short answer is Bitmap.SetPixel; the long answer is that you're
gonna have to spend a little time learning GDI+, the .net way of doing
graphics. I would start with the topic "Graphics Changes in Visual
Basic .NET" in the VStudio documentation.
 
H

Herfried K. Wagner [MVP]

Jacky,

Jacky Luk said:
PSet with VB6 seems obsolete. What is the replacement for .NET 2002?

Either use a bitmap as described in the other reply, or draw onto the form
in its 'Paint' event handler or overridden 'OnPaint' method. The 'Graphics'
object doesn't provide a method for drawing points, but you can do that
using 'FillRectangle':

\\\
Private Sub Form1_Paint( _
ByVal sender As Object, _
ByVal e As PaintEventArgs _
) Handles MyBase.Paint
e.Graphics.FillRectangle( _
New SolidBrush(Color.Red), _
New Rectangle(100, 100, 1, 1) _
)
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top