I'm using this function in a Timer:
IntPtr Handle = FindWindow(null, "Notepad");
if (radioButton1.Checked)
{
using (Graphics g = Graphics.FromHwnd(Handle))
{
Pen PN = new Pen(pictureBox2.BackColor, (Convert.ToInt32(numericUpDown2.Value)));
g.DrawLine(PN, 961, 520, 961, 560);
g.DrawLine(PN, 985, 540, 935, 540);
g.Dispose();
}
}
But the draw is blinking alot even if i set the timer interval to 1