Drawing pixels? 
Author Message
 Drawing pixels?

Hi Alexis,

you can use SetPixel to draw pixel.

Private Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As
Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long

and the code...

    result=SetPixel (yourpicture.hdc, posx, posy, color)
    ' where posx and posy are coordinates point[x,y]
    ' color is your color ex. RGB(255,0,0) -> red

good luck

Jan
=============================================
jK's Visual Basic page, http://www.*-*-*.com/
=============================================

=============================================


Quote:
> Hi

> I'm pretty new to graphics with VB, and I would like to know how to plot
> a single pixel using VB5 (or 6). I tried using the Circle method (with
> radius 0, or something small) but it wont work. Drawing a line from the
> point back to itself again wont work either.

> Help, please?

> Thanks

> Alexis M
> <remove "nospam." to email me directly>



Fri, 11 Jan 2002 03:00:00 GMT  
 Drawing pixels?
Hi

I'm pretty new to graphics with VB, and I would like to know how to plot
a single pixel using VB5 (or 6). I tried using the Circle method (with
radius 0, or something small) but it wont work. Drawing a line from the
point back to itself again wont work either.

Help, please?

Thanks

Alexis M
<remove "nospam." to email me directly>



Sat, 12 Jan 2002 03:00:00 GMT  
 Drawing pixels?
Pset


Sat, 12 Jan 2002 03:00:00 GMT  
 Drawing pixels?
You can use the PSet-method.
For more information about PSet, consult your VB help-file.

Regards,
Pieter Philippaerts
http://users.turboline.be/btl10148/


Quote:
> Hi

> I'm pretty new to graphics with VB, and I would like to know how to plot
> a single pixel using VB5 (or 6). I tried using the Circle method (with
> radius 0, or something small) but it wont work. Drawing a line from the
> point back to itself again wont work either.

> Help, please?

> Thanks

> Alexis M
> <remove "nospam." to email me directly>



Sun, 13 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Drawing Pixels

2. PIXELS, PIXELS, PIXELS

3. Pixels in drawings

4. how to draw box (5x5 pixels) in a picturebox

5. drawing a line or a pixel

6. Drawing a pixel

7. Draw Circle with pixels

8. Pixel by Pixel Scrolling in QBasic

9. Rotate one pixel around another pixel...

10. BMP output mapping BMP-pixel to printer-pixel 1:1

11. Print PicBox pixel by pixel?

12. How to change True color pixel to 256 color pixel, @Thanks

 

 
Powered by phpBB® Forum Software