Graphics.Pixel

Can the Alpha not be set using this property?

Dim C1 As Color = RGB(255, 0, 0, 0)

For counter As Integer = 0 to me.Width
For i1 As Integer = 0 to me.Height
g.Pixel(counter, i1) = C1
Next
Next

And
Dim C1 As Color = RGB(255, 0, 0, 255)

For counter As Integer = 0 to me.Width
For i1 As Integer = 0 to me.Height
g.Pixel(counter, i1) = C1
Next
Next

Both give solid red canvases if put into the paint event, I’d expect 1 to be clear.

yes I know that neither code gives a transparent canvas, so my question is does Alpha work for g.pixel

Sorry, I had misread your code. Running your code in the debugger shows that the Color variable contains the correct color even though the canvas is being drawn in solid red both times, so I suspect this might be a bug in Graphics.Pixel.

FWIW, this works as a workaround (and is significantly faster):

  Dim C1 As Color = RGB(255, 0, 0, 255)
  Dim p As New Picture(g.Width, g.Height) ' for Windows, make sure App.UseGDIPlus is set to True
  For counter As Integer = 0 to me.Width
    For i1 As Integer = 0 to me.Height
      p.RGBSurface.Pixel(counter, i1) = C1
    Next
  Next
   g.DrawPicture(p, 0, 0)

thanks, strangely enough so does fillrect the size of a pixel

Have you tried it using an RGBSurface? its usually much faster than Graphics.Pixel (but not available to all controls)