it used to be a simple program in VB6 :(

  • Thread starter Thread starter Serdar C.
  • Start date Start date
S

Serdar C.

hi there im trying to write a program that looks like this:

+--------------------------------------------+
| +--------------+ |
| | | |
| | Pbox | |
| | | |
| +--------------+ |
+--------------------------------------------+

theres a picture box in the form and i'll paint somehting on it with mouse.
and i want to learn the color of the each pixel of the pbox.. (i.e in
pixel(10,10) color is black)
there used to be simple commands for that in vb6 (gset(x,y)) but theres no
command like this i found in c# or vb.net yet.. can smoeone help me on this
program or show a source with an example ?

thanx for spending ur time for reading and helping..
 
Serdar,

This is simple in .NET as well, although it is different. Basically,
create a control which derives from COntrol, and then override the OnPaint
method. In it, call the DrawRectangle method on the Graphics instance
passed to the method, and that should be it.

Hope this helps.
 
Back
Top