摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-type" content="text/html;charset=UTF-8& 阅读全文
posted @ 2012-09-22 14:08 蓬莱仙羽 阅读(136) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2012-09-22 14:00 蓬莱仙羽 阅读(304) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文
posted @ 2012-09-22 13:50 蓬莱仙羽 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 过程一:select top N条记录 * from 文章表 where id not in(select top M条记录 id from 文章表 order by id desc ) order by id desc过程二:select top N条记录 * from 文章表 where id <(select min(id) from (select top M条记录 id from 文章表 order by id desc ) as tblTmp) order by id desc--简单通用CREATE PROCEDURE [dbo].[PageView] @select VA 阅读全文
posted @ 2012-09-21 20:26 蓬莱仙羽 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 一.用SqlConnection连接SQL Server 1..加入命名空间 using System.Data.SqlClient; 2.连接数据库 SqlConnection myConnection = new SqlConnection(); myConnection.ConnectionString = "user id=sa;password=sinofindb;initial catalog=test;data source=127.0.0.1;Connect Timeout=30";myConnection.Open(); 改进(更通用)的方法: strin 阅读全文
posted @ 2012-08-29 17:17 蓬莱仙羽 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 对话框中我们常用了以下几种:1、文件对话框(FileDialog)它又常用到两个: 打开文件对话框(OpenFileDialog) 保存文件对话(SaveFileDialog)2、字体对话框(FontDialog)3、颜色对话框(ColorDialog)4、打印预浏对话框(PrintPreviewDialog)5、页面设置(PrintDialog)6、打印对话框(PrintDialog) 还有更多,有时间的网友可以看看MSDN。下面我们一个个来介绍。在介绍的过程中我用到了一个自己开发的类:File,主要是文件操作的。 文件对话框(FileDialog) 一、打开文件对话框(Ope... 阅读全文
posted @ 2012-07-12 16:42 蓬莱仙羽 阅读(203) 评论(0) 推荐(0) 编辑
摘要: //获取坐标 private void Form2_MouseMove(object sender, MouseEventArgs e) { this.Text=string.Format("X={0},Y={1}",e.X,e.Y); } /// <summary> /// 绘制折线图 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private voi 阅读全文
posted @ 2012-06-27 22:13 蓬莱仙羽 阅读(278) 评论(0) 推荐(0) 编辑
摘要: C#正则表达式小结以下是一些常用的正则表达式,觉得实用就收藏一下吧。只能输入数字:"^[0-9]*$"。只能输入n位的数字:"^\d{n}$"。只能输入至少n位的数字:"^\d{n,}$"。只能输入m~n位的数字:。"^\d{m,n}$"只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$"。只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$"。只能输入有1~3位小数的正实数:"^[0-9]+(.[0-9]{1,3})?$" 阅读全文
posted @ 2012-06-27 00:32 蓬莱仙羽 阅读(250) 评论(0) 推荐(0) 编辑
摘要: #region 设置鼠标可以移动 private bool ismouseDown = false;//判断是否按下鼠标 private Point mouseOffset;//记录鼠标坐标 private void Login_MouseDown(object sender, MouseEventArgs e) { int xOffset; //定义X坐标 int yOffset; //定义Y坐标 if (e.Button == MouseButtons.Left) { //如果鼠标的左键点击了,则将坐标分别进行相应的移动 xOffset = -e.X; yOffset = -e.Y; m. 阅读全文
posted @ 2012-06-27 00:28 蓬莱仙羽 阅读(150) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace MyClockApp{ public partial class Clock : Form { public Clock() { InitializeComponent(); } /// <summary> /// 得到当前系统时间,并将其拼接成一个字 阅读全文
posted @ 2012-06-26 23:54 蓬莱仙羽 阅读(196) 评论(0) 推荐(0) 编辑