ããããã£ï¼Range.NumberFormat ããããã£ï¼Range.NumberFormatLocal //oRange:Excel.Rangeã¤ã³ã¹ã¿ã³ã¹ // 表示形å¼ãå°æ°ç¹ä»¥ä¸2æ¡ã®ãã¼ã»ã³ãã¼ã¸ã«è¨å® oRange.NumberFormat = "0.00%";
æ¥æï¼ 2012/05/29 09:27ååï¼ VBã¬ã¹ãã¥ã¼(è±ã¡ãã) *********************************************************************************** * ã«ãã´ãªã¼ï¼[ã¨ã¯ã»ã«][][]                                                      * * ãã¼ã¯ã¼ãï¼Excel VBA,Excel 2010,æ¡åºåã,ã¨ã¯ã»ã«,ã»ã«ã®è¡¨ç¤ºå½¢å¼,ãã©ã¼ããã  * *********************************************************************************** '==============================================================
é åãã³ã¬ã¯ã·ã§ã³å ã®è¦ç´ ã並ã³æ¿ããããã§ã¯ãé åãã³ã¬ã¯ã·ã§ã³å ã®è¦ç´ ã並ã³æ¿ããæ¹æ³ã説æãã¾ããããã«ã並ã³æ¿ãã®æ¹æ³ãå¤æ´ããæ¹æ³ãç´¹ä»ãã¾ãã Array.Sortã¡ã½ããã使ãåºæ¬çã«ã¯ãé åã®ä¸¦ã³æ¿ãã¯ãArray.Sortã¡ã½ããï¼.NET Framework 2.0以éã§ã¯ãArray.Sortã¸ã§ããªãã¯ã¡ã½ããï¼ã§è¡ãã¾ããã³ã¬ã¯ã·ã§ã³ã®ä¸¦ã³æ¿ãããSortã¡ã½ããã§ãã Array.Sortã¯ã.NET Framework 4.5以éã§ã¯ãã¤ã³ããã½ã¼ãï¼Introsortï¼ã¢ã«ã´ãªãºã ã使ç¨ããè¨ç®æéã¯ææªã§O(n log n)ã§ãã.NET Framework 4.0以åã§ã¯ãã¯ã¤ãã¯ã½ã¼ãï¼quicksortï¼ã¢ã«ã´ãªãºã ã使ç¨ããè¨ç®æéã¯å¹³åã§O(n log n)ãææªã§O(n ^ 2)ã§ãã ArrayListãList<T>ã®Sortã¡ã½ããããå
System.Arrayã¯ã©ã¹ã¯ãé åã表ãã¯ã©ã¹ã§ãã .NETã§ã¯ãã©ããªé åã§ãä¾å¤ãªããã®ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã§ãã é åããªãã¸ã§ã¯ããªã®ã§ãå½ç¶ãªããã¡ã½ãããããããã£ãæã£ã¦ãã¾ãã æ®éã«ä½¿ãã®äºãå¿è«ã§ããã®ã§ããã.NETã®é åã«ã¯ä¾¿å©ãªæ©è½ãããããããã¾ãã javaããã£ã¦ãã人ããè¦ãã¨ã.NETã®é å㯠javaã®é åã¨ãã¦ã®æ©è½ + java.util.Arraysã®æ©è½ + commons.collectionã®ä¸é¨ã®æ©è½ ã®ãããªæãã ã¨æãã¨ããããããããããã¾ããã çµæ§ãå¤æ©è½ã§ãã 以ä¸ããµã³ãã«ã§ãã ã¡ãªã¿ã«ãSystem.Arrayã«ã¦å®ç¾©ããã¦ãã ForEach Find/FindAll ConvertAll TrueForAll Exists ãªã©ã®è¿°èªç³»ã®ããªã²ã¼ããå©ç¨ãã¦å¦çãããã¿ã¤ãã® ã¡ã½ããã¯ãSystem.Coll
é åãListãåºã«ãã¦Dictionaryãä½æããããã§ã¯ãé åãListããã¼ãå¤ã®åºã«ãªãããã«ãã¦ãDictionaryï¼System.Collections.Genericåå空éï¼ãä½æããæ¹æ³ãç´¹ä»ãã¾ãããªãDictionaryã¯ã©ã¹ã¯ã.NET Framework 2.0以éã§ä½¿ç¨ã§ãã¾ãã ããã§ç´¹ä»ãã¦ãããµã³ãã«ã§ã¯é åãåºã«ãã¦Dictionaryãä½æãã¦ãã¾ãããé åã®ä»£ããã«ã³ã¬ã¯ã·ã§ã³ã使ç¨ãã¦ãåãããã«ã§ãã¾ãã Foræã使ç¨ããæ¹æ³ã¾ãã¯Foræã使ã£ããä½ã®å·¥å¤«ããªããåºæ¬çãªæ¹æ³ããç´¹ä»ãã¾ãããã®æ¹æ³ãªãã°ãDictionaryã ãã§ãªããHashtableã§ãã§ãã¾ãã 以ä¸ã®ä¾ã§ã¯ã2ã¤ã®é åã®çæ¹ããã¼ãããçæ¹ãå¤ã«ãªããããªDictionaryãä½æãã¦ãã¾ãã 'Imports System.Collections.Generi
ã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³ ãã¼ã¸ä¸è¦§ã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³ã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(1) Listã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(2) Dictionaryã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(3) SortedListã¨SortedDictionaryã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(4) LinkedListã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(5) Stackã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(6) Queueã¸ã§ããªãã¯ã³ã¬ã¯ã·ã§ã³(7) HashSetã¨SortedSet System.Collections.Generic.Dictionaryã¯ã©ã¹ã¯ã¤ã³ããã¯ã¹ã§ã¯ãªããã¼ã«ãã£ã¦ã³ã¬ã¯ã·ã§ã³å ã®è¦ç´ ã«ã¢ã¯ã»ã¹ã§ããã³ã¬ã¯ã·ã§ã³ã§ãããã·ã¥ãã¼ãã«ãé£æ³é åã¨å¼ã°ãããã®ã«ç¸å½ãã¾ãã ã³ã¬ã¯ã·ã§ã³å ã®è¦ç´ æ°ãåçã«å¢æ¸ã§ããç¹ã¯Listã¨åãã§ãããDictionaryã¯å¸¸ã«ãã¼ã¨ããã«å¯¾å¿ããå¤ã®å¯¾(ãã¢)ãæ ¼ç´ãã¾
ããã·ã¥ãã¼ãã«ã¨ã¯ããã¼ï¼keyï¼ã¨å¤ï¼valueï¼ã®ãã¢ãä¿æãã¦ããã³ã¬ã¯ã·ã§ã³ã§ãããé常ã®é åããªã¹ããã¤ã³ããã¯ã¹çªå·ã«ããåå¤ï¼åè¦ç´ ï¼ã«ã¢ã¯ã»ã¹ã§ããã®ã«æ¯ã¹ã¦ãããã·ã¥ãã¼ãã«ã§ã¯ãã¤ã³ããã¯ã¹çªå·ã®ä»£ããã«ãã¼ãç¨ãã¦ããã®åå¤ã«ã¢ã¯ã»ã¹ãããã¨ãã§ããããã¼ã¨ããã®ãã¼ããé£æ³ãããï¼ãã¼ã«å¯¾å¿ä»ãããã¦ããï¼å¤ã®ãã¢ãä¿æãã¦ãããããããã·ã¥ãã¼ãã«ã¯ãé£æ³é åãã¨ãå¼ã°ãããããã·ã¥ãã¼ãã«ã®ç¹é·ã¯ãæå®ãããã¼ãããããã«å¯¾å¿ããå¤ãé«éã«å¾ããããã¨ã§ããã .NET Framework 1.xã®ã¯ã©ã¹ã©ã¤ãã©ãªã§ã¯ãããã·ã¥ãã¼ãã«ã¯Hashtableã¯ã©ã¹ï¼System.Collectionsåå空éï¼ã§å®è£ ããã¦ãããã.NET Framework 2.0ã§ã¯Dictionaryã¸ã§ããªãã¯ã¯ã©ã¹ï¼System.Collections.Genericå
æååå ã«æå®ãããæååãããã調ã¹ããã®ä½ç½®ãç¥ãããã§ã¯ãæååï¼Stringï¼å ã«æå®ãããæååããããã調ã¹ãæ¹æ³ã¨ããã®ä½ç½®ãç¥ãæ¹æ³ãç´¹ä»ãã¾ãã String.IndexOfã¡ã½ããã使ãString.IndexOfã¡ã½ããã¯ãæååå ã«æå®ããæååã¨ä¸è´ããé¨åãããããæ¢ããè¦ã¤ãã£ãããæåã«è¦ã¤ãã£ãä½ç½®ã0以ä¸ã®æ´æ°ã§è¿ãã¾ããè¦ã¤ãããªããã°ã-1ãè¿ãã¾ãã
Dictionaryã®ãã¼ã«è¤æ°ã®å¤ã使ãæ¹æ³ã«ã¤ãã¦ãèå¯ãã¦ã¿ã¾ãã Dictionaryã®ãã¼ã«è¤æ°ã®å¤ã使ãæ¹æ³ Dictionaryã®ãã¼ã«è¤æ°ã®å¤æ°å¤ã使ãããå ´åï¼ä¾ãã°ãã¯ã©ã¹åã¨åºå¸çªå·ããã¼ã¨ãã¦æ°åãå¤ã¨ããããªã©ï¼ã«ããã¤ãã®æ¹æ³ãèãããã¾ããã以ä¸3ã¤ã«åé¡ããããã¨æãã¾ãã ãã¼ã®å¤ãé£çµãããªã©ãã¦1ã¤ã®ãã¼ãä½æãã var className = "Aã¯ã©ã¹"; var number = 1; var name = "è岩 ä¸å³"; var students = new Dictionary<string, string>(); students.Add(className + number, name); Console.WriteLine(students[className + number]); Dictionaryãå¤ã¨ããDictionar
ãã¤ã¼ã âæ¦è¦â Charactersãªãã¸ã§ã¯ãã使ã£ã¦ãã»ã«ã®ä¸ã®æåã®ä¸é¨ã ãè²ãå¤ãããã¨ãã§ãã¾ãã ã»ã«ã«å ¥åããã¦ããæåã®è²ãå¤æ´ããã«ã¯ãFontãªãã¸ã§ã¯ãã®ColorIndexããããã£ãã¾ãã¯Colorããããã£ã使ç¨ãã¾ãã 次ã®ãµã³ãã«ã¯ãã»ã«A1ã¨A2ã®æåã赤è²ã«è¨å®ãã¾ãã âãµã³ãã«â Sub Sample1() Range("A1").Font.ColorIndex = 3 Range("A2").Font.Color = RGB(255, 0, 0) End Sub ColorIndexããããã£ã«ã¯ãè²ã表ãçªå·ãæå®ãã¾ãã å®æ°ã¯ããã¾ããã®ã§ãæ°åã§æå®ãã¦ãã ãããã©ã®çªå·ãä½è²ã表ããã¯ããã¯ãè¨é²ã§ç¢ºèªããã¨ããã§ãããã ãã®ããã«ã»ã«å ¨ä½ã®æåè²ãå¤æ´ããã«ã¯Fontãªãã¸ã§ã¯ããæä½ããã°ããã®ã§ãããæååã®ä¸é¨åã ãè²ãå¤ã
ColorIndex ããããã£ã¯ãæå®ãããªãã¸ã§ã¯ãã®è²ãåå¾ã»è¨å®ãã¾ããè¨å®ã«ã¯ãã«ã©ã¼ãã¬ããã®ãã¬ããçªå·ã使ã£ã¦è²ãæå®ãã¾ãã ãæ¸å¼ã ï¼åå¾ï¼ result = Object.ColorIndex ï¼è¨å®ï¼ Object.ColorIndex = index å¼æ°ã»æ»ãå¤ object  ã»ã»ã»Â  対象ã¨ãªã ãªãã¸ã§ã¯ããæå®ãã¾ãã Border ãªãã¸ã§ã¯ãï¼ç½«ç·ï¼ãBorders ãªãã¸ã§ã¯ãï¼è¼ªéç·ï¼ãFont ãªãã¸ã§ã¯ãï¼æåï¼ãInterior ãªãã¸ã§ã¯ãï¼ã»ã«ï¼ãFormatColorï¼ã«ã©ã¼ã¹ã±ã¼ã«ï¼ ãªã© index  ã»ã»ã»Â  ã«ã©ã¼ãã¬ããã®è²ã表ã 1 ï½ 56 ã®ãã¬ããçªå·ãã¾ãã¯ãXlColorIndex åæå ã®å®æ°ã¾ãã¯ãã®å¤ãæå®ãã¾ãã
é£è¼ï¼Entity Framework 4.1å ¥é 第1åãEF 4.1ã®ç®çæ©è½ãã³ã¼ãã»ãã¡ã¼ã¹ãããç解ããã WINGSããã¸ã§ã¯ããåäº æ¯ ï¼ç£ä¿®ï¼å±±ç° 祥å¯ï¼ 2011/06/03 â Entity Framework 4.1ã®æ¦è¦ 2011å¹´4æ11æ¥ãADO.NETã®ã³ã³ãã¼ãã³ãã§ããEntity Frameworkï¼ä»¥éãEFï¼ã®æ°ãããã¼ã¸ã§ã³4.1ããªãªã¼ã¹ãããããã¼ã¸ã§ã³çªå·ã®å¢åã¯ä»¥åã®ã4ãããã0.1ãã ãã§ããããEF 4.1ã«ã¯ããã¾ã§ã®ãã¼ã¸ã§ã³ã«ã¯ãªãããã³ã¼ãã»ãã¡ã¼ã¹ããã¨ããæ°ããéçºã¹ã¿ã¤ã«ã追å ãããããç°¡æ½ãªã³ã¼ãã§ãã¼ã¿ãã¼ã¹éçºãè¡ããããã«ãªã£ãã EF 4.1ã®ä¸»ãªæ°æ©è½ã¯ä»¥ä¸ã®2ã¤ã§ããã ï¼1ï¼æ°ããéçºã¹ã¿ã¤ã«ã§ããã³ã¼ãã»ãã¡ã¼ã¹ãã®ãµãã¼ã ã½ã¼ã¹ã»ã³ã¼ãã®ã¿ã§ãã¼ã¿ãã¼ã¹ã®è¨è¨ã¾ã§è¡ããã³ã¼ãã»ãã¡ã¼ã¹ãã¯ãæ¬é£è¼ã§ä¸»
ããã®ã¨ãããæ¸ãã¦ããªãã£ãã®ã§ãä¹ ãã¶ãã®è¨äºã«ãªãã¾ãã ãã2é±éã¯Androidã¥ããã§ããããããã§ã¯C#ã®è¨äºãæ¸ãã¾ãã ï¼ããããä½ãæ¸ããªãã¡ãã¨æã£ã¦ãè¦ã«æ¥ããâæ¸ããæ®ã£ã¦ãã®ã§ãã®ã¾ã¾æµç¨ã(^^âªãï¼ ã§ãæ¬é¡ã§ãã ã¡ãã»ã¼ã¸ããã¯ã¹ãæåé¢è¡¨ç¤ºããããå ´åã ãã¨ãã°ãæ°çã®éç¥ã¨ãã表示ããããå ´åã§ããããã¢ãããã©ã¼ã ä½ãã®ãé¢åãªã¨ãã¨ãããªã»ã»ã»ã 以ä¸ã®æ¹æ³ã§æåé¢è¡¨ç¤ºã§ãã¾ãã ï¼èªåããããã§ã°ã°ã£ã¦ããã¾ããããããæãã¤ããããã§ããã»ã»ã»ï¼ using(Form dummyForm =new Form()){ dummyForm.TopMost = True; MessageBox.Show(dummyForm, "MessageBox ã¯ã©ã¹ã§ SystemModal ã¨åæ§ã«è¡¨ç¤º") ; dummyForm.TopMost = F
ç¾å¨ BackgroundWorker ã³ã³ãã¼ãã³ãã使ã£ããã«ãã¹ã¬ããã¢ããªã±ã¼ã·ã§ã³ã使ã£ã¦ã¾ãã ã¡ã¤ã³ã¹ã¬ããã¯ãã©ã¼ã ã®UIã表示ããå¥ã¹ã¬ããã§åãBackgroundWorker.DoWorkã¤ãã³ããã³ãã©ã§æéã®ãããå¦çããã¦ãã¾ãã ãã®å¥ã¹ã¬ããå´ã§ã¡ãã»ã¼ã¸ããã¯ã¹ã表示ããã¨ãã«ãã¡ã¤ã³ã¹ã¬ããã®ãã©ã¼ã UIããæåã«è¡¨ç¤ºããã ã㤠æåé¢ã«è¡¨ç¤ºã¨ããã®ãä»åã®è¦ä»¶ã§ãã (ã¡ãªã¿ã«ããã©ã¼ã ã® TopMost ããããã£ã true ã§ãæåé¢ã«è¡¨ç¤ºã«ãªãã®ã§ãã¡ãã»ã¼ã¸ããã¯ã¹ããæ製ã§ä½ã£ã¦ TopMost ããããã£ã使ãã¨ããæ¹æ³ãã¨ããããããã¾ããã) MessageBox ã¯ã©ã¹ã«ã¯ IWin32Window ãæå®ãããã¨ã§ãæå®ãããªãã¸ã§ã¯ããåé¢ã«è¡¨ç¤ºãã Show ã¡ã½ãããããã¾ãããä»åã¯æåé¢ã«è¡¨ç¤ºãããã®ã§ããã®æ¹æ³ã¯ä½¿ã
é£è¼ç®æ¬¡ æºå¸¯ãµã¤ãã¸ã®èªå°ãªã©ã§ãã使ããããQRã³ã¼ããã ãã.NET Frameworkã§å©ç¨ã§ãããã¼ã«ã¨ãã¦ãOpen Source QRCode Libraryãï¼ä»¥ä¸QRCode Libraryï¼ãããã ä¸è¨ã®ãªã³ã¯ãããã¦ã³ãã¼ãã§ããZIPãã¡ã¤ã«ã«ã¯ãè¤æ°ã®ããã¸ã§ã¯ããããªãã½ãªã¥ã¼ã·ã§ã³ãå«ã¾ãã¦ãããããã®ä¸ã®ãQRCodeLibãããã¸ã§ã¯ãï¼ThoughtWorks.QRCode.dllï¼ããQRã³ã¼ãçæã«å¿ è¦ãªã©ã¤ãã©ãªã§ããã ã¾ããåZIPãã¡ã¤ã«ã«å«ã¾ãããµã³ãã«ã»ããã°ã©ã ãQRCodeSampleAppããå®è¡ããã¨ãQRã³ã¼ãã®ä½æã«å¿ è¦ãª4ã¤ã®ãã©ã¡ã¼ã¿ãåããã 以ä¸ã«ããã®4ã¤ã®ãã©ã¡ã¼ã¿ã«ã¤ãã¦ç°¡åã«èª¬æããã詳細ã«ã¤ãã¦ã¯ãQRã³ã¼ãã®éçºå ã§ããæ ªå¼ä¼ç¤¾ãã³ã½ã¼ ã¦ã§ã¼ãã®ãµã¤ããQR Code.comããåèã«ãã¦ããã ãããã
ããªã³ã¿ã®ãã¼ããç¶æ ãåå¾ãããé常使ãããªã³ã¿ãåå¾ãè¨å®ãããã¨åãããã«ãWMIã®Win32_Printerã使ã£ã¦ããªã³ã¿ã®æ å ±ãåå¾ã§ãã¾ãããã¼ãã¯PortNameããããã£ãç¶æ ã¯PrinterStatusããããã£ã§åå¾ã§ãã¾ãã ã¾ããP/Invokeã§GetPrinteré¢æ°ãå¼ã³åºããã¨ã«ãããããªã³ã¿ã®æ å ±ãåå¾ãããã¨ãã§ãã¾ããããã§ã¯ãã®æ¹æ³ãç´¹ä»ãã¾ãã ä¸ã«ããªã³ã¿ã®æ å ±ãPRINTER_INFO_2æ§é ä½ã§åå¾ããããã®ã¡ã½ããï¼GetPrinterInfoã¡ã½ããï¼ã®ãµã³ãã«ã示ãã¾ãã ãªããã®ã³ã¼ããæ¸ãããã«ãNewsgroups:microsoft.public.dotnet.framework.interop / Subject:Solution: Printer Port and Driver Information (PRINTER_I
â GridViewã«ã¹ã¿ãã¤ãºã®ãã¤ã³ã ããã§ãã¤ã³ãã¨ãªãç¹ã¯3ã¤ããã¾ãã以ä¸ã«ããããé ã«èª¬æãã¦ããã¾ãã ï¼1ï¼GridViewã³ã³ããã¼ã«ã§å©ç¨å¯è½ãªãã£ã¼ã«ãåã¯6ç¨®é¡ GridViewã³ã³ããã¼ã«ã§ã¯ãé ä¸ã®åæ å ±ãã«ã¹ã¿ãã¤ãºããããã«ä»¥ä¸ã®è¡¨2ã®ãããªXxxxxFieldãã£ã¼ã«ããå©ç¨ã§ãã¾ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}