📄 formcaptionicon.cs
字号:
namespace Imps.Client.Pc.BizControls
{
using System;
using System.Drawing;
using System.Windows.Forms;
public class formCaptionIcon : WndlessImage
{
public override bool MouseClick(EventArgs e)
{
if ((base._menustrip != null) && base.Visible)
{
base._menustrip.Show(base._parent, new Point(base.Left, base.Bottom));
}
return true;
}
public override bool NcMouseDblClick(Graphics g, Point pt)
{
EventArgs e = new EventArgs();
return base.RaiseDoubleClick(base._parent, e);
}
public override bool OnNcMouseDown(Graphics g, Point pt, MouseButtons button)
{
if ((button == MouseButtons.Left) && (base._menustrip != null))
{
base._menustrip.Show(base._parent, new Point(base.Left, 0));
}
return true;
}
public override void OnNcPaint(Graphics g, Rectangle clipRectangle)
{
if (base.Visible && base.NonClientArea)
{
if (base._image == null)
{
Form form = base._parent as Form;
base._image = Bitmap.FromHicon(form.Icon.Handle);
}
base.OnPaint(g, clipRectangle);
}
}
public override void OnPaint(Graphics g, Rectangle clipRectangle)
{
if (base.Visible && !base.NonClientArea)
{
if (base._image == null)
{
Form form = base._parent as Form;
base._image = Bitmap.FromHicon(form.Icon.Handle);
}
base.OnPaint(g, clipRectangle);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -