منبع:https://barnamenevis.org/showpo...2&postcount=46
کد:
Private Function CreateBitmap() As Image
Dim flag As Bitmap = New System.Drawing.Bitmap(10, 10)
Dim x, y As Integer
For x = 0 To flag.Height
For y = 0 To flag.Width
flag.SetPixel(x, y, Color.White)
Next
Next
For x = 0 To flag.Height
flag.SetPixel(x, x, Color.Red)
Next
Return flag
End Function