会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
快乐小精灵
博客园
首页
新随笔
联系
管理
订阅
2018年1月20日
字符串,不足位前位补0
摘要: 不是数字,是字符串前位补0哦。。就需要下面这个了。否则用format函数即可。 string str = svalue.PadLeft(4, '0');
阅读全文
posted @ 2018-01-20 18:06 快乐小精灵
阅读(514)
评论(0)
推荐(0)
2018年1月16日
用Visual Studio 2010 打开Visual Studio 2013 (C#专用)
摘要: 1.更改.sln 1)将Microsoft Visual Studio Solution File, Format Version 12.00 改成11.00 2)将 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 改成 10.0.40
阅读全文
posted @ 2018-01-16 15:48 快乐小精灵
阅读(1204)
评论(0)
推荐(0)
2016年2月3日
简单实现发送手机短信
摘要: C#简单实现发送手机短信 偶然想起,像编写一个从电脑向手机发送短信的程序,从网上查找到有三种方式:(1)使用webservice接口发送手机短信,这个可以使用sina提供的webservice进行发送,但是需要进行注册;(2)使用短信mao的方式进行短信的发送,这种方式应该是比较的常用,前提是需要购
阅读全文
posted @ 2016-02-03 13:53 快乐小精灵
阅读(992)
评论(0)
推荐(0)
2012年7月3日
DataGridView动态添加列
摘要: DataGridView动态添加列必须指定列的类型DataGridViewTextBoxColumn Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();Column1.HeaderText =“Column1”;Column1.Name = "Column1";dataGridView1.Columns.Insert(iColIndex, Column1);private void dataGridView1_CellClick(object sender, DataGridViewCellEven
阅读全文
posted @ 2012-07-03 16:16 快乐小精灵
阅读(681)
评论(0)
推荐(0)
2012年2月21日
SQL数据库备份及恢复
摘要: 备份: string Constr = “Provider=SQLOLEDB;Data Source=.;Integrated Security=SSPI;Initial Catalog=数据库名”;//.代表本机 OleDbConnection myConn = new OleDbConnection(Constr);myConn.Open();OleDbCommand cmd = new OleDbCommand();cmd.Connection = myConn; cmd.CommandText = @"backup database 要备份的数据库名 to disk =
阅读全文
posted @ 2012-02-21 13:25 快乐小精灵
阅读(317)
评论(0)
推荐(0)
2011年6月16日
VC include 路径解析
摘要: 今天发现一个不错的帖子。转到自己的博客,收藏。要了解vc中使用#include命令包含头文件所搜寻的路径,必须先了解vc中的几种路径:1. 系统路径系统路径在vc中是"Tools->Options->Directories"中"Include files"指定的路径。打开此对话框会发现默认有这几条路径:C:\Program Files\Microsoft Visual Studio\VC98\INCLUDEC:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDEC:\Program F
阅读全文
posted @ 2011-06-16 09:57 快乐小精灵
阅读(11114)
评论(0)
推荐(1)
2009年12月4日
c# 关闭其它应用程序
摘要: 利用线程关闭已开启的应用程序,代码如下:using System.Diagnostics; public void CloseSoundApp() { Process[] pProcess; pProcess = Process.GetProcesses(); for (int i = 1; i <= pProcess.Length - 1; i++) { if (pProcess[i].P...
阅读全文
posted @ 2009-12-04 11:29 快乐小精灵
阅读(3627)
评论(0)
推荐(0)
2009年12月1日
字符串拆分加循环
摘要: string strDate="2009-05-10"; string[] str = strDate.Split('-');foreach (string i in str){//代码 }
阅读全文
posted @ 2009-12-01 13:25 快乐小精灵
阅读(276)
评论(0)
推荐(0)
2009年7月3日
循环处理控件属性
摘要: 当From上或者Panel上想像VB一样循环为控件赋值时可用到以下代码Label[] lbl_Ctrl; lbl_Ctrl= new Label[9]; for (int i = 1; i <= 8; i++){lbl_Ctrl[i] = new Label();lbl_Ctrl[i] = (Label)this.Panel1.Controls["Label" + i.ToString()]...
阅读全文
posted @ 2009-07-03 11:35 快乐小精灵
阅读(268)
评论(0)
推荐(0)
2009年5月22日
视频的二进制转换
摘要: 同图片的二进制转换雷同。就是在页面上多加了显示视频控件的代码.详细内容可参照http://blog.csdn.net/qbb3050466/archive/2009/02/11/3876421.aspx 我的简单代码如下:aspx 中: <object id="nsPlayer" classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" wid...
阅读全文
posted @ 2009-05-22 13:51 快乐小精灵
阅读(1355)
评论(0)
推荐(0)
下一页