摘要:
Form2frm2=newForm2();privatevoidMoveProc(){frm2.StartPosition=FormStartPosition.CenterParent;frm2.Left=this.Left+panel1.Left;frm2.Top=this.Top+panel1.Top;}publicForm1(){InitializeComponent(); Mov... 阅读全文
摘要:
C#如何检测一个字符串是不是合法的URLusingSystem.Text.RegularExpressions; //////检测串值是否为合法的网址格式//////要检测的String值///成功返回true失败返回falsepublicstaticboolCheckIsUrlFormat(stringstrValue){returnCheckIsFormat(@"(http://)?([\w-... 阅读全文
摘要:
附件:http://files.cnblogs.com/xe2011/WpfApplication3_downloadFile.rar使用 privatevoidButton_Click_1(objectsender,RoutedEventArgse){stringurl="http://fil... 阅读全文
摘要:
方法1:InternetGetConnectedState [System.Runtime.InteropServices.DllImport("wininet")]privateexternstaticboolInternetGetConnectedState(outintconnectionDescription,intreservedValue);privatevoidbutton1_... 阅读全文
摘要:
播放 WAV文件 strings=@"D:\Administrator\安装文件\完美世界国际版\patcher\skin\sounds\click.wav";System.Media.SoundPlayerplayer=newSystem.Media.SoundPlayer(s);player.PlaySync(); player.Play();//简单播放一遍player.Pl... 阅读全文
摘要:
vs2013附件 :http://download.csdn.net/detail/u012663700/7427461C# WPF 解压缩7zip文件 带进度条 sevenzipsharpWPF PNG实现的图形进度条.NET 3.5http://sevenzipsharp.codeplex.co... 阅读全文
摘要:
写法3 privatevoidbutton1_Click(objectsender,RoutedEventArgse) { System.Threading.Threadthread1=newSystem.Threading.Thread(()=>{ //过程});thread1.Start(); }使用控件时会引起其他信息: 由于其他线程拥有此对象,因此调用线程无法... 阅读全文
摘要:
判断网络文件 存在 3秒之内返回结果方法2: //////判断网络文件是否存在1.5秒得到出结果如这样的格式http://191.168.1.105:8000/CPW/wmgjUpdate.7z/////////privateboolUrlIsExists(stringURL){try{System.Net.WebRequestwebRequest1=System.Net.WebRequest... 阅读全文