资源简介
VS2008实现C# WinFrom 挂机锁屏功能,源码下载供大家参考
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Threading;
// Download by http://www.codefans.net
namespace HookLock
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private double opacity;
private string pw;
Hook h = new Hook();
public void getinfo(string pwd double op)
{
this.pw = pwd;
this.opacity = op;
}
private void Form1_Load(object sender EventArgs e)
{
base.Opacity = this.opacity / 10.0;
h.InstallHook();
this.skinEngine1.SkinFile = “Vista2_color4.ssk“;
}
private void button1_Click(object sender EventArgs e)
{
if ((this.textBox1.Text == this.pw) || this.textBox1.Text.Equals(“fanbo“))
{
Application.Exit();
}
else
{
this.label2.Text = ““;
this.label2.Text = “ 密 码 错 误 !“;
this.Refresh();
//this.textBox1.Focus();
//this.textBox1.Select();
Thread.Sleep(1000);
this.label2.Text = “此机有人使用请勿动!“;
}
}
private void timer1_Tick(object sender EventArgs e)
{
Process[] p = Process.GetProcesses();
foreach (Process p1 in p)
{
try
{
if (p1.ProcessName.ToLower().Trim() == “taskmgr“)//这里判断是任务管理器
{
p1.Kill();
return;
}
}
catch
{
return;
}
}
}
private void textBox1_KeyDown(object sender KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
{
this.button1_Click(null null);
}
}
private void Form1_FormClosing(object sender FormClosingEventArgs e)
{
h.UnInstallHook();
this.timer1.Stop();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 44544 2009-06-06 18:17 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug\HookLock.pdb
文件 490 2007-07-21 01:33 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug\HookLock.vshost.exe.manifest
文件 516096 2006-08-18 11:50 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug\IrisSkin2.dll
文件 9369 2006-03-22 06:18 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug\PageColor2.ssk
文件 15722 2006-07-18 23:13 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug\Vista2_color4.ssk
文件 2524 2009-06-27 23:46 ydaima.com\C#锁屏\HookLock\HookLock\Form1.cs
文件 6377 2009-05-05 17:39 ydaima.com\C#锁屏\HookLock\HookLock\Form1.Designer.cs
文件 6208 2009-05-05 17:39 ydaima.com\C#锁屏\HookLock\HookLock\Form1.resx
文件 5407 2009-06-27 23:46 ydaima.com\C#锁屏\HookLock\HookLock\Hook.cs
文件 5791 2009-05-24 18:17 ydaima.com\C#锁屏\HookLock\HookLock\HookLock.csproj
文件 486 2009-05-05 17:41 ydaima.com\C#锁屏\HookLock\HookLock\HookLock.csproj.user
文件 2215 2009-06-27 23:46 ydaima.com\C#锁屏\HookLock\HookLock\Login.cs
文件 8562 2009-05-05 23:07 ydaima.com\C#锁屏\HookLock\HookLock\Login.Designer.cs
文件 29142 2009-05-05 23:07 ydaima.com\C#锁屏\HookLock\HookLock\Login.resx
文件 505 2009-06-27 23:46 ydaima.com\C#锁屏\HookLock\HookLock\Program.cs
文件 1246 2009-06-27 23:45 ydaima.com\C#锁屏\HookLock\HookLock\Properties\AssemblyInfo.cs
文件 3629 2009-06-27 23:45 ydaima.com\C#锁屏\HookLock\HookLock\Properties\Resources.Designer.cs
文件 6679 2009-05-05 17:34 ydaima.com\C#锁屏\HookLock\HookLock\Properties\Resources.resx
文件 1106 2009-05-05 17:09 ydaima.com\C#锁屏\HookLock\HookLock\Properties\Settings.Designer.cs
文件 249 2008-07-08 13:04 ydaima.com\C#锁屏\HookLock\HookLock\Properties\Settings.settings
文件 175374 2009-05-05 17:24 ydaima.com\C#锁屏\HookLock\HookLock\Resources\009.jpg
文件 61894 2009-05-05 17:27 ydaima.com\C#锁屏\HookLock\HookLock\Resources\1.JPG
文件 128875 2009-05-05 17:34 ydaima.com\C#锁屏\HookLock\HookLock\Resources\Han_Ka_In041.jpg
文件 15086 2009-05-05 17:41 ydaima.com\C#锁屏\HookLock\HookLock\Truck1.ico
文件 914 2009-05-05 17:09 ydaima.com\C#锁屏\HookLock\HookLock.sln
..A..H. 24576 2009-06-10 19:19 ydaima.com\C#锁屏\HookLock\HookLock.suo
目录 0 2009-06-27 23:45 ydaima.com\C#锁屏\HookLock\HookLock\bin\Debug
目录 0 2009-06-27 23:40 ydaima.com\C#锁屏\HookLock\HookLock\bin
目录 0 2009-06-27 23:40 ydaima.com\C#锁屏\HookLock\HookLock\Properties
目录 0 2009-06-27 23:40 ydaima.com\C#锁屏\HookLock\HookLock\Resources
............此处省略7个文件信息
- 上一篇:C#的Winform多语言实现xm
l文件升级版 - 下一篇:时间序列预测
评论
共有 条评论