WINDOWS 画空心字
摘要:private void Form1_Paint(object sender, PaintEventArgs e) { System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath(); gp.AddString("新年快乐!", this.Font.FontFamily, (int)Fon...
阅读全文
posted @
2010-08-26 12:30
Emosen
阅读(327)
推荐(0)
ZT--文本显示尺寸计算(关于控件的尺寸定义)
摘要:WM系统的特点之一就是:尺寸比较小。因此,在UI设计时,控件大小、位置、布局,就显得尤为重要,力求在有限的空间中,完整的显示文本信息。之前提到的跑马灯控件,也是类似的功能。 用于文本显示的,主要有两种控件:LABEL和TEXTBOX。这两种控件,在一定程度上,都支持自动换行。但是要使其显示完整信息,就必须定义一个合适的尺寸(LABEL显示高度不够时,文字被遮蔽,TEXTBOX则会显示滚动条)。 ...
阅读全文
posted @
2010-08-26 11:43
Emosen
阅读(370)
推荐(0)
C# 改变图片大小的功能代码片段 (wince5)
摘要:if (pictureBox1.Image == null) return; Bitmap srcmap = null, destbit =null; Graphics g = null; try { //例如:图片目标大小为:320*240 GC.Collect();GC.WaitForPendingFinalizers(); srcmap = new Bitmap(pictureBox1.Im...
阅读全文
posted @
2009-04-14 14:40
Emosen
阅读(1969)
推荐(0)
关于VS.Net2005中串口操作说明(C#)(SerialPort组件) -ZT
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.IO.Ports;namespaceSerialPorts{publicp...
阅读全文
posted @
2008-07-25 10:47
Emosen
阅读(2188)
推荐(0)
如何有效的使用C#读取文件
摘要:如何有效的使用C#读取文件你平时是怎么读取文件的?使用流读取。是的没错,C#给我们提供了非常强大的类库(又一次吹捧了.NET一番),里面封装了几乎所有我们可以想到的和我们没有想到的类,流是读取文件的一般手段,那么你真的会用它读取文件中的数据了么?真的能读完全么? 通常我们读取一个文件使用如下的步骤: 1、声明并使用File的OpenRead实例化一个文件流对象,就像下面这样 FileStream...
阅读全文
posted @
2005-09-29 16:07
Emosen
阅读(1511)
推荐(0)
汇总c#.net常用函数和方法集
摘要:[PP]1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日=c...
阅读全文
posted @
2005-09-29 15:18
Emosen
阅读(338)
推荐(0)
datagrid(绑定数据库)+comboBox+Enter(跳到下一格)----仅供参考
摘要:using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using OperateDb;using System.Data.OleDb;using System.Data;namespace KeLeCtrl{ /* ...
阅读全文
posted @
2005-03-21 16:12
Emosen
阅读(1646)
推荐(0)