01 2014 档案
摘要:usingSystem;usingSystem.Runtime.InteropServices;usingSystem.Collections.Generic;usingSystem.Text;namespaceNewPortTest{publicclassCommPort{//////端口名称(COM1,COM2...COM4...)COM2:///publicstringPort="COM1";//////波特率9600///publicintBaudRate=115200;//////数据位4-8///publicbyteByteSize=8;//4-8//////奇
阅读全文
posted @ 2014-01-14 19:35
花式炒饭
摘要:// 柔化效果 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..
阅读全文
摘要:关于GDI+ 的使用,就对点,线,面的画的操作,图像剪裁,缩放等等操作,了解各种常用的方法和属性。常用命名空间:System.Drawing;System.Drawing.Image;System.Drawing.Drawing2D;Graphics类封装了一个GDI+绘图图面,提供将对象绘制到显示到设备的方法。Graphics叫画板,只不过这个画板中带了很多工具。但画图时你要定义画板的大小,颜色等等,还应给他一张画纸;Graphics1.创建Graphics基本方法: Graphics g = this.CreateGraphics(); Graphics g = e;//Paint事件中的
阅读全文
摘要:C++ C#=====================================WORD ushortDWORD uintUCHAR int/byte 大部分情况都可以使用int代替,而如果需要严格对齐的话则应该用bytebyteUCHAR* string/IntPtrunsigned char* [MarshalAs(UnmanagedType.LPArray)]byte[]/?(Intptr)char* stringLPCTSTR stringLPTSTR [MarshalAs(UnmanagedType.LPTStr)] stringlong i...
阅读全文
摘要:由于更新微软其他产品导致msdn 一直更新无法使用。修改注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Help\0×0804对项Collection项值键值修改成{8DA395B4-EF74-4F2E-9890-0D04C7DA8819}。但要保证你{8DA395B4-EF74-4F2E-9890-0D04C7DA8819}的filename项的键值为"ms-help://MS.MSDNQTR.v90.chs"
阅读全文
摘要:新建一个Windows窗体控件当准备用“用户控件测试容器”时,无运行了。错误:未能找到程序集“E:\Temps\Tc#%5CWindowsFormsControlLibrary1%5Cobj%5CDebug%5CWindowsFormsControlLibrary1.dll”。请确保路径正确。新建一个工程一行代码不写一样出现问题这是为什么那?仔细观察程序路径显示的不正常,查看文件夹名没问题E:\Temps\Tc#。莫非和java一样会出现空格错误。检查文件夹路径后发现除了# 其他没特殊,去掉#后程序运行正常,原来都是#搞得鬼。
阅读全文

浙公网安备 33010602011771号