05 2014 档案
摘要: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...
阅读全文
摘要:wpf ,PNG图形半透明窗体 ,使用webbrowser控件附件:http://files.cnblogs.com/xe2011/WpfApplication1_webbrowser_transparent.rarMainWindow1.XAMLMainWindow1.XAML.CSusingSy...
阅读全文
摘要:多选择文件打开对话框关键点可以打开多个文件实现过程 CStringfilter="文本文档(*.txt)|*.txt|所有文件(*.*)|*.*||"; CFileDialogOpenFileDialog(TRUE,NULL,"*.txt",OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_ALLOWMULTISELECT,fil...
阅读全文
摘要:判断文件夹是否存在关键点GetFileAttributesTheGetFileAttributesfunctionretrievesattributesforaspecifiedfileordirectory.ThisfunctionretrievesasetofFAT-styleattributeinformation.TheGetFileAttributesExfunctioncanobtai...
阅读全文
摘要:获取本地计算机的IP地址关键点WSAStartupTheWindowsSocketsWSAStartupfunctioninitiatesuseofWs2_32.dllbyaprocess.intWSAStartup(WORDwVersionRequested,LPWSADATAlpWSAData);实现过程 #include #pragmacomment(li...
阅读全文
摘要:const// registry entries for special paths are kept in : REGSTR_PATH_SPECIAL_FOLDERS = REGSTR_PATH_EXPLORER + '\Shell Folders'; {$EXTERNALSYM REGSTR_PATH_SPECIAL_FOLDERS} CSIDL_DESKTOP = $000...
阅读全文
摘要:XAMLButtonXAM.CSprivatevoidbutton1_Click(objectsender,RoutedEventArgse){webBrowser1.Navigate(newUri("http://w2i.wanmei.com/launcher/index.htm"));}xaml...
阅读全文
摘要:DELPHI XE6 FMX 附件:http://files.cnblogs.com/xe2011/IDHttp_fmx.7z 1 unit Unit1; 2 3 interface 4 5 uses 6 //引用 Vcl.ExtActns 7 Vcl.ExtActns, 8 9 System.Sy
阅读全文
摘要:方法2unit Unit1;interfaceuses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls;type TForm1 = class(...
阅读全文
摘要:DELPHI XE5 源码PASCAL:http://files.cnblogs.com/xe2011/FireMonkey_Webbrowser.rar 为了这个用上webbrowser真是费太大劲了 要让窗体2位置和窗体1的PANEL坐标一致 窗体样式要为none Web坐标才会正确 但是fir
阅读全文