Created
May 11, 2017 15:04
-
-
Save Zolomon/29a68a4c49d800bb5d48b5e524aaca3b to your computer and use it in GitHub Desktop.
Draw shenanigans to the screen!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Picasso | |
| { | |
| class Program | |
| { | |
| [DllImport("user32.dll")] | |
| static extern IntPtr GetDC(IntPtr hWnd); | |
| [DllImport("gdi32.dll", ExactSpelling = true, PreserveSig = true, SetLastError = true)] | |
| static extern bool Ellipse(IntPtr hdc, int nLeftRect, int nTopRect, | |
| int nRightRect, int nBottomRect); | |
| static void Main(string[] args) | |
| { | |
| var dc = GetDC((IntPtr)0); | |
| while (true) | |
| { | |
| Ellipse(dc, 10, 10, 200, 200); | |
| } | |
| // Cheers, zol :D | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment