自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(262)
  • 资源 (296)
  • 收藏
  • 关注

原创 驻沈阳韩国总领事馆 - 签证结果查询网址

http://chn-shenyang.mofat.go.kr/cn/visa/result.php

2013-05-15 08:53:07 14447 1

原创 个人旅游

韩国旅游:2009年01月20日2009年09月27日2011年02月01日2012年01月21日2013年02月07日2013年03月17日

2013-03-27 16:17:07 1324

转载 用 DATEDIF函数 计算两个日期之间的年\月\日间隔数

语法DATEDIF(start_date,end_date,unit)Start_date 为一个日期,它代表时间段内的第一个日期或起始日期。End_date 为一个日期,它代表时间段内的最后一个日期或结束日期。Unit 为所需信息的返回类型。Unit 返回注:结束日期必须大于起始日期下面举个小例子:在日常工作中非常实用。 假如A1单元格写的也是一个日期,那么下面的

2013-02-05 13:41:55 5123

原创 신발시이즈 환산

중국 신발 옛사이즈 길이 간격  1 호  (5밀리미터 차이).男鞋尺码对照表US Men's66.577.588.599.510​英码(UK)5.

2013-01-30 12:20:11 1091

原创 bat & C# CLIPIMAGE

@echo offset "dnfpath=%systemroot%\Microsoft.NET\Framework"for /f "delims=" %%v in ('dir /ad /b %dnfpath%\v?.*') do (         if exist "%dnfpath%\%%v\csc.exe" set "cscpath=%dnfpath%\%%v\csc.exe"

2012-06-04 11:58:36 420

原创 如何截屏然后保存到图片文件

@echo offset "dnfpath=%systemroot%\Microsoft.NET\Framework"for /f "delims=" %%v in ('dir /ad /b %dnfpath%\v?.*') do (         if exist "%dnfpath%\%%v\csc.exe" set "cscpath=%dnfpath%\%%v\csc.exe"

2012-06-03 17:34:35 1235

原创 DOS 命令打开文件及网页

@echo off@start explorer.exe "%userprofile%\Local Settings\Temporary Internet Files"@start explorer.exe "%userprofile%\Local Settings\Temporary Internet Files\Content.MSO"@start explorer.exe "%u

2012-05-07 15:50:41 1237

原创 韩语初级网站

http://china.korean-culture.org/common/china/lecture/lecture.html

2012-01-08 14:15:24 415

原创 大韩民国驻中国大使馆

确认签证审查结果 http://chn-shenyang.mofat.go.kr/cn/visa/result.php

2012-01-08 12:49:59 1293

原创 C# 截图代码

using System;using System.Threading;using System.Windows.Forms;namespace ClipImage{    static class Program    {        [STATh

2011-09-25 14:05:36 484

原创 获取英文大写字母附加数字的新编号

using System.Data;using System.Linq;/// /// 根据视图获取自动编号。/// /// /// /// #regionpublic static string GetNewID(this DataView

2011-09-25 14:03:36 564

原创 设置MDI窗体

using System.Windows.Forms;private void SetMdiParent(Form frame){    frame.MdiParent = this;    // 设置此窗体的当前多文档界面 (MDI) 父窗体。    frame

2011-09-25 14:01:19 723

原创 C# 获取颜色集

using System.Drawing;using System.Linq;colorComboBox.BeginUpdate();foreach (KnownColor kc in Enum.GetValues(typeof(KnownColor))){

2011-09-25 14:00:20 1386

原创 用C#实现图片存储与读取数据库

/*use mastergoif DB_ID('UserImage') is not null   drop database UserImagecreate database UserImagegouse UserImagegocreate table Images(Image_Name nvarchar(255) primary key,Imag

2011-09-25 13:55:49 669

原创 系统待机方法 Application.SetSuspendState

using System;using System.Windows.Forms;namespace ProductManager{    public partial class FormPowerState : Form    {        publ

2011-09-25 13:54:17 1202

原创 绑定 CheckedListBox 控件

using System.Data;using System.Data.SqlClient;using System.Linq;public void LoadName(string value){    try    {        SqlComm

2011-09-25 13:53:27 372

原创 在RichTextBox 控件中更改字体样式

using System.Windows.Forms;private void FormNotepad_Load(object sender, EventArgs e){    fontNameComboBox.ComboBox.DataSource = Syst

2011-09-25 13:52:40 1393

原创 System.IO.FileSystemWatcher

using System.IO;using System.Text;private StringBuilder sbTitle = new StringBuilder("窗口标题为闪烁效果!        ");private FileSystemWatcher fi

2011-09-25 13:51:54 584

原创 仿 Window 做的属性窗体

using System;using System.Drawing;using System.IO;using System.Windows.Forms;namespace DIYWordpad{    public partial class FormA

2011-09-25 13:50:50 318

原创 WinForm 中禁用窗体的关闭按钮

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class FormNoClose : Form    {        public FormN

2011-09-25 13:45:15 496

原创 WinForm 设置窗体在桌面区域全屏显示

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        public Form1()

2011-09-25 13:43:42 1441

原创 WinForm 禁止拖动窗体

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        public Form1()

2011-09-25 13:41:33 3309

原创 c# 文本框只能输入数字

using System.Windows.Forms;namespace WindowsFormsApplication1{    class DigitTextBox : TextBox    {        protected override Crea

2011-09-25 13:40:46 409

原创 C# 将Word文档格式转化成写字板格式

using System;using System.IO;using System.Windows.Forms;using Word = Microsoft.Office.Interop.Word;namespace WinFormWord{    pub

2011-09-25 13:38:05 379

原创 C# 修改系统本地时间

using System;using System.Runtime.InteropServices;using System.Windows.Forms;namespace SystemTime{    public partial class FormLoc

2011-09-25 13:37:10 1407

原创 MS-DOS 批处理清理垃圾文件

@echo offcolor 9etitle %username%del /f /q "%windir%\*.tmp"del /f /q "%windir%\*.log"del /f /q "%userprofile%\Recent\*.lnk"del /f /q "%appdata%\Microsoft\Office\Recent\*.lnk"rd /s /q %te

2011-09-25 13:35:06 639

原创 C# WindowsMediaPlayer 播放器

using System;using System.Drawing;using System.Globalization;using System.IO;using System.Text.RegularExpressions;using System.Win

2011-09-25 13:32:35 952

原创 ListView 自动调整列宽

using System;using System.Drawing;using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : F

2011-09-25 13:31:15 2311

原创 C# 显示已经运行程序的主界面

// Program.csusing System;using System.Threading;using System.Windows.Forms;using System.Runtime.InteropServices;using Microsoft.W

2011-09-25 13:29:31 1015

原创 C# 理清理垃圾文件

using System;using System.Runtime.InteropServices;using System.Threading;using System.Windows.Forms;using Microsoft.Win32;namespac

2011-09-25 13:28:08 1127

原创 C# 获取或设置文件属性

using System.ComponentModel;using System.IO;using System.Windows.Forms;namespace WinFormFile{    public partial class FormProperty

2011-09-25 13:25:42 1069

原创 C# 批量重命名文件

using System;using System.Drawing;using System.Globalization;using System.IO;using System.Linq;using System.Runtime.InteropService

2011-09-25 13:23:56 653 1

原创 C# 绘制时钟

using System;using System.Drawing;using System.Drawing.Drawing2D;using System.Windows.Forms;namespace WinFormClock{    public pa

2011-09-25 13:23:09 1197

原创 C# 复制 IE 缓存文件

using System;using System.Collections.Specialized;using System.Diagnostics;using System.Globalization;using System.IO;using System

2011-09-25 13:21:48 440

原创 WinForm 窗体屏蔽关闭按钮事件

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        public Form1()

2011-09-25 13:16:46 706

原创 WinForm 窗体屏蔽Alt+F4

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        public Form1()

2011-09-25 13:15:53 1251

原创 TextBox 控件自定义快捷键

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        private TextBox te

2011-09-25 13:14:46 648

原创 ComboBox 自动调整组合框下拉部分的宽度

using System;using System.Drawing;using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : F

2011-09-25 13:13:58 1027

原创 MaskedTextBox 控件自定义快捷键

using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        private MaskedText

2011-09-25 13:12:58 449

原创 C# 获取对象超链接

using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication1{    public partial class Form1 : Form    {

2011-09-25 13:12:12 651

C#WinFormImage.rar

C#WinFormImage.rarC#WinFormImage.rar

2010-03-26

LINQ to ListControl.txt

LINQ to ListControl.txt

2010-03-24

WinFormMDI-Image.rar

WinFormMDI-Image.rarWinFormMDI-Image.rar

2010-03-24

Image-Access.rar

Image-Access.rarImage-Access.rarImage-Access.rar

2010-03-24

FormMDI.csFormMDI.csFormMDI.cs

FormMDI.csFormMDI.csFormMDI.csFormMDI.cs

2010-03-23

C# 浏览图片C# 浏览图片

C# 浏览图片C# 浏览图片C# 浏览图片

2010-03-23

WinFormImageWinFormImageWinFormImage

WinFormImageWinFormImageWinFormImageWinFormImage

2010-03-18

C# 绘制时钟程序源代码

C# 绘制时钟程序C# 绘制时钟程序C# 绘制时钟程序

2010-03-18

C# 绘制时钟C# 绘制时钟

C# 绘制时钟C# 绘制时钟C# 绘制时钟

2010-03-17

C# 图片存储到剪贴板里

C# 图片存储到剪贴板里C# 图片存储到剪贴板里C# 图片存储到剪贴板里

2010-03-17

C# 动画窗体AnimateWindow

C# 动画窗体AnimateWindow

2010-03-17

DIYShutDown.rar.rar

DIYShutDown.DIYShutDown.rarrarDIYShutDown.rar

2010-03-17

C# 图片管理C# 图片管理

C# 图片管理C# 图片管理C# 图片管理C# 图片管理

2010-03-16

WinFormImage.rarWinFormImage.rarWinFormImage.rar

WinFormImage.rarWinFormImage.rarWinFormImage.rar

2010-03-16

ImageSQL.rarImageSQL.rarImageSQL.rar

ImageSQL.rarImageSQL.rarImageSQL.rarImageSQL.rar

2010-03-15

WebOLEDB.rarWebOLEDB.rarWebOLEDB.rar

WebOLEDB.rarWebOLEDB.rarWebOLEDB.rarWebOLEDB.rar

2010-03-15

C# 图片管理C# 图片管理C# 图片管理

C# 图片管理C# 图片管理C# 图片管理C# 图片管理

2010-03-14

录音机录音机录音机.rar

录音机.rar录音机.rar录音机.rar

2010-03-13

C# 创建Access数据库表

C# 创建Access数据库表C# 创建Access数据库表

2010-03-10

ImageAccess.ImageAccess.ImageAccess.

ImageAccess.rarImageAccess.rarImageAccess.rar

2010-03-10

EXCEL 快捷键和公式

EXCEL 快捷键和公式EXCEL 快捷键和公式EXCEL 快捷键和公式

2011-09-04

excel 技巧及快捷键

excel 技巧及快捷键 excel 技巧及快捷键 excel 技巧及快捷键 excel 技巧及快捷键

2011-07-10

清空剪贴板清空剪贴板

清空剪贴板清空剪贴板清空剪贴板清空剪贴板

2011-06-12

锁屏.reg锁屏.reg

锁屏.reg锁屏.reg锁屏.reg锁屏.reg锁屏.reg锁屏.reg

2011-06-12

用arp 绑定IP和MAC地址

用arp 绑定IP和MAC地址用arp 绑定IP和MAC地址用arp 绑定IP和MAC地址用arp 绑定IP和MAC地址用arp 绑定IP和MAC地址

2010-10-30

C# 日程安排表,定时关机,截图工具,阴阳历互转

C# 日程安排表,定时关机,截图工具,阴阳历互转C# 日程安排表,定时关机,截图工具,阴阳历互转C# 日程安排表,定时关机,截图工具,阴阳历互转

2010-06-29

c# 日程安排表c# 日程安排表

c# 日程安排表c# 日程安排表c# 日程安排表

2010-06-21

C# 定时关机,开机,锁机

C# 定时关机,开机,锁机C# 定时关机,开机,锁机C# 定时关机,开机,锁机C# 定时关机,开机,锁机

2010-06-21

using System;using System;using System;

using System; using System.IO; using System.Text.RegularExpressions; using System.Windows.Forms; using Microsoft.Win32; namespace MRU { public partial class FormMRU : Form { public FormMRU() { #region InitializeComponent(); ListView listViewMRU = new ListView(); listViewMRU.Dock = DockStyle.Fill; listViewMRU.HeaderStyle = ColumnHeaderStyle.None; // 隐藏列标题。 listViewMRU.View = View.Details; // 详细信息。 listViewMRU.CheckBoxes = true; // 显示复选框。 listViewMRU.Scrollable = false; // 隐藏滚动条。 listViewMRU.ShowGroups = true; // 分组显示项。 listViewMRU.BeginUpdate(); ListViewGroup pro = listViewMRU.Groups.Add("profile", "profile"); listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.Recent)).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.Cookies)).Group = pro; listViewMRU.Items.Add(Path.GetTempPath()).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.History)).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)).Group = pro; ListViewGroup reg = listViewMRU.Groups.Add("regedit", "regedit"); listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Paint").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Wordpad").Group = reg; ColumnHeader column = listViewMRU.Columns.Add(""); column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); // 自动调整列宽。 listViewMRU.EndUpdate(); listViewMRU.ItemChecked += new ItemCheckedEventHandler(listViewMRU_ItemChecked); this.Controls.Add(listViewMRU); this.ClientSize = new System.Drawing.Size(column.Width + 8, 260); this.Text = Environment.UserName; this.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 禁用手动调整大小。 this.SizeGripStyle = SizeGripStyle.Hide; // 隐藏调整大小手柄。 this.StartPosition = FormStartPosition.CenterScreen; // 在桌面居中显示。 #endregion } #region ListView_ItemChecked private void listViewMRU_ItemChecked(object sender, ItemCheckedEventArgs e) { if (!e.Item.Checked) return; DirectoryInfo dir = new DirectoryInfo(e.Item.Text); switch (e.Item.Index) { case 0: case 1: foreach (FileInfo info in dir.GetFiles()) { if (Regex.IsMatch(info.Extension, @".(dat|ini)", RegexOptions.IgnoreCase)) // 指定不区分大小写的匹配。 continue; this.Text = info.Name; info.Delete(); } break; case 2: foreach (FileSystemInfo info in dir.GetFileSystemInfos()) { try { if (info is FileInfo) info.Delete(); else (info as DirectoryInfo).Delete(true); } catch { continue; } finally { this.Text = info.Name; } } break; case 3: System.Diagnostics.Process.Start(e.Item.Text); break; case 4: foreach (FileInfo info in dir.GetFiles("*.*", SearchOption.AllDirectories)) { if (Regex.IsMatch(info.Extension, @".(dat|ini)", RegexOptions.IgnoreCase)) // 指定不区分大小写的匹配。 continue; try { info.Delete(); } catch { continue; } finally { this.Text = info.Name; } } break; case 5: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\TypedURLs")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 6: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 7: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32")) { foreach (string mru in subKey.GetSubKeyNames()) { subKey.DeleteSubKeyTree(mru); } } break; case 8: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 9: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Applets\Wordpad\Recent File List")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; } this.Text = Environment.UserName; } #endregion } }using System; using System.IO; using System.Text.RegularExpressions; using System.Windows.Forms; using Microsoft.Win32; namespace MRU { public partial class FormMRU : Form { public FormMRU() { #region InitializeComponent(); ListView listViewMRU = new ListView(); listViewMRU.Dock = DockStyle.Fill; listViewMRU.HeaderStyle = ColumnHeaderStyle.None; // 隐藏列标题。 listViewMRU.View = View.Details; // 详细信息。 listViewMRU.CheckBoxes = true; // 显示复选框。 listViewMRU.Scrollable = false; // 隐藏滚动条。 listViewMRU.ShowGroups = true; // 分组显示项。 listViewMRU.BeginUpdate(); ListViewGroup pro = listViewMRU.Groups.Add("profile", "profile"); listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.Recent)).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.Cookies)).Group = pro; listViewMRU.Items.Add(Path.GetTempPath()).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.History)).Group = pro; listViewMRU.Items.Add(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)).Group = pro; ListViewGroup reg = listViewMRU.Groups.Add("regedit", "regedit"); listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Paint").Group = reg; listViewMRU.Items.Add(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Wordpad").Group = reg; ColumnHeader column = listViewMRU.Columns.Add(""); column.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); // 自动调整列宽。 listViewMRU.EndUpdate(); listViewMRU.ItemChecked += new ItemCheckedEventHandler(listViewMRU_ItemChecked); this.Controls.Add(listViewMRU); this.ClientSize = new System.Drawing.Size(column.Width + 8, 260); this.Text = Environment.UserName; this.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 禁用手动调整大小。 this.SizeGripStyle = SizeGripStyle.Hide; // 隐藏调整大小手柄。 this.StartPosition = FormStartPosition.CenterScreen; // 在桌面居中显示。 #endregion } #region ListView_ItemChecked private void listViewMRU_ItemChecked(object sender, ItemCheckedEventArgs e) { if (!e.Item.Checked) return; DirectoryInfo dir = new DirectoryInfo(e.Item.Text); switch (e.Item.Index) { case 0: case 1: foreach (FileInfo info in dir.GetFiles()) { if (Regex.IsMatch(info.Extension, @".(dat|ini)", RegexOptions.IgnoreCase)) // 指定不区分大小写的匹配。 continue; this.Text = info.Name; info.Delete(); } break; case 2: foreach (FileSystemInfo info in dir.GetFileSystemInfos()) { try { if (info is FileInfo) info.Delete(); else (info as DirectoryInfo).Delete(true); } catch { continue; } finally { this.Text = info.Name; } } break; case 3: System.Diagnostics.Process.Start(e.Item.Text); break; case 4: foreach (FileInfo info in dir.GetFiles("*.*", SearchOption.AllDirectories)) { if (Regex.IsMatch(info.Extension, @".(dat|ini)", RegexOptions.IgnoreCase)) // 指定不区分大小写的匹配。 continue; try { info.Delete(); } catch { continue; } finally { this.Text = info.Name; } } break; case 5: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Internet Explorer\TypedURLs")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 6: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 7: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32")) { foreach (string mru in subKey.GetSubKeyNames()) { subKey.DeleteSubKeyTree(mru); } } break; case 8: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Applets\Paint\Recent File List")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; case 9: using (RegistryKey subKey = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Applets\Wordpad\Recent File List")) { foreach (string mru in subKey.GetValueNames()) { subKey.DeleteValue(mru); } } break; } this.Text = Environment.UserName; } #endregion } }

2010-05-23

作者:金哲显编的软件

using System; using System.Drawing; using System.Windows.Forms; namespace ClipImage { public partial class FormImage : Form { #region private Point position; private Rectangle clip; #endregion public FormImage() { #region InitializeComponent(); this.TopMost = true; // 前端显示。 this.ShowInTaskbar = false; // 在 Windows 任务栏中隐藏窗体。 this.DoubleBuffered = true; // 双缓冲绘制图形。 this.FormBorderStyle = FormBorderStyle.None; // 窗体无边框。 this.Bounds = Screen.GetBounds(this); // 获取显示器的桌面区域。 this.TransparencyKey = this.BackColor; // 窗体背景透明化。 NotifyIcon notify = new NotifyIcon(); notify.Visible = true; // 图标在任务栏的通知区域中可见。 notify.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath); // 启动程序图标。 notify.Text = AppDomain.CurrentDomain.FriendlyName; // 启动程序名称。 notify.MouseClick += new MouseEventHandler(notify_MouseClick); #endregion } #region OnMouseDown protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); switch (e.Button) { case MouseButtons.Left: position = e.Location; // 设置起始位置。 break; case MouseButtons.Right: if (clip.Width > 1 && clip.Height > 1) { clip.Offset(1, 1); // 平移。 using (Bitmap bmp = new Bitmap(--clip.Width, --clip.Height)) using (Graphics g = Graphics.FromImage(bmp)) { g.CopyFromScreen(clip.Location, Point.Empty, clip.Size); // 截图。 bmp.Save("Image.png", bmp.RawFormat); // 保存图片。 Clipboard.SetImage(bmp); // 图片存储到剪贴板中。 } System.Diagnostics.Process.Start("mspaint.exe", "Image.png"); // 用画图打开图片。 } clip = Rectangle.Empty; BackgroundImage.Dispose(); BackgroundImage = null; break; } } #endregion #region OnMouseMove protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (e.Button == MouseButtons.Left) { clip.X = Math.Min(position.X, e.X); clip.Y = Math.Min(position.Y, e.Y); clip.Width = Math.Abs(position.X - e.X); clip.Height = Math.Abs(position.Y - e.Y); this.Refresh(); // 立即重绘图形。 } } #endregion #region OnPaint protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); e.Graphics.DrawRectangle(Pens.Red, clip); e.Dispose(); } #endregion #region NotifyIcon private void notify_MouseClick(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Left: this.BackgroundImage = new Bitmap(this.Width, this.Height); using (Graphics g = Graphics.FromImage(this.BackgroundImage)) { g.CopyFromScreen(Point.Empty, Point.Empty, this.Size); } this.Activate(); // 激活窗体并给予它焦点。 break; case MouseButtons.Right: (sender as NotifyIcon).Dispose(); Application.Exit(); break; } } #endregion } }

2010-05-08

namespace MSExcel

namespace MSExcel { partial class FormExcel { private System.ComponentModel.IContainer components = null; protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 private void InitializeComponent() { this.buttonOpen = new System.Windows.Forms.Button(); this.buttonSave = new System.Windows.Forms.Button(); this.groupOpen = new System.Windows.Forms.GroupBox(); this.maskedTextVOpen = new System.Windows.Forms.MaskedTextBox(); this.label1 = new System.Windows.Forms.Label(); this.maskedTextOpen = new System.Windows.Forms.MaskedTextBox(); this.labelOpen = new System.Windows.Forms.Label(); this.groupUpdate = new System.Windows.Forms.GroupBox(); this.maskedTextVUpdate = new System.Windows.Forms.MaskedTextBox(); this.label2 = new System.Windows.Forms.Label(); this.maskedTextUpdate = new System.Windows.Forms.MaskedTextBox(); this.labelUpdate = new System.Windows.Forms.Label(); this.groupOpen.SuspendLayout(); this.groupUpdate.SuspendLayout(); this.SuspendLayout(); // // buttonOpen // this.buttonOpen.Location = new System.Drawing.Point(44, 200); this.buttonOpen.Name = "buttonOpen"; this.buttonOpen.Size = new System.Drawing.Size(75, 23); this.buttonOpen.TabIndex = 10; this.buttonOpen.Text = "打开(&O)"; this.buttonOpen.UseVisualStyleBackColor = true; this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click); // // buttonSave // this.buttonSave.Location = new System.Drawing.Point(173, 200); this.buttonSave.Name = "buttonSave"; this.buttonSave.Size = new System.Drawing.Size(75, 23); this.buttonSave.TabIndex = 11; this.buttonSave.Text = "保存(&S)"; this.buttonSave.UseVisualStyleBackColor = true; this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); // // groupOpen // this.groupOpen.Controls.Add(this.maskedTextVOpen); this.groupOpen.Controls.Add(this.label1); this.groupOpen.Controls.Add(this.maskedTextOpen); this.groupOpen.Controls.Add(this.labelOpen); this.groupOpen.Location = new System.Drawing.Point(8, 8); this.groupOpen.Name = "groupOpen"; this.groupOpen.Size = new System.Drawing.Size(277, 80); this.groupOpen.TabIndex = 0; this.groupOpen.TabStop = false; this.groupOpen.Text = "打开权限密码"; // // maskedTextVOpen // this.maskedTextVOpen.Location = new System.Drawing.Point(80, 50); this.maskedTextVOpen.Mask = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; this.maskedTextVOpen.Name = "maskedTextVOpen"; this.maskedTextVOpen.Size = new System.Drawing.Size(186, 21); this.maskedTextVOpen.TabIndex = 4; this.maskedTextVOpen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(10, 55); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(65, 12); this.label1.TabIndex = 3; this.label1.Text = "确认密码:"; // // maskedTextOpen // this.maskedTextOpen.Location = new System.Drawing.Point(80, 20); this.maskedTextOpen.Mask = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; this.maskedTextOpen.Name = "maskedTextOpen"; this.maskedTextOpen.Size = new System.Drawing.Size(186, 21); this.maskedTextOpen.TabIndex = 2; this.maskedTextOpen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // // labelOpen // this.labelOpen.AutoSize = true; this.labelOpen.Location = new System.Drawing.Point(10, 24); this.labelOpen.Name = "labelOpen"; this.labelOpen.Size = new System.Drawing.Size(65, 12); this.labelOpen.TabIndex = 1; this.labelOpen.Text = "创建密码:"; // // groupUpdate // this.groupUpdate.Controls.Add(this.maskedTextVUpdate); this.groupUpdate.Controls.Add(this.label2); this.groupUpdate.Controls.Add(this.maskedTextUpdate); this.groupUpdate.Controls.Add(this.labelUpdate); this.groupUpdate.Location = new System.Drawing.Point(8, 100); this.groupUpdate.Name = "groupUpdate"; this.groupUpdate.Size = new System.Drawing.Size(277, 80); this.groupUpdate.TabIndex = 5; this.groupUpdate.TabStop = false; this.groupUpdate.Text = "修改权限密码"; // // maskedTextVUpdate // this.maskedTextVUpdate.Location = new System.Drawing.Point(80, 50); this.maskedTextVUpdate.Mask = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; this.maskedTextVUpdate.Name = "maskedTextVUpdate"; this.maskedTextVUpdate.Size = new System.Drawing.Size(186, 21); this.maskedTextVUpdate.TabIndex = 9; this.maskedTextVUpdate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(10, 55); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(65, 12); this.label2.TabIndex = 8; this.label2.Text = "确认密码:"; // // maskedTextUpdate // this.maskedTextUpdate.Location = new System.Drawing.Point(80, 20); this.maskedTextUpdate.Mask = "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"; this.maskedTextUpdate.Name = "maskedTextUpdate"; this.maskedTextUpdate.Size = new System.Drawing.Size(186, 21); this.maskedTextUpdate.TabIndex = 7; this.maskedTextUpdate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // // labelUpdate // this.labelUpdate.AutoSize = true; this.labelUpdate.Location = new System.Drawing.Point(10, 24); this.labelUpdate.Name = "labelUpdate"; this.labelUpdate.Size = new System.Drawing.Size(65, 12); this.labelUpdate.TabIndex = 6; this.labelUpdate.Text = "创建密码:"; // // FormExcel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(293, 246); this.Controls.Add(this.groupUpdate); this.Controls.Add(this.groupOpen); this.Controls.Add(this.buttonSave); this.Controls.Add(this.buttonOpen); this.Name = "FormExcel"; this.groupOpen.ResumeLayout(false); this.groupOpen.PerformLayout(); this.groupUpdate.ResumeLayout(false); this.groupUpdate.PerformLayout(); this.ResumeLayout(false); } #endregion #region private System.Windows.Forms.Button buttonOpen; private System.Windows.Forms.Button buttonSave; private System.Windows.Forms.GroupBox groupOpen; private System.Windows.Forms.GroupBox groupUpdate; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label labelOpen; private System.Windows.Forms.Label labelUpdate; private System.Windows.Forms.MaskedTextBox maskedTextOpen; private System.Windows.Forms.MaskedTextBox maskedTextUpdate; private System.Windows.Forms.MaskedTextBox maskedTextVOpen; private System.Windows.Forms.MaskedTextBox maskedTextVUpdate; #endregion } }

2010-05-05

播放器DIY播放器DIY播放器DIY

播放器DIY播放器DIY播放器DIY播放器DIY

2010-04-29

定时待机,关机,锁机·

定时待机,关机,锁机·定时待机,关机,锁机·

2010-04-29

kingzhexian ko-kr

kingzhexian ko-krkingzhexian ko-kr

2010-04-29

C# 创建有密码的Excel 文件

C# 创建有密码的Excel 文件C# 创建有密码的Excel 文件

2010-04-21

Excel技巧Excel技巧

Excel技巧Excel技巧Excel技巧Excel技巧

2010-03-30

OpenhomePageOpenhomePageOpenhomePage

OpenhomePageOpenhomePageOpenhomePage

2010-03-29

OpenhomePage

OpenhomePageOpenhomePageOpenhomePage

2010-03-29

用注册表修复IE主页

用注册表修复IE主页用注册表修复IE主页

2010-03-29

C# 修复IE主页C# 修复IE主页

C# 修复IE主页C# 修复IE主页C# 修复IE主页

2010-03-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除