随笔分类 -  C#应用学习

摘要:using System;using System.ComponentModel;using System.Drawing;using System.Reflection;using System.Windows.Forms;namespace pictureAnalyse{ /// <summar 阅读全文
posted @ 2018-09-17 22:25 花式炒饭 阅读(6636) 评论(0) 推荐(0)
摘要:// 柔化效果 public Bitmap SmoothEffect(Bitmap bmpSource) { Color c = new Color(); Color c1 = new Color(); Bitmap bmp1 = new Bitmap(bmpSource); Bitmap bmp2 = new Bitmap(bmpSource); int i, j, xres, yres, rx, gx, bx; xres = bmpSource.Width; yres = bmpSource.Height; for (i = 1; i 255) rx = 255; if (gx 255.. 阅读全文
posted @ 2014-01-14 19:23 花式炒饭 阅读(536) 评论(0) 推荐(0)
摘要:关于GDI+ 的使用,就对点,线,面的画的操作,图像剪裁,缩放等等操作,了解各种常用的方法和属性。常用命名空间:System.Drawing;System.Drawing.Image;System.Drawing.Drawing2D;Graphics类封装了一个GDI+绘图图面,提供将对象绘制到显示到设备的方法。Graphics叫画板,只不过这个画板中带了很多工具。但画图时你要定义画板的大小,颜色等等,还应给他一张画纸;Graphics1.创建Graphics基本方法: Graphics g = this.CreateGraphics(); Graphics g = e;//Paint事件中的 阅读全文
posted @ 2014-01-09 12:03 花式炒饭 阅读(10264) 评论(0) 推荐(1)
摘要:一直使用XenoCode2005Enterprise版来混淆保护我的.net程序,虽说不能做到真正意义上的安全(呵呵,我就破解了几个用XenoCode加密的软件,纯粹好玩……),但比起其他几个类似工具还是要好上很多。昨天去XenoCode网站,发现新版2006已经推出,名字也变成XenocodePostBuild2006,除了以往功能加强外,最让我惊奇的是:这个功能可以将.net程序编译为无需.netFramework的Nativex86executable。厉害!虽说将.netFramework一起打包后,程序文件变得很大(增加了十几MB),可的确能在无.netFramework环境下运行。 阅读全文
posted @ 2013-11-25 14:41 花式炒饭
摘要:C#编写的代码如果不进行一定程度的混淆和加密,那么是非常容易被反编译进行破解的,特别是对于一些商业用途的C#软件来说,因为盯着的人多,更是极易被攻破。使用Dotfuscator可以实现混淆代码、变量名修改、字符串加密等功能。这里介绍的是DotfuscatorPro_4.9.7750_2.0版本,有需要的可以到网上搜索下载https://skydrive.live.com/?cid=d2b11227abf128d8&id=D2B11227ABF128D8%21104。安装Dotfuscator好打开界面,有几个需要配置的地方:Options、Input、Rename、StringEncr 阅读全文
posted @ 2013-11-25 14:16 花式炒饭
摘要:1。继承控件,屏蔽消息 private const int WM_GETTEXT = 0x000d; private const int WM_COPY = 0x0301; private const int WM_PASTE = 0x0302; private const int WM_CONTEXTMENU = 0x007B; private const int WM_RBUTTONDOWN = 0x0204; class TextBoxCtrl : TextBox//继承控件屏蔽消息 { protected override void WndProc(ref Message m) { . 阅读全文
posted @ 2013-09-03 00:17 花式炒饭 阅读(2709) 评论(0) 推荐(0)
摘要:转自:http://blog.sina.com.cn/s/blog_469dcb490100mq5u.htmlusing System;using System.Collections.Generic;using System.Drawing;using System.Diagnostics;using System.Windows.Forms;using System.Runtime.InteropServices;using System.Text;namespace WindowsApi{ public class ApiMethod { #region Dll Import [DllI 阅读全文
posted @ 2013-06-08 09:37 花式炒饭 阅读(361) 评论(0) 推荐(0)