@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The SetPixel API !!!!C# Signature: [DllImport("gdi32.dll")] static extern uint SetPixel(IntPtr hdc, int X, int Y, uint crColor); !!!!User-Defined Types: None. !!!!Notes: The SetPixel method sets the color of a specified pixel in this bitmap. !!!!Tips & Tricks: Please add some! !!!!Sample Code: [DllImport("gdi32.dll")] static extern int SetPixel(IntPtr hdc, int X, int Y, int crColor); public int ColorToRGB(Color crColor) { return crColor.B << 16 | crColor.G << 8 | crColor.R; } private void button1_Click(object sender, EventArgs e) { Graphics vGraphics = Graphics.FromHwnd(Handle); SetPixel(vGraphics.GetHdc(), 10, 10, ColorToRGB(Color.Red)); } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: SetPixel@msdn on MSDN
Edit gdi32.SetPixel
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.