Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的表单上绘制 1px 点
例子:
1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite 1pxBlack 1pxwhite
您可以使用setPixel
setPixel
Dim bmp As New Bitmap(Me.Width, Me.Height) For y = 0 To Me.Height - 1 For x = 0 To Me.Width - 1 If x Mod 2 = 0 And y Mod 2 = 0 Then bmp.SetPixel(x, y, Color.Black) Else bmp.SetPixel(x, y, Color.White) End If Next Next Me.BackgroundImage = bmp