
c# 应用
文章平均质量分 61
jilong17
这个作者很懒,什么都没留下…
展开
-
c# 下 socket 客户端 编程
private void button4_Click(object sender, EventArgs e) { s = new Socket(AddressFamily.InterNetwork, SocketType.Stream,原创 2011-07-31 21:20:05 · 944 阅读 · 0 评论 -
c# 窗体 显示居中 wince
using System.Runtime.InteropServices;[DllImport("Coredll.dll")]public static extern int GetSystemMetrics(int nIndex); private void FormAppClose_Load(object sender, EventArgs e)原创 2014-01-19 23:03:24 · 3117 阅读 · 0 评论 -
c# wince/mobile 下支持触屏点击的 textbox 点击事件
见网址 http://blog.youkuaiyun.com/wuyazhe/article/details/6146970转载 2014-01-24 17:38:32 · 1787 阅读 · 0 评论 -
c# wince 根据中文的拼音 实现 模糊查找
我参考的网址http://www.cnblogs.com/qianyaoyuan/archive/2013/05/29/3105481.html转载 2014-01-26 10:30:18 · 1442 阅读 · 0 评论 -
C#子窗体和父窗体的通信
假设你有form1和form2两个窗口类,在form1中创建子窗口form2有两种情况:创建模态对话框form2和创建非模态对话框form2: 一、如果创建模态对话框,如下有两种情况,其中有一种是错误的,是一定要避免的: 错误的情况,如下: form1中 private void button1_Click(object sender, EventArgs e) {转载 2014-01-15 21:44:51 · 883 阅读 · 0 评论 -
c# wince 获取当前应用 绝对路径
有的时候引用相对路径出问题, 还是用绝对路径更靠谱一些, string str = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName); MessageBox.Show(str);转载 2013-12-15 16:04:42 · 1335 阅读 · 0 评论 -
c# 操作 xml 文件的 自定义类
方便 以后操作xml文件,写的类,未完全测试,有问题我会修正 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Xml;using System.Windows.Forms;using Syst原创 2013-12-15 23:56:38 · 744 阅读 · 0 评论 -
c# 在wince上 读excel csv txt 的方法
在wince 上对excel 文件的支持比较少,读比较麻烦,可以把excel 文件另存为csv文件,csv文件可以改后缀变成txt文件。读txt的时候用 string.splite 分隔之下面是我自己写的只读的类using System;using System.Linq;using System.Collections.Generic;using System.Text;us原创 2013-12-03 13:48:08 · 2625 阅读 · 0 评论 -
c# int 转换成string hex方式 16进制
int temp; string str = ConvertHex(Convert.ToString(temp)); public static string GetHexChar(string value) { string sReturn = string.Empty; switc转载 2013-12-09 00:25:59 · 10006 阅读 · 0 评论 -
c# datagridview 基本操作 (windows form)
//添加按键列 DataGridViewButtonColumn dcButton = new DataGridViewButtonColumn(); dcButton.Name = "测试"; dcButton.HeaderText = "测试"; dcButton.Wid原创 2013-11-15 10:43:11 · 1201 阅读 · 1 评论 -
c# 读写 excel 的类
c# 读写 excel 的类 暂时没有写全,知识满足我的应用引用的时候注意 namespace 1. 暂时只写了一个 载入 excel 的接口 ,返回的是 dataset 关于dataset 的操作,简单弄了一个 ,查表并打印出来 private void button1_Click(object sender, EventArgs e)原创 2013-11-12 13:29:59 · 783 阅读 · 0 评论 -
c# 的一些积累
combobox 控件this.comboBox1.TabIndex = 1;this.comboBox1.Items.Add("COM0");comboBox1.SelectedItem.ToString());String 字符串操作 //字符串 转 byte[] byte[] Data1 = System.Text.Encoding.De原创 2011-11-02 16:01:14 · 687 阅读 · 0 评论 -
c# 控制textbox 只允许输入 数字 0~9
在textbox 添加 keypress 属性如果想显示数字位数,在textbox 属性中 maxlen 选择private void textBox2_KeyPress(object sender, KeyPressEventArgs e){ if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar) && e.Key原创 2013-10-23 10:59:11 · 1352 阅读 · 0 评论 -
c# 里面写了一个 FIFO 类, 传递数据非常实用
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ZicoxPrintTestTool{ class Fifo { public Int32 m_WritePos; public Int32 m_ReadP原创 2013-10-22 11:22:26 · 4017 阅读 · 0 评论 -
C# 中 byte[] 操作的类 方便 传送数据时添加多种数据类型的内容
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ZicoxPrintTestTool{ class Bytes { public byte[] m_ByteArry; public Int32 m_Pos原创 2013-10-23 13:45:45 · 4549 阅读 · 0 评论 -
wince 蓝牙的扫描与连接
private void button2_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (Blueto原创 2011-08-17 13:34:45 · 1042 阅读 · 0 评论 -
C# 串口收发的 类
//下面是新建的类using System;using System.Collections.Generic;using System.Text;using System.IO.Ports;using System.Windows.Forms;namespace ComTest{ public class myComC { publ原创 2011-09-14 16:33:43 · 1474 阅读 · 1 评论