Color of a screen pixel: Difference between revisions
Content added Content deleted
m (removed PHP from the omit list) |
No edit summary |
||
Line 321:
{{omit from|PostScript}}
{{omit from|R}}
=={{header|Visual Basic .NET}}==
<lang vbnet> Private Function GetPixelColor(ByVal Location As Point) As Color
Dim b As New Bitmap(1, 1)
Dim g As Graphics = Graphics.FromImage(b)
g.CopyFromScreen(Location, Point.Empty, New Size(1, 1))
Return b.GetPixel(0, 0)
End Function</lang>
|