|
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
namespace Creatives.Windows.Controls
{
[ToolboxItem(false),TypeConverter(typeof(ViewTypeConverter))]
public class View : Panel
{
#region Ctor
public View()
{
BackColor = Color.GreenYellow;
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
#endregion
#region Overriden Members
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == 0x0201 /*WM_LBUTTONDOWN*/)
{
if (this.Activated != null)
Activated(this, EventArgs.Empty);
}
}
#endregion
#region Events and Handlers
public event EventHandler Activated;
#endregion
}
}
|
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.