摘要:
<!--WizRtf2Html Charset=0 --> Microsoft.Win32.OpenFileDialog openFileDialog1 = new Microsoft.Win32.OpenFileDialog(); openFileDialog1.Filter = "(*.cup) 阅读全文
摘要:
VS2013 WPF 源码:http://ys-e.ys168.com/2.0/276581436/j4G4J63367IMLIUJjsgW/VS2013_WpfApplication1_patcher2014-6-1-90724.rar应用程序:链接:http://pan.baidu.com/s/... 阅读全文
摘要:
.只容许程序运行1个实例关键点.CreateMutexTheCreateMutexfunctioncreatesoropensanamedorunnamedmutexobject.HANDLECreateMutex(LPSECURITY_ATTRIBUTESlpMutexAttributes,//SDBOOLbInitialOwner,//initialownerLPCTSTRlpName//ob... 阅读全文
摘要:
方法2 当程序已经运行了 再运行这个程序时,则显示当前这个窗体 http://code.3rbang.com/cshape-run-one/ VS2013附件:http://files.cnblogs.com/xe2011/WpfApplication_System.Threading.Mutex.... 阅读全文
摘要:
[System.Runtime.InteropServices.DllImport("user32.dll",EntryPoint="SetWindowPos")]publicstaticexternintSetWindowPos(inthwnd,inthWndInsertAfter,intx,inty,intcx,intcy,intwFlags); constintHWND_TOP=... 阅读全文
摘要:
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... 阅读全文
摘要:
C# 操作INI 文件附件:http://files.cnblogs.com/xe2011/IniFiles_WindowsFormsApplication1.rar使用 //AppDomain.CurrentDomain.BaseDirectory+"abc.ini"//stringprivat... 阅读全文
摘要:
namespaceWpfApplication9{//////MainWindow.xaml的交互逻辑///publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();}privatevoidButton_Click(objectsender,RoutedEventArgse){Close();}For... 阅读全文