110,545
社区成员
发帖
与我相关
我的任务
分享
private void InitializeComponent()
{
LinkLabel lkBlog = new LinkLabel();
this.SuspendLayout();
//
// Designer
//
this.Name = "Designer";
this.MouseLeave += new System.EventHandler(this.Designer_MouseLeave);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.Designer_Paint);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Designer_MouseMove);
this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Designer_MouseDoubleClick);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Designer_MouseDown);
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Designer_KeyPress);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Designer_MouseUp);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Designer_KeyDown);
this.KeyUp += new KeyEventHandler(Designer_KeyUp);
lkBlog.Location = new Point(10, 10);
lkBlog.AutoSize = true;
lkBlog.Text = "My Blog:http://blog.csdn.net/dunao(点击访问)";
lkBlog.Click += new EventHandler(lkBlog_Click);
this.Controls.Add(lkBlog);
this.ResumeLayout(false);
}
public class Designer : UserControl
{
public Designer()
{
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);
//SetStyle(ControlStyles.ResizeRedraw, true);
this.BorderStyle = BorderStyle.FixedSingle;
InitializeComponent();
//设计文本编辑时textbox的属性
textBox.Visible = false;
textBox.Enabled = false;
textBox.BorderStyle = BorderStyle.None;
textBox.Multiline = true;
#if DEMO
#endif
this.Controls.Add(textBox);
this.AllowDrop = true;
this.BackColor = Color.White;
activeTool = new ToolBase();
_items = new DrawItemList();
}