随笔分类 -  C#基础

关于C#语言的一些基础
摘要:好的,各位RT 这次是简单的 C# GDI+ 文字描边的实现。。。。这次不使用先进的东西。。。。先看效果图,如下:当然,你自己动手做出的效果我想会更好。我只是抛砖引玉而已,呵呵。 this.Paint += Form1_Paint;//这个写在Form_load事件里面 void Form1_Paint(object sender, PaintEventArgs e) { //Graphics g = e.Graphics; //string s = "Outline"; ... 阅读全文
posted @ 2013-04-02 10:57 SoarNo1 阅读(8571) 评论(2) 推荐(0) 编辑
摘要:转载一篇关于键盘钩子的。。。代码。。。using System;using System.Text;using System.Runtime.InteropServices;using System.Reflection;using System.Windows.Forms; namespace MouseKeyboardLibrary{ /// <summary> /// Abstract base class for Mouse and Keyboard hooks /// </summary> public abstract class GlobalHook .. 阅读全文
posted @ 2012-11-12 15:40 SoarNo1 阅读(381) 评论(0) 推荐(0) 编辑
摘要:ARBG8888顺序是各分量B8+G8+R8+A8左高右低 阅读全文
posted @ 2012-04-15 10:01 SoarNo1 阅读(450) 评论(0) 推荐(0) 编辑
摘要:异步TCP Socket....真的是异步,真的是Socket,真的很简单,很清晰,很明了的示例 阅读全文
posted @ 2012-04-08 15:23 SoarNo1 阅读(377) 评论(0) 推荐(0) 编辑
摘要:this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);//解决闪烁this.SetStyle(ControlStyles.Opaque ,true);//解决背景重绘问题(设置不绘制窗口背景,因为重绘窗口背景会导致性能底下)this.SetStyle(ControlStyles.OptimizedDoubleBuffer ,true);//解决闪烁 具体什么意思,如果你使用VS2010的话,我想智能感知会告诉你的。(我比较懒,神啊,原谅我吧) 阅读全文
posted @ 2012-04-01 12:20 SoarNo1 阅读(2772) 评论(3) 推荐(2) 编辑
摘要:string[] strs = new string[10000];for (int i = 0; i < 10000; i++){strs[i] = i.ToString();}string temp1 = "";string temp2 = "";long fortime = 0;long foreachtime = 0;timer.Reset();timer.Start();for (int i = 0; i < 10000; i++){temp1 = strs[i];}fortime = timer.ElapsedTicks;time 阅读全文
posted @ 2012-02-05 14:37 SoarNo1 阅读(882) 评论(1) 推荐(0) 编辑
摘要:美元的数字转中文输出(人民币也是yiy)以前听说过有这么一个问题,但自己没研究,今天终于遇到了,到网上一搜,没什么特别清晰地代码,于是决定还是自己写一个好了,下面贴出来分享,如有雷同纯属巧合! /// <summary> /// 计算输入数字美元用中文表示 /// </summary> public static void WriteDollersWithChinese() { //string num = "零壹贰叁肆伍陆柒捌玖 "; string num = "零一二三四五六七... 阅读全文
posted @ 2010-11-08 11:03 SoarNo1 阅读(376) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示