Source/PopupContainerControl.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Windows.Forms;
using System.Drawing;
namespace DevComponents.DotNetBar
{
	/// <summary>
	/// Summary description for PopupContainer.
	/// </summary>
	[System.ComponentModel.ToolboxItem(false),System.ComponentModel.DesignTimeVisible(false)]
	public class PopupContainerControl:UserControl
	{
		private BaseItem m_Parent=null;
		private bool m_DesignMode=false;
		private object m_Owner;
		private Point m_ParentScreenPos=Point.Empty;
		private PopupShadow m_DropShadow=null;

		public PopupContainerControl()
		{
			this.Font=System.Windows.Forms.SystemInformation.MenuFont.Clone() as Font;
			this.SetStyle(ControlStyles.Selectable,false);
			//this.ControlBox=false;
			//this.MinimizeBox=false;
			//this.MaximizeBox=false;
			//this.Text="";
		}

		protected override void Dispose(bool disposing)
		{
			if(m_DropShadow!=null)
			{
				m_DropShadow.Hide();
				m_DropShadow.Dispose();
				m_DropShadow=null;
			}
			base.Dispose(disposing);
		}

		protected override CreateParams CreateParams
		{
			get
			{
				CreateParams p=base.CreateParams;
				p.Style=unchecked((int)(NativeFunctions.WS_POPUP | NativeFunctions.WS_CLIPSIBLINGS | NativeFunctions.WS_CLIPCHILDREN));
				p.ExStyle=(int)(NativeFunctions.WS_EX_TOPMOST | NativeFunctions.WS_EX_TOOLWINDOW);
				p.Caption="";
				return p;
			}
		}

		protected override void WndProc(ref Message m)
		{
			if(m.Msg==NativeFunctions.WM_MOUSEACTIVATE)
			{
				m.Result=new System.IntPtr(NativeFunctions.MA_NOACTIVATE);
				return;
			}
			base.WndProc(ref m);
		}

后面还有 259 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。