How can I just draw a 1x1 pixel in widow app with C#?

  • Thread starter Thread starter ClearWater
  • Start date Start date
Hi,

The simplest example would be:

Graphics g = myForm.CreateGrpahics(...) or Graphics g =
myControl.CreateGrpahics(...)

Then use the created Graphics to draw a line or a rect that 1x1 pixel sized.

You can also refer to the Paint event and the Graphics class docs in the
MSDN Library.
 
But how to create a rect that 1x1 pixel sized?
-----Original Message-----
Hi,

The simplest example would be:

Graphics g = myForm.CreateGrpahics(...) or Graphics g =
myControl.CreateGrpahics(...)

Then use the created Graphics to draw a line or a rect that 1x1 pixel sized.

You can also refer to the Paint event and the Graphics class docs in the
MSDN Library.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Please explain in detail include needed code.

.
 
Back
Top