Pirahnaplant
Well-known member
- Joined
- Mar 29, 2009
- Messages
- 75
- Programming Experience
- 3-5
I am trying to use the SetPixel API function to modify a bitmap. The problem is that it doesn't do anything; the image just stays completely transparent. Here is some sample code that shows what I'm trying to do.
VB.NET:
Dim img As New Bitmap(64, 64)
Dim hdc As IntPtr = Graphics.FromImage(img).GetHdc
Dim redColor As Long = &HFF0000L
For y As Long = 0 To 63
For x As Long = 0 To 63
SetPixel(hdc, x, y, redColor)
Next
Next