上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 49 下一页
摘要: <!--WizRtf2Html Charset=0 --> Microsoft.Win32.OpenFileDialog openFileDialog1 = new Microsoft.Win32.OpenFileDialog(); openFileDialog1.Filter = "(*.cup) 阅读全文
posted @ 2014-06-06 12:49 XE2011 阅读(884) 评论(0) 推荐(0) 编辑
摘要: VS2013 WPF 源码:http://ys-e.ys168.com/2.0/276581436/j4G4J63367IMLIUJjsgW/VS2013_WpfApplication1_patcher2014-6-1-90724.rar应用程序:链接:http://pan.baidu.com/s/... 阅读全文
posted @ 2014-05-31 20:54 XE2011 阅读(1101) 评论(0) 推荐(0) 编辑
摘要: .只容许程序运行1个实例关键点.CreateMutexTheCreateMutexfunctioncreatesoropensanamedorunnamedmutexobject.HANDLECreateMutex(LPSECURITY_ATTRIBUTESlpMutexAttributes,//SDBOOLbInitialOwner,//initialownerLPCTSTRlpName//ob... 阅读全文
posted @ 2014-05-31 08:24 XE2011 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 方法2 当程序已经运行了 再运行这个程序时,则显示当前这个窗体 http://code.3rbang.com/cshape-run-one/ VS2013附件:http://files.cnblogs.com/xe2011/WpfApplication_System.Threading.Mutex.... 阅读全文
posted @ 2014-05-31 08:16 XE2011 阅读(2502) 评论(0) 推荐(0) 编辑
摘要: [System.Runtime.InteropServices.DllImport("user32.dll",EntryPoint="SetWindowPos")]publicstaticexternintSetWindowPos(inthwnd,inthWndInsertAfter,intx,inty,intcx,intcy,intwFlags); constintHWND_TOP=... 阅读全文
posted @ 2014-05-31 06:39 XE2011 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Form2frm2=newForm2();privatevoidMoveProc(){frm2.StartPosition=FormStartPosition.CenterParent;frm2.Left=this.Left+panel1.Left;frm2.Top=this.Top+panel1.Top;}publicForm1(){InitializeComponent(); Mov... 阅读全文
posted @ 2014-05-30 23:52 XE2011 阅读(745) 评论(0) 推荐(0) 编辑
摘要: C#如何检测一个字符串是不是合法的URLusingSystem.Text.RegularExpressions; //////检测串值是否为合法的网址格式//////要检测的String值///成功返回true失败返回falsepublicstaticboolCheckIsUrlFormat(stringstrValue){returnCheckIsFormat(@"(http://)?([\w-... 阅读全文
posted @ 2014-05-30 23:41 XE2011 阅读(2017) 评论(0) 推荐(0) 编辑
摘要: 附件:http://files.cnblogs.com/xe2011/WpfApplication3_downloadFile.rar使用 privatevoidButton_Click_1(objectsender,RoutedEventArgse){stringurl="http://fil... 阅读全文
posted @ 2014-05-30 23:39 XE2011 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: 方法1:InternetGetConnectedState [System.Runtime.InteropServices.DllImport("wininet")]privateexternstaticboolInternetGetConnectedState(outintconnectionDescription,intreservedValue);privatevoidbutton1_... 阅读全文
posted @ 2014-05-30 23:24 XE2011 阅读(566) 评论(0) 推荐(0) 编辑
摘要: 播放 WAV文件 strings=@"D:\Administrator\安装文件\完美世界国际版\patcher\skin\sounds\click.wav";System.Media.SoundPlayerplayer=newSystem.Media.SoundPlayer(s);player.PlaySync(); player.Play();//简单播放一遍player.Pl... 阅读全文
posted @ 2014-05-30 23:23 XE2011 阅读(177) 评论(0) 推荐(0) 编辑
摘要: vs2013附件 :http://download.csdn.net/detail/u012663700/7427461C# WPF 解压缩7zip文件 带进度条 sevenzipsharpWPF PNG实现的图形进度条.NET 3.5http://sevenzipsharp.codeplex.co... 阅读全文
posted @ 2014-05-30 23:04 XE2011 阅读(4119) 评论(0) 推荐(0) 编辑
摘要: 写法3 privatevoidbutton1_Click(objectsender,RoutedEventArgse) { System.Threading.Threadthread1=newSystem.Threading.Thread(()=>{ //过程});thread1.Start(); }使用控件时会引起其他信息: 由于其他线程拥有此对象,因此调用线程无法... 阅读全文
posted @ 2014-05-30 17:46 XE2011 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 判断网络文件 存在 3秒之内返回结果方法2: //////判断网络文件是否存在1.5秒得到出结果如这样的格式http://191.168.1.105:8000/CPW/wmgjUpdate.7z/////////privateboolUrlIsExists(stringURL){try{System.Net.WebRequestwebRequest1=System.Net.WebRequest... 阅读全文
posted @ 2014-05-30 14:35 XE2011 阅读(691) 评论(0) 推荐(0) 编辑
摘要: C# 操作INI 文件附件:http://files.cnblogs.com/xe2011/IniFiles_WindowsFormsApplication1.rar使用 //AppDomain.CurrentDomain.BaseDirectory+"abc.ini"//stringprivat... 阅读全文
posted @ 2014-05-29 13:50 XE2011 阅读(597) 评论(0) 推荐(0) 编辑
摘要: namespaceWpfApplication9{//////MainWindow.xaml的交互逻辑///publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();}privatevoidButton_Click(objectsender,RoutedEventArgse){Close();}For... 阅读全文
posted @ 2014-05-29 11:08 XE2011 阅读(327) 评论(1) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 49 下一页