diff --git a/USB Lockdown/lockScreen.cs b/USB Lockdown/lockScreen.cs index 542bad2..184a5fa 100644 --- a/USB Lockdown/lockScreen.cs +++ b/USB Lockdown/lockScreen.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Runtime.InteropServices; - +using System.Diagnostics; namespace USB_Lockdown { public partial class lockScreen : Form @@ -26,24 +26,43 @@ namespace USB_Lockdown } - private void setupWindow() { this.StartPosition = FormStartPosition.CenterScreen; this.Height = SystemInformation.VirtualScreen.Height; this.Width = SystemInformation.VirtualScreen.Width; - this.WindowState = FormWindowState.Maximized; this.BackColor = Color.Black; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; SetForegroundWindow(this.Handle); + this.ShowInTaskbar = false; + foregroundTimer.Start(); + Taskbar.Hide(); + problemWindows(true); } private void onClosing(object sender, FormClosingEventArgs e) { - if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; } //disables alt+F4 + Taskbar.Show(); + return; + //if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; } //disables alt+F4 } private void keepForeground(object sender, EventArgs e) { SetForegroundWindow(this.Handle); } + + private void button1_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void problemWindows(bool state) + { + if (state) + { + //Process[] processList = Process.GetProcessesByName("displayfusion"); + //button1.Text = (processList[0].); + } + + } } }