- 博客(9)
- 资源 (5)
- 收藏
- 关注
转载 本地程序获取网页内容
首先要引入Microsoft.mshtml.dll 地址是C:\Program Files\Microsoft.NET\Primary Interop Assemblies1、根据元素ID获取元素的值。比如要获取这个标签里的src属性的值:mshtml.IHTMLDocument2 doc2 = (mshtml.IHTMLDocument2)webBrowser1.Document
2012-06-04 11:10:41
516
转载 WPF Image
WPF Image问题解决方法(第四种画出来真漂亮)一.Image是控件,Source属性类型是ImageSource Source="xx.jpg" /> 二.ImageBrush是笔刷,用于填充1.基本使用,必须指定ImageSource源 > ImageSource="xx.jpg" /> /Rectangle.Fill> /Rectangle>
2012-06-04 11:09:48
629
原创 WPF 显示时间
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;us
2012-04-06 08:52:49
1206
1
原创 C# 常用截取字符串
string str="123abc456";int i=3;1 取字符串的前i个字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i个字符: str=str.Remove(0,i); // or str=str.Substring(i); 3 从右边开始取i个字符
2012-03-27 11:02:51
341
原创 一些比较常用的正则表达式
匹配中文字符的正则表达式: [\u4e00-\u9fa5]评注:匹配中文还真是个头疼的事,有了这个表达式就好办了匹配双字节字符(包括汉字在内):[^\x00-\xff]评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)匹配空白行的正则表达式:\n\s*\r评注:可以用来删除空白行匹配HTML标记的正则表达式:]*>.*?|评注:网上流传的版本太
2012-03-26 13:40:07
253
原创 WPF 使用正字表达式
命名空间:using System.Text.RegularExpressions;string txtstring=" ";//记录文本框里的内容 private void txtdatatable_PreviewKeyUp(object sender, KeyEventArgs e) { Regex r = new Regex(@"^[A
2012-03-26 10:57:11
339
原创 开机 启动你要指定打开的程序或者文件
有很多朋友 都是以电脑为工作主体,那肯定就要涉及到一些软件 比如哦 Office、Photosho、CAD 3DMax 等等 来了以后都要自己手动才打开很麻烦,废话不多说了,现在告诉到家个技巧,开机后让你每天都要打开的软件 自己就打开。首先 说XP系统软件的图标一般都桌面上,点击右键复制或者Ctrl+C,然后 开始→所有程序→启动→右键打开,打开后 把刚才复制的图标 粘贴进来(Ctrl+
2012-02-27 10:21:33
425
原创 C# 打开指定的程序或文件
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Sy
2012-02-27 09:52:38
2929
原创 C# 延时
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Sy
2012-02-27 09:48:14
395
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人