嗯,仅仅覆盖Form.ShowWithoutActivation还不够吗?
protected override bool ShowWithoutActivation{ get { return true; }}
而且,如果您也不希望用户单击此通知窗口,则可以覆盖CreateParams:
protected override CreateParams CreateParams{ get { CreateParams baseParams = base.CreateParams; const int WS_EX_NOACTIVATE = 0x08000000; const int WS_EX_TOOLWINDOW = 0x00000080; baseParams.ExStyle |= ( int )( WS_EX_NOACTIVATE | WS_EX_TOOLWINDOW ); return baseParams; }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)