- 博客(11)
- 收藏
- 关注
转载 c++内存对齐
内存对齐原则: 1.数据成员对齐规则:struct, union的数据成员,第一个数据成员放在offset为0的地方,之后的数据成员的存储起始位置都是放在该数据成员大小的整数倍位置。如在32bit的机器上,int的大小为4,因此int存储的位置都是4的整数倍的位置开始存储。 2.结构体作为数据成员的对齐规则:在一个struct中包含另一个struct,内部struct应该以它...
2016-04-25 17:26:00
112
转载 gif显示
public void gifplay(string path,ref Panel panel) { try{ Bitmap animatedGif = new Bitmap(path ); Graphics g = panel.CreateGraphics(); ...
2015-11-13 13:56:00
107
转载 字符画与拼接图片
//字符画// 通过计算rowSize*colSize区域的亮度平均值用一个字符替代 public static String BitmapConvert(Bitmap bitmap, int rowSize, int colSize) { StringBuilder result = new StringBuilde...
2015-11-13 13:29:00
239
转载 计算图片不透明轨迹
/// Calculate the graphics path that representing the figure in the bitmap /// excluding the transparent color which is the top left pixel. /// //计算位图中不透明部分的边界 /// ...
2015-11-13 13:23:00
143
转载 窗体特效
using System.Runtime.InteropServices; public class Win32 { public const Int32 AW_HOR_POSITIVE = 0x00000001; // 从左到右打开窗口 public const Int32 AW_HOR_NEGATIVE = 0x00000002; // 从右到左打开窗口...
2015-11-13 13:21:00
220
转载 全局钩子
using System;using System.Collections.Generic;using System.IO;using System.Windows.Forms;using System.Runtime.InteropServices;using System.Reflection;namespace HookTest{ ...
2015-11-13 13:20:00
136
转载 获取程序代码块资源消耗
// 在这里写一些可能消耗内存的代码,例如,如果想了解创建一个GcMultiRow软件需要多少内存可以执行以下代码long start = GC.GetTotalMemory(true);var gcMulitRow1 = new GcMultiRow();GC.Collect();// 确保所有内存都被GC回收GC.WaitForFullGCComplete()...
2015-11-13 13:16:00
179
转载 窗体移动
int x,y; void MainFormMouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { x = e.X; ...
2015-11-13 13:14:00
119
转载 处理图片透明操作
// <summary> /// 处理图片透明操作 /// </summary> /// <param name="srcImage">原始图片</param> /// <param name="opacity">透明度(0.0---1.0)</param> /// <retu...
2015-11-13 13:03:00
151
转载 .net版高斯模糊算法
最近挺多人找高斯算法,本人贴上一个高斯模糊算法类,希望可以帮助到大家。算法的效率还是可以接受的。 1 #region 高斯模糊算法 2 /// <summary> 3 /// 高斯模糊算法 4 /// </summary> 5 using System ; 6 using System .Drawing ; 7 p...
2015-09-23 13:11:00
254
转载 通过cpu SN码注册软件类
1 using System; 2 using System.Management; 3 4 namespace SoftReg 5 { 6 internal class SoftReg 7 { 8 #region 变量 9 public int[] IntCode = new in...
2015-09-14 18:37:00
211
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人