资源简介
这是一个利用winform实现模仿360安全卫士工具的源码。

代码片段和文件信息
/***************************************************************************************/
//
// 功能描述:不规则窗体和控件的生成类
// 撰 写 人:不祥(网上搜集)
// 修改人:xiaowei
//
//
/***************************************************************************************/
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace EncryptForm
{
///
/// Summary description for BitmapRegion.
///
public class BitmapRegion
{
public BitmapRegion()
{ }
///
/// Create and apply the region on the supplied control
/// 创建支持位图区域的控件(目前有button和form)
///
/// The Control object to apply the region to控件
/// The Bitmap object to create the region from位图
public static void CreateControlRegion(Control control Bitmap bitmap)
{
// Return if control and bitmap are null
//判断是否存在控件和位图
if (control == null || bitmap == null)
return;
// Set our control‘‘s size to be the same as the bitmap
//设置控件大小为位图大小
control.Width = bitmap.Width;
control.Height = bitmap.Height;
// Check if we are dealing with Form here
//当控件是form时
if (control is System.Windows.Forms.Form)
{
// Cast to a Form object
//强制转换为FORM
Form form = (Form)control;
// Set our form‘‘s size to be a little larger that the bitmap just
// in case the form‘‘s border style is not set to none in the first place
//当FORM的边界FormBorderstyle不为NONE时,应将FORM的大小设置成比位图大小稍大一点
form.Width = control.Width;
form.Height = control.Height;
// No border
//没有边界
form.FormBorderstyle = FormBorderstyle.None;
// Set bitmap as the background image
//将位图设置成窗体背景图片
form.BackgroundImage = bitmap;
// Calculate the graphics path based on the bitmap supplied
//计算位图中不透明部分的边界
GraphicsPath graphicsPath = CalculateControlGraphicsPath(bitmap);
// Apply new region
//应用新的区域
form.Region = new Region(graphicsPath);
}
// Check if we are dealing with Button here
//当控件是button时
else if (control is System.Windows.Forms.Button)
{
// Cast to a button object
//强制转换为 button
Button button = (Button)control;
// Do not show button text
//不显示button text
button.Text = ““;
// Change cursor to hand when over button
//
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-05-10 08:32 Winform模仿360系统安全工具源码\
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\bin\
文件 8173 2011-05-13 15:52 Winform模仿360系统安全工具源码\EncryptForm\BitmapRegion.cs
文件 5563 2011-06-27 08:55 Winform模仿360系统安全工具源码\EncryptForm\EncryptForm.cs
文件 3879 2011-05-13 15:59 Winform模仿360系统安全工具源码\EncryptForm\EncryptForm.csproj
文件 227 2011-05-13 15:52 Winform模仿360系统安全工具源码\EncryptForm\EncryptForm.csproj.user
文件 7463 2011-05-13 15:55 Winform模仿360系统安全工具源码\EncryptForm\EncryptForm.designer.cs
文件 5817 2011-05-13 15:55 Winform模仿360系统安全工具源码\EncryptForm\EncryptForm.resx
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\obj\
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\
文件 6346 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 839 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\EncryptForm.csproj.FileListAbsolute.txt
文件 180 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\EncryptForm.EncryptForm.resources
文件 4648 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\EncryptForm.Properties.Resources.resources
文件 548 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\GenerateResource.read.1.tlog
文件 730 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\GenerateResource.write.1.tlog
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\TempPE\
文件 4608 2011-05-13 18:11 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll
文件 18432 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\加密解密.exe
文件 28160 2011-05-16 17:54 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Debug\加密解密.pdb
目录 0 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\
文件 2152 2011-06-27 08:57 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\DesignTimeResolveAssemblyReferences.cache
文件 6471 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\DesignTimeResolveAssemblyReferencesInput.cache
文件 4139 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\EncryptForm.csproj.FileListAbsolute.txt
文件 180 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\EncryptForm.EncryptForm.resources
文件 4591 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\EncryptForm.Properties.Resources.resources
文件 2394 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\GenerateResource.read.1.tlog
文件 3226 2011-10-13 08:51 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\GenerateResource.write.1.tlog
目录 0 2011-07-03 09:37 Winform模仿360系统安全工具源码\EncryptForm\obj\x86\Release\TempPE\
............此处省略298个文件信息
相关资源
- 超市进销存管理系统 Sqlserver 数据库文
- asp.net C#购物车源代码
- 智慧城市 智能家居 C# 源代码
- MVC model层代码生成器 C#
- c# winform 自动登录 百度账户 源代码
- C#版保龄球记分代码
- C# 使用ListView控件实现图片浏览器(源
- c#记事本 基本功能已经全部实现 包附
- C# TCP通讯组件源代码
- C#版IE浏览器源代码
- C#使用GDI 绘制汽车车速表等量表源代
- 用C#绘制正弦曲线,要用到Form1_Resiz
- 随机抽题系统C#源代码
- 医院业务管理系统(C#源代码)
- C#代码生成器(生成MVC三层代码)
- 远程监控(C#源代码)
- C#Oracle数据库备份
- AssetStudio V0.16.0 源代码 使用VS2019
- 串口调试助手代码(XCOM V2.0)
- C#代码生成工具
- 热血江湖20服务端源代码
- C# 视觉处理代码、神经网络和遗传算
- C#跑马灯代码
- C#最新阿里云短信验证sdk代码
- socket服务端
- C# 立马关机 代码
- kepserver 连接 PLC代码
- VS2012保存时自动格式化代码插件(F
- EPLAN 菜单插件代码
- C# 取色工具源代码(RGB)
评论
共有 条评论