デスクトップ上に直接サークルを描画するサンプルです。
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
class Program {
[DllImport("User32.dll")]
static extern IntPtr GetDC(IntPtr hwnd);
[DllImport("User32.dll")]
static extern void ReleaseDC(IntPtr hwnd, IntPtr dc);
static void Main(string[] args) {
IntPtr desktopDC = GetDC(IntPtr.Zero);
using (Graphics g = Graphics.FromHdc(desktopDC)) {
g.FillEllipse(System.Drawing.Brushes.Red, 100, 100, 30, 30);
}
ReleaseDC((IntPtr.Zero, desktopDC);
}
}