Color of a screen pixel: Difference between revisions

Content added Content deleted
Line 77: Line 77:


=={{header|F_Sharp|F#}}==
=={{header|F_Sharp|F#}}==
The C# example copies the entire screen into our private bitmap but that's unnecessary. All we need is the single pixel. Also, it doesn't appear that the bitmap and graphics object are being disposed of there. Other than that, this is essentially identical to that solution.
<lang fsharp>open System.Drawing
<lang fsharp>open System.Drawing
open System.Windows.Forms
open System.Windows.Forms
Line 90: Line 89:
let GetPixelAtMouse () =
let GetPixelAtMouse () =
let pt = Cursor.Position
let pt = Cursor.Position
GetPixel pt.X pt.Y
GetPixel pt.X pt.Y</lang>
</lang>


=={{header|C++/CLI}}==
=={{header|C++/CLI}}==