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

D

Dmitriy Lapshin [C# / .NET MVP]

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.
 
G

Guest

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.

.
 

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