using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HXX.Scanner.Biz.twain32.form { public partial class frmHandler : Form { public frmHandler() { InitializeComponent(); } private void frmHandler_Load(object sender, EventArgs e) { try { //窗体最小化显示 this.WindowState = FormWindowState.Minimized; //不显示在任务栏中 this.ShowInTaskbar = false; this.Visible = false; } catch (Exception ee) { } } /// /// 让程序不显示在alt+Tab视图窗体中 /// protected override CreateParams CreateParams { get { const int WS_EX_APPWINDOW = 0x40000; const int WS_EX_TOOLWINDOW = 0x80; CreateParams cp = base.CreateParams; cp.ExStyle &= (~WS_EX_APPWINDOW); // 不显示在TaskBar cp.ExStyle |= WS_EX_TOOLWINDOW; // 不显示在Alt+Tab return cp; } } private void frmHandler_Activated(object sender, EventArgs e) { } } }