Hi Chris,
Your original question was regarding setting the pixels of the "client area
of a window." This is different than drawing on a bitmap, which is not a
window, nor the client area of a window.
Most drawing is not done using the few methods available in the
System.Drawing.Bitmap class, such as the SetPixel method. In fact, most
drawing done on Bitmaps is done via the Graphics class. I would suggest you
read up on it.
I think you would also benefit from the articles and tutorials at
http://www.bobpowell.net/.
The particular problem you seem to be describing is that you want the Bitmap
to appear immediately after you perform some drawing operation. If you could
be more specific about your business requirement, I could probably be of
more help. In the meantime, if you visit the references I mentioned, you may
not need any help.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
"Chris Saunders" <ev**@mountaincable.net> wrote in message
news:13***************************@MOUNTAINCABLE.N ET...
Thanks for the reply Kevin.
That class was the first place I looked but it does not appear
to provide for setting a pixel individually and having it appear
immediatly on the screen. So far all I have managed was to
use a System.Windows.Forms.PictureBox and a
System.Drawing.Bitmap, I use SetPixel for the
bitmap and then set the pictureBox.Image to the
bitmap. Even if I do pictureBox.Image = bitmap in
every iteration of the loop where I set the bitmap
pixels the redrawing does not appear until the loop
is finished.
I hope this explanation was clear enough.
Still hoping for a solution.
Regards
Chris Saunders
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eF*************@TK2MSFTNGP12.phx.gbl... Check out the System.Drawing.Graphics class:
http://msdn.microsoft.com/library/de...classtopic.asp
--
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
"Chris Saunders" <ev**@mountaincable.net> wrote in message
news:4a***************************@MOUNTAINCABLE.N ET...I am fairly new to .Net and C# but am familiar with the Win32 API.
I wish to set the pixels of the client area of a window one at a time
with a specific color. I have so far discovered that
System.Drawing.Bitmap
has a SetPixel() method but I can't seem to find out how to have the
bitmap
displayed. I would actually like to have the pixels appear as I set
them.
Regards
Chris Saunders