|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace IuSpy
{
public partial class Highlighter : Form
{
public Highlighter()
{
InitializeComponent();
}
public void SizeFromWindow(Iu.Windows.CWindow win)
{
this.Bounds = win.DesktopBounds;
}
private void Highlighter_Paint(object sender, PaintEventArgs e)
{
Rectangle rect = e.ClipRectangle;
if (this.Left < 0 && this.Top < 0 && this.Height > Screen.PrimaryScreen.WorkingArea.Height && this.Width > Screen.PrimaryScreen.WorkingArea.Width)
{
rect.Size = Screen.PrimaryScreen.WorkingArea.Size;
rect.X = Screen.PrimaryScreen.WorkingArea.Left - this.Left;
rect.Y = Screen.PrimaryScreen.WorkingArea.Top - this.Top;
}
rect.X++;
rect.Y++;
rect.Width -= 2;
rect.Height -= 2;
e.Graphics.DrawRectangle(new Pen(Color.Red, 2), rect);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.