신뢰사이트 등록하기
2010.07.13 by 탑~!
VSTO
2010.06.03 by 탑~!
OS 버전 체크
2010.02.03 by 탑~!
포함 리소스로 지정된 파일 읽기
정규식 몇개...
2010.02.01 by 탑~!
IP 주소 가져오기
2009.12.22 by 탑~!
shortcut 만들기
2009.10.09 by 탑~!
Connection strings for Informix
2009.08.14 by 탑~!
//using Microsoft.Win32 RegistryKey osKey = Registry.CurrentUser.OpenSubKey(@"Software\\Microsoft\\Windows\\CurrentVersion\Internet Settings\\ZoneMap\\Domains\\IP주소); if (osKey == null) { RegistryKey oNewKey = Registry.CurrentUser.CreateSubKey(@"Software\\Microsoft\\Windows\\CurrentVersion\Internet Settings\\ZoneMap\\Domains\\IP주소"); oNewKey.SetValue("http", 0x00000002); }
C# 2010. 7. 13. 21:07
http://vsto.tistory.com/category/VSTO
C#/VSTO 2010. 6. 3. 16:34
OperatingSystem os = Environment.OSVersion; Version vs = os.Version; vs.Major; vs.Minor; vs.Revision; vs.Build; 을 이용하여 버전을 확인하면되며 XP의 경우 Major 값이 5이며, Vista 이상의 경우 Major 값이 6이다. 따라서 OS 버전 체크는 다음과 같이 하면된다 if ( Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6) ==> 32NT체계 이면서 Major 값이 6이상인 즉, VISTA를 말함.
C# 2010. 2. 3. 12:33
//프로젝트에 포함된 파일의 속성 중 빌드 작업을 포함 리소스로 지정한 파일을 코드상에서 접근하여 사용하고자 할 경우 Stream stream = this.GetType().Assembly.GetManifestResourceStream(this.GetType(), "myFile.gif"); // Assembly.GetManifestResourceNames() 함수로 리소스의 이름을 반환받았을때의 이름을 사용 Stream stream = this.GetType().Assembly.GetManifestResourceStream("MyAssemblyName.FolderName.FileName.gif"); // MyClass라는 클래스내의 Static 함수에서 포함 리소스를 이용하고자 할경우 Stream str..
C# 2010. 2. 3. 12:32
전화번호 : 0\d{2,3}\-\d{2,4}\-\d{3,4} 휴대폰번호 : 01[16789]\-\d{2,4}\-\d{3,4} 주민등록번호: \d{6}\-\d{7} domain : http\:\/\/[\w\-]+(\.\[\w\-]+)+ http://www.regexlib.com/
C# 2010. 2. 1. 11:51
private String GetIpAddress() { String strIpAddress = String.Empty; ObjectQuery objQuery = new ObjectQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled='True'"); ManagementObjectSearcher mobjSearcher = new ManagementObjectSearcher(objQuery); try { foreach (ManagementObject obj in mobjSearcher.Get()) { strIpAddress = ((String[])obj["IPAddress"])[0]; break; } } catch (Exception..
C# 2009. 12. 22. 16:09
using IWshRuntimeLibrary; private WshShellClass WshShell; private void btnShortcut_Click(object sender, System.EventArgs e) { // Create a new instance of WshShellClass WshShell = new WshShellClass(); // Create the shortcut IWshRuntimeLibrary.IWshShortcut MyShortcut; // Choose the path for the shortcut MyShortcut = (IWshRuntimeLibrary.IWshShortcut)WshShell.CreateShortcut(@"C:\MyShortcut.lnk"); //..
C# 2009. 10. 9. 15:02
The following providers can be used when connecting to Informix IBM Informix .NET Provider (IfxConnection) Luxena dbExpress driver for Informix Pro IBM Informix OLE DB Provider .NET Framework Data Provider for OLE DB (OleDbConnection) IBM Informix ODBC Driver Informix-CLI 2.5 .NET Framework Data Provider for ODBC (OdbcConnection) IBM Informix .NET Provider Type: .NET Framework Class Library Usag..
C# 2009. 8. 14. 17:01