Generated Image

随笔分类 -  C#示例分析

C#示例分析
摘要:今天 突然想到了 public string ToString(string format);找到资料 留着 已被将来使用C#格式化数值结果表字符 说明 示例 输出 C货币string.Format("{0:C3}", 2)$2.000D十进制string.Format("{0:D3}", 2)002E科学计数法1.20E+0011.20E+001G常规string.Format("{0:G}"... 阅读全文
posted @ 2007-06-05 18:47 桂圆 阅读(945) 评论(1) 推荐(0)
摘要:C#写入/读出文本文件 publicvoidPage_Load(Objectsrc,EventArgse){StreamWriterrw=File.CreateText(Server.MapPath(".")+"\\myText.txt");rw.WriteLine("追逐理想");rw.WriteLine("kzlll");rw.WriteLine(".NET笔记");rw.Flush();rw... 阅读全文
posted @ 2007-05-30 20:58 桂圆 阅读(861) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/luqingfei/archive/2007/03/1... 用VS建两个项目(CustomControlSample, TestControl), 项目类型分别是类库(不是内裤!!!), Windows应用程序. using System.Windows.Forms; using System.Drawing; namespace Custo... 阅读全文
posted @ 2007-05-18 01:31 桂圆 阅读(747) 评论(0) 推荐(0)
摘要:ICSharpCode.TextEditor来自开源项目SharpDevelop, using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Form... 阅读全文
posted @ 2007-05-16 18:44 桂圆 阅读(5406) 评论(1) 推荐(0)
摘要:先添加对Excel的引用。选择项目-〉添加引用-〉COM-〉添加Microsoft Excel 11.0 看下代码吧 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using S... 阅读全文
posted @ 2007-05-07 03:46 桂圆 阅读(1111) 评论(1) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication3{ public p... 阅读全文
posted @ 2007-05-05 10:57 桂圆 阅读(512) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/21aspnet/archive/2007/03/20/1534398.aspx因为近来想写个类似于远程桌面监控的程序,该程序中要用到屏幕捕捉.为实现该程序的一部分功能,做了个小DEMO.程序很简单,用到的技术也不多,只能实现类似qq的截图功能(方法虽然很笨)程序流程如下:1.截取整个屏幕并保存2.新开一个全屏窗口,将保存的屏幕作为背景3.鼠标拖动改变截取... 阅读全文
posted @ 2007-05-04 01:44 桂圆 阅读(704) 评论(2) 推荐(0)
摘要:简单有趣的截屏-_- // 模拟按键,将当前窗口图像截取到剪贴板:SendKeys.SendWait("%{PRTSC}"); // 模拟 Alt+PrtSc,如果要截取整个屏幕,把 Alt (%) 去掉// 获取剪贴板里的图像:Bitmap myCapture = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);this... 阅读全文
posted @ 2007-05-01 15:27 桂圆 阅读(330) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime;using System.Runtime.... 阅读全文
posted @ 2007-04-27 10:40 桂圆 阅读(792) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime;using System.Runtime.... 阅读全文
posted @ 2007-04-27 10:36 桂圆 阅读(665) 评论(0) 推荐(0)
摘要:注:本文部份资料来自网络,如有侵权,请与我联系,我会在第一时间声明引用或将其删除! 当初学 C# 时是找个人大概问了一下数据类型和分支语句就开始做项目了。这两天又全面的看了一下相关的基础知识(学而时习之嘛),总结了25个问题: 1.静态变量和非静态变量的区别?2.const 和 static readonly 区别?3.extern 是什么意思?4.abstract 是什么意思?5.int... 阅读全文
posted @ 2007-04-06 08:36 桂圆 阅读(355) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/21aspnet/archive/2007/03/25/1540299.aspx关于object类型:1.object类型可以来引用任何类型的实例;2.object类型可以存储任何类型的值;3.可以定义object类型的参数;4.可以把object作为返回类型。但是--这样做有很大的问题 1.会因为程序员没有记住使用的类型而出错,造成类型不兼容;2.值类型... 阅读全文
posted @ 2007-03-29 23:27 桂圆 阅读(933) 评论(0) 推荐(0)
摘要:1.C#连接连接Access程序代码: ------------------------------------------------------------------------------- using System.Data;using System.Data.OleDb;..string strConnection="Provider=Microsoft.Jet.OleDb.4.0... 阅读全文
posted @ 2007-03-29 23:23 桂圆 阅读(329) 评论(0) 推荐(0)
摘要:好像有点问题 等有时间再好好看看吧 帖出来 这个没有使用数据库 节气和星座还没有出来 /**/ using System; namespace YyAy.Web.WebClass{ #region 使用范例 // 可将这段代码取消注释运行可以得到示例结果。。 // public class MyTest // { // /... 阅读全文
posted @ 2007-03-20 17:38 桂圆 阅读(788) 评论(1) 推荐(0)
摘要:今天突然想起如何转换日历的事,就上CNBLOGS查了下 找到了一篇文章 【农历】计算方法--- (阳历转阴历) http://www.cnblogs.com/zhangzs8896/archive/2004/10... 甚是感叹 摘过来 备用 CREATE TABLE SolarData( yearId int not null, data char(7) not nul... 阅读全文
posted @ 2007-03-20 13:47 桂圆 阅读(2256) 评论(2) 推荐(0)
摘要:算法根据KuNgBiM http://bbs.pediy.com/showthread.php?threadid=40987 分析得出 【算法总结】 密码表计算式: LCase(MD5(LCase(MD5(用户名+“spadger”)))) 注册码段计算式: A:Mid(密码表,5) B:Mid(密码表,5,5) C:Mid(密码表,10,5) D:Mid(密码表,15,5) ... 阅读全文
posted @ 2007-03-16 18:52 桂圆 阅读(632) 评论(0) 推荐(0)
摘要:引用别人的WebServices http://www.ayandy.com/ 本服务数据来源于中国气象局数据,实时更新,准确可靠,包括国内外400多个主要城市。请不要用于任何商业目的,若有需要请与作者联系,欢迎技术交流。作者QQ:15244833 E-Mail:secretary@ayandy.com The following operations are supported. For a ... 阅读全文
posted @ 2007-03-15 15:11 桂圆 阅读(1013) 评论(0) 推荐(0)
摘要:还是继续参考cnblogs中大虾的文章, 原出处是找不到啦 ...... 实现了程序的唯一实例 如果打开过程序 会有个MessageBox 然后 将已经打开的程序 设为活动窗口 看代码吧 使用VS2005工具 将代码放入Program.cs 中 修改其中少部分 就可以啦 using System;using System.Collections.Generic;using System.... 阅读全文
posted @ 2007-03-13 09:05 桂圆 阅读(541) 评论(1) 推荐(0)
摘要:首先得有一个数据库 英文短语和中文一一对应 看看过程 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms... 阅读全文
posted @ 2007-02-20 22:02 桂圆 阅读(548) 评论(3) 推荐(0)
摘要:using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Net.Sockets; 按钮事件 private void button1_Click(ob... 阅读全文
posted @ 2007-02-19 12:36 桂圆 阅读(1709) 评论(0) 推荐(0)