delphi7入门与程序设计手册(borland官方文档)


! ˢܝᄃ඀ёనࢍ͘Ί Borland® DelphiTM 7 for WindowsTM Borland Software Corporation 100 Enterprise Way, Scotts Valley, CA 95066-3249 www.borland.com ! ! ώ͘Ίܼдέ៉Оᄦ ྍ̳Φٙѣ。ٺώ३͔ٙ̚ϡ׎ι̳ΦயݡЩჍĎ׎થᇾᛳ ٙѣ Inprise ׶ Borland ۞யݡЩჍ࠰ߏ Borland Software Corporation.̝થᇾٕොΊથᇾĄ ඾үᝋᛳ Borland ̳ΦٙѣĎᖙᄦυտĄ COPYRIGHT © 1984, 2004 Borland Software Corporation. i ޽ؠ࿰న૞९ܑ̈́ॾ.....................................4-9 నؠ૞९࿰నࣃ......................................4-9 నؠ૞९ᛳّ.................................................4-9 4-8....................... ีטщ྅ ActiveX ଠ ֹϡ frame........................................4-8 щ྅̮ІइІ..........................................4-7 6-4..........................................ۍϲ̮Іᇹޙ ࢦາщଵ̮Іሹ......................................4-5 ҋࢎ̮Іሹ.....................................................4-5 ᐼхॸࢬ੨ཉ..........................................4-4 ઃҞё̍׍ෛ඄......................................4-2 щଵΑਕܑᄃ̍׍Е..............................4-1 щଵଋ۞̍үડા.........................................4-1 ҋࢎᒖဩ 4-1 ௐ 4 ౢ ݭၗऱ .............................................3-15 COM and ActiveX ...............................3-15 DLLs ......................................................3-14 ҋࢎ̮І................................................3-14 Data Dictionary .............................3-14 Database Desktop .........................3-13 SQL Explorer (Database Explorer) ...3-13 BDE Administrator.......................3-13 ྤफ़ऱᑕϡ඀ё....................................3-12 ጡᑕϡ඀ё...........................3-11ڇWeb Ҩ CLX ᑕϡ඀ё .......................................3-10 ૞९჌ᙷ.......................................................3-10 ઼ᅫ̼۞ᑕϡ඀ё.........................................3-9 ̶൴ᑕϡ඀ё.................................................3-9 ૞९በᛌ̈́ੵ᏾.............................................3-7 ֹϡ̮І඀ёऱ......................................3-6 ᇤᆷְІ఍ந඀Ԕ..................................3-5 ᇤᆷ඀ёቅ.....................................................3-5 నؠ̮Іপّ..........................................3-3 ཉ̮І..................................3-3ٸ˯дܑॾ ϲֹϡ۰̬ࢬ.............................................3-2ޙ ΐˢྤफ़ሀ௡..........................................3-2 ϲ૞९.........................................................3-1ޙ ֹϡ Delphi నࢍ඀ё 3-1 ௐ 3 ౢ ࿰ؠ̍үܑ...................................................2-15 ૞९ᕱᜓጡ...................................................2-14 ૞९გநࣶ...................................................2-13 ඀ёቅᕱᜓጡ...............................................2-13 ᑭෛ࣒̈́Լܑॾᑫ९............................2-12 Diagram ................................................2-11 Code!Browsing.............................2-10 Class Completion............................2-9 ඀ёቅበᏭጡ.................................................2-7 Іᚗऱ.........................................................2-6ۏ ဦ.....................................................2-5ېІፘۏ Іᑭෛጡ.........2-4ۏ̮ІሹĂܑಏనࢍ̍׍̈́ ֹϡ̍׍ЕĂΑਕܑ.....................................2-3 ፋЪᒖဩ.........................................................2-1 ୁજ Delphi....................................................2-1 ᄮᙊᒖဩ 2-1 ௐ 2 ౢ ͘Ίၚּ.........................................................1-9 ચ..........................1-9ڇBorland ฟ൴ˠࣶ͚೯ F1 Help....................................................1-7 7-1..................................................ځቢ˯ᄲ ٙࢋ۞ྤੈ.............................................1-7זԱ Delphi ොΊ...................................................1-4 Delphi ߏ̦ᆃĉ............................................1-3 ᖎ̬ 1-1 ௐ 1 ౢ ܝDelphi ԣిˢ ϫᐂ ii ϡᑫ९Қ߹..........................................5-7ֹ 6-5................................ڱᑫ९Ꮾˢ/Ꮾ΍͞ ఍நᑫ९.........................................................5-6 ֹϡҜཉ׶̂̈۞ᛳّ ...................5-5 ವԱপؠҜཉ ...................................5-5 Қ߹Ҝཉ׶̂̈......................................5-4 Ω˘࣎Қ߹..5-4ז૟ྤफ़ଂ˘࣎Қ߹ኑᄦ ᏮˢᄃᏮ΍фҚ ...............................5-3 ᏮˢᄃᏮ΍̮І ...............................5-3 2-5....... ڱҚ߹̚ᏮˢᄃᏮ΍ྤफ़۞͞ ֹϡҚ߹ᏮˢٕᏮ΍ྤफ़......................5-2 ֹϡҚ߹.........................................................5-2 ֹϡ BaseCLX 5-1 ௐ 5 ౢ д̶೸ёᑕϡ඀ёֹ̚ϡ̬ࢬ............4-24 ֹ̙ϡણ҂ࢍᇴ .............................4-23 ֹϡણ҂ࢍᇴ .................................4-22 І۞੃ጸវგந........................4-22ۏ̬ࢬ ჸЪ .................................................4-21 ֹϡ implements ֽ؎Ї ..............4-19 ඀ёቅࢦϡ׶؎Ї................................4-19 ֹϡ as ྻზ̄ ......................................4-18 TInterfacedObject.................................4-17 ၁ү IInterface ......................................4-17 д඀Ԕֹ̚ϡ̬ࢬ................................4-16 дᙷҾ̝มВϡ̬ࢬ............................4-15 ֹϡ̬ࢬ.......................................................4-14 ؠཌྷາᙷҾ...................................................4-11 ̮І׶ጾѣᝋ........................................4-11 І...................4-10ۏϲĂயϠᇹּĂ׶ঐໝޙ Іតᇴ.................................................4-9ۏֹϡ Ә .......................................4-8ކ published privateĂprotectedĂpublic ׶ ቑಛ׶ࢨؠෟ.................................................4-7 ଂᙷҾᚶٚྤफ़׶඀ёቅ.............................4-6 Լត̮І۞ЩჍ......................................4-5 І....................................4-2ۏ ᑭෛ Delphi Іߏ̦ᆃ.....................................................4-1ۏ Іሀݭ 4-1ۏֹϡ ௐ 4 ౢ TWinControl/TWidgetControl ̶͚ ......3-11 TControl ̶͚.......................................3-10 TComponent ̶͚..................................3-9 TPersistent ̶͚ .....................................3-8 TObject ̶͚ ...........................................3-7 3-5.....................................ีטІĂ̮Ї́ଠۏ І ...................................................3-4ְ 4-3................................................... ڱ͞ ᛳّ ...................................................3-3 І..................................3-3ְ̈́ڱᛳّă͞ ˞ྋ̮І඀ёऱ.............................................3-1 ֹϡ̮І඀ёऱ 3-1 ௐ 3 ౢ Ҷཌᑕϡ඀ё.................................................2-6 ඀ёੵ᏾.........................................................2-5 በᛌ૞९.........................................................2-5 ᇤᆷ඀ёቅ.....................................................2-4 ϲ૞९.........................................................2-3ޙ నࢍᑕϡ඀ё.................................................2-2 ፋЪฟ൴ᒖဩ.................................................2-2 ֹϡ Delphi ฟ൴ᑕϡ඀ё 2-1 ௐ 2 ౢ ચ.............................................1-3ڇฟ൴۰͚೯ ͘Ίၚּ.........................................................1-3 ͘Ί̰ट.........................................................1-1 ᖎ̬ 1-1 ௐ 1 ౢ నࢍ Delphi ᑕϡ඀ё ௐ˘ొЊ నؠ඀ёቅᕱᜓጡᏴี........................4-12 ҋࢎ඀ёቅበᏭጡ................................4-12 ҋࢎܑಏనࢍ̍׍................................4-11 నؠ၆̍׍۞ઐр.......................................4-11 Іᚗऱ............................4-10ۏזۍᆧΐᇹ iii ពϯ׶ᇤᆷВֳ۞ְІ඀ёቅ .......6-7 ϡ Sender ણᇴ.............................6-6ֹ 6-6......ڱனх۞ְІ఍ந͞ז૟ְІాඕ 5-6..................................ڱವԱְІ఍ந͞ 5-6..............ڱϲ࿰నְІ۞ְІ఍ந͞ޙ 4-6..........................ڱϲາ۞ְІ఍ந͞ޙ 4-6.............................ڱϡְІ׶ְІ఍நֹ͞ 3-6.........................................................ڱΨ͞ײ дેҖॡഇనؠᛳّ..............................6-3 ֹϡᛳّበᏭጡ ...............................6-3 дనࢍॡഇనؠᛳّ..............................6-2 నؠ̮Іᛳّ.................................................6-2 ֹϡ̮І 6-1 ௐ 6 ౢ ֹϡ TPublishedVariantType......5-61 ϡ TInvokeableVariantType ....5-60ֹ 59-5....................................ڱ͚೯ᛳّ̈́͞ ᇤᆷᅃӄ඀Ԕ........................................5-58 ΃ᙷҾ .........................................5-58ޢ ֹϡ TCustomVariantType ྶˢ̈́ᐼхҋࢎ Variant...............5-57 ኑᄦ̈́୻ੵҋࢎ Variant......................5-56 ၁ү˘̮ྻү̄ .............................5-55 ၁үͧྵྻү̄ .............................5-53 ၁ү˟̮ྻү̄ .............................5-51 ྿јᖼݭ .........................................5-49 ϲ఍நҋࢎ Variant ݭၗ۞ᙷҾ.....5-49ޙ ᐼхҋࢎ Variant ݭၗ۞ྤफ़.............5-48 ֹϡҋࢎ Variant.........................................5-47 ֹϡᙷҾֽგநೱზ............................5-44 ё........................................5-42בֹϡೱზ ϲᖎಏ۞ೱზछ୉֭ΐˢಏҜ........5-41ޙ ณᙷݭ................................5-40ޘΐˢາ۞ ซҖኑᗔ۞ೱზ .............................5-40 ซҖᖎಏ۞ೱზ .............................5-39 ેҖೱზ................................................5-39 ಏҜೱზ.......................................................5-39 ЕО͚೯.......................................................5-38 ϲ drawing spaces ..................................5-37ޙ фҚ࠹ᙯበᛌ޽ϯ................................5-36 ૟ડાតᇴ็ј PChar .................5-35 ็а PChar ડાតᇴ ....................5-35 фҚ࠹ֶّ .....................................5-34 фҚᖼј PChar...................................5-34 ஄Ъ֭ᖼೱфҚݭၗ............................5-34 ࣃ........................5-32ܐӘ׶నؠކфҚ۞ གྷ૱ֹϡ۞࿬ඕԍфҚ඀Ԕ................5-30 фҚ඀Ԕ........................5-27ܜགྷ૱ֹϡ۞ ᆵф̮඀Ԕ............................................5-26 ఍நфҚ.......................................................5-26 І .....................5-25ۏдфҚҚЕΐˢ ኑᄦፋ࣎фҚҚЕ .........................5-25 ଂҚЕ̚ӁੵфҚ .........................5-24 дҚЕ̰ொજфҚ .........................5-24 дҚЕ̰ΐˢфҚ .........................5-24 ֶԔ఍நҚЕ̚۞фҚ .................5-24 Ր଀фҚдҚЕ̰۞Ҝཉ .............5-23 ߙ࣎фҚ .................................5-23פх ࢍზҚЕ̰۞фҚ .........................5-23 ఍நҚЕ̰۞фҚ................................5-22 ൺഇфҚҚЕ .................................5-20 ϲາ۞фҚҚЕ................................5-20ޙ ྶˢ׶ᐼхфҚҚЕ............................5-20 ፆүфҚҚЕ...............................................5-19 ϖᜈҚЕ................................................5-18 ࢦາщଵҚЕีϫ .........................5-18 ҚЕีϫ .................................5-18פх ӁੵҚЕีϫ .................................5-18 ᆧΐҚЕีϫ .................................5-17 ҚЕ۞˘ਠፆү....................................5-17 ፆүҚЕ.......................................................5-16 ֹϡ TRegistry...............................5-15 ֹϡ TRegistryIniFile....................5-15 ֹϡ TIniFile ᄃ TMemInFile.......5-13 ఍ந INI ᑫᄃր௚൳ᐂ...............................5-12 ኑᄦᑫ९ .........................................5-12 ᑫ९͟ഇॡม඀Ԕ .........................5-12 Լតᑫ९ЩჍ .................................5-11 ವԱᑫ९ ...........................................5-9 Ӂੵᑫ९ ...........................................5-9 ఍நᑫ९..................................................5-9 ֹϡᑫ९ handle ..............................5-8 ϲ̈́ฟୁᑫ९ ...............................5-7ޙ iv ֹϡߊѣีϫ .................................8-27 ᚶٚߊѣีϫ .................................8-27 ኑᄦߊѣีϫ .................................8-27 Іऱ྆۞ีϫ............8-27ۏд૞९ֹ̚ϡ І................8-26ۏдဥฤЪүᒖဩ̚Вֳ Іऱ̚............................8-26ۏ૟ีϫΐҌ Вֳ૞९̚۞ีϫ................................8-25 Іऱ...................................................8-25ۏֹϡ ྤफ़ሀ௡................................................8-25 ጡ̚ΐˢᅈბڇдᑕϡ඀ёҨ फ़ሀ௡........................8-24ྤפଂܑॾ̚х ϲдྤफ़ሀ௡̚۞ྤफ़఍நఢ݋.8-23ޙ ᄃְІ .............................................8-23 дྤफ़ሀ௡ֹ྆ϡ̮І۞পّ Щ .....................8-22פཉ̮І֭ആιٸ ࠎྤफ़ሀ௡ᄃ׎ಏ̮׻Щ .............8-21 ϲᄃበᏭ................8-20ޙᇾ໤ྤफ़ሀ௡۞ ֹϡྤफ़ሀ௡...............................................8-19 ֹϡ MTS ᄃ COM+.............................8-19 ֹϡ COM ᄃ DCOM...........................8-18 ϡ COM ฟ൴ᑕϡ඀ё...............................8-18 ચᑕϡ඀ё......................8-17ڇ ฟ൴ Web ฟ൴ WebSnap ᑕϡ඀ё .....................8-17 ฟ൴ Web Broker ᑕϡ඀ё.................8-16 ጡᑕϡ඀ё.........................8-15ڇϲ Web Ҩޙ ̶೸ёྤफ़ऱᑕϡ඀ё........................8-15 ྤफ़ऱᑕϡ඀ё۞ᇤᆷ...............................8-14 ёऱ۞౵ָॡ፟..8-13בֹϡइЇ́જၗాඕ ёऱ.......................8-12בϲइЇ́જၗాඕޙ ચੵ᏾ .....................................8-11ڇ၆ ચЩჍপّ .................................8-10ڇ ચેҖჰ .......................................8-8ڇ ચᑕϡ඀ё..........................................8-5ڇ έᑕϡ඀ё......................................8-5טଠ 4-8..................................................ۍ඀ёᇹ በᛌጡᏴี .......................................8-4 నؠፋЪฟ൴ᒖဩă૞९ăͽ̈́ ֹϡ۰̬ࢬሀё ...............................8-2 ဦԛֹϡ۰̬ࢬᑕϡ඀ё......................8-2 ϲ.............................................8-1ޙᑕϡ඀ё۞ ёऱ 8-1בฟ൴ᑕϡ඀ёă̮Іᄃ ௐ 8 ౢ ൪΍Տ࣎ጾѣ۰ҋ൪۞ีϫ................7-20 አፋጾѣ۰ҋ൪ีϫ۞̂̈................7-19 ൪΍ጾѣ۰ҋ൪۞ีϫ .................7-18 ૟ᇆညΐҌфҚҚЕ̚.................7-18 ૟ᇆညΐҌᑕϡ඀ё̚ .................7-17 ІΐҌфҚҚЕ....................7-17ۏ૟ဦԛ నؠጾѣ۰ҋ൪۞ࢲॾ........................7-16 Іΐ˯ဦԛ...................................7-16̮טගଠ ఍ந OnPopup ְІ.............................7-15 ೩ֻᇅ΍ёΑਕܑ................................7-14 ઃͤΑਕܑᏴี۞үϡ........................7-13 ͛ф....................................7-13۞פӁੵᏴ ગ˭ăኑᄦă׶෭˯͛ф....................7-12 ٙѣ۞͛ф....................................7-12פᏴ ͛ф................................................7-11פᏴ І ............................7-10ۏ ΐˢ Clipboard дેҖॡഇΐˢଡજค..........................7-9 నؠ͛ф၆ᆅ͞ё..................................7-9 І̰ྻϡ͛ф.................................7-8̮טдଠ જү۞͞ё..7-8ٸٳІаᑕ̮טଠ̄טଠ ૄг۞͞ё..............................................7-8 Іᗓฟ docking̮טଠ̄טଠ ૄг۞͞ё..............................................7-6 д dockingٸІઃ̮טଠ̄טଠ І..................................................7-6̮טଠ ෛ඄̄۞ٸІјࠎΞઃ̮טឰଠ Іјࠎ docking ૄг..7-5̮טឰෛ඄۞ଠ 5-7.................................ٸٳІ̰၁ү̮טдଠ Ѣॡ۞໣ဂ޽ᇾ..........................7-5ٳԼត જү..............7-4۞ٸٳІҋࢎۏѢٳ౅࿅ Ѣፆү..........................................7-4ٳඕՁ ϫ..................................................7-3ี˭ٸ Ѣซˢ۞ีϫ..............................7-2ٳצତ Ѣજү..........................................7-2ٳؕୁ 1-7.................................ٸٳІ̰၁ү̮טдଠ І 7-1̮טֹϡଠ ௐ 7 ౢ Іሹ˯....................6-12̮זΐˢҋᄦ̮І πέ̮І.................................6-8ྭܧπέᄃྭ 8-6..................................ڱӁੵְІ఍ந͞ 7-6..ڱ૟ΑਕְܑІాඕனх۞ְІ఍ந͞ v ആΑਕܑีϫ׻Щ .........................9-42 ആΑਕܑ׻Щ .................................9-42 ϲΑਕܑ............................................9-41ޙ ฟୁΑਕܑనࢍ̍׍............................9-40 ϲ׶გநΑਕܑ.......................................9-39ޙ ොΊજү................................................9-39 ᇤᆷજү̮І........................................9-38 ࿰Аؠཌྷ۞જүᙷҾ............................9-37 Հາજү................................................9-36 ё .................9-36͞۞ۏજүವԱϫᇾ ְІ۞аᑕ .....................................9-34 ְІజᛈ൴ॡ͔ٙ൴۞ड़ᑕ................9-33 నؠજү୻ಏ........................................9-32 ֹϡજү୻ಏ...............................................9-32 ϡ(MRU)۞୻ಏ.........9-31ֹܕϲ౵ޙ ีϫᄃ̶ᙷ .....................................9-30 ᔳᖟ action bands ̚Ϗֹϡ۞ ᄃΑਕܑ .........................................9-29 யϠֹϡ۰Ξҋࢎ۞̍׍Е ϲજၗ۞Αਕܑ .........................9-29ޙ ᏴፄΑਕܑᄃ̍׍Е۞ᇹё .........9-28 ૟ဦϯΐҌΑਕܑᄃ̍׍Е̚ .....9-27 Αਕܑă޷ตăᄃ̍׍Е .............9-26 ૟ᗞҒăᇹёăٕဦͯΐҌ யϠ̍׍ЕᄃΑਕܑ............................9-24 నؠ action bands.................................9-24 ңᏜજүĉ............................................9-23 ௡ᖐ̍׍ЕᄃΑਕܑ۞જү.......................9-21 ֹϡฟୁ၆ྖ͞๴................................9-20 ฟ൴၆ྖ͞๴...............................................9-20 Вֳ॰ߛ................................................9-19 ϡ׶࣒Լ॰ߛ....................................9-18ֹ 18-9........................̚ڕ૟॰ߛΐҌ̮Іࢬ ϲ॰ߛ................................................9-17ޙ ྻϡ॰ߛ.......................................................9-17 யϠ׶ֹϡ...............................9-15۞ڕ̮Іᇹ ࢦኑྻϡ̮Іᄃ̮Іཏ௡...........................9-15 ଀ྤफ़................9-13פଂ Modal ܑॾ ଀ྤफ़ .............9-11פሀёܑॾ̚ܧଂ ଀ྤफ़................................9-11פଂܑॾ̚ ็ˢᗝγ۞͔ᇴܑ̟ॾ........................9-10 ϲܑॾᇹּ .......9-9ޙֹϡડાតᇴֽ ሀёܑॾ ...9-9ܧϲኜтෛ඄̝ᙷ۞ޙ ϲܑॾ ...............................9-8ޙજၗг ϲ۞ܑॾ .......................9-7ޙពϯҋજ ੃ጸវ̚۞ॡ፟..........9-7ٺॾઃዸܑטଠ ܑॾ۞ֹϡ.....................................................9-6 გந̮І۞ҶԊ......................................9-5 ాඕܑॾ ...........................................9-4 ΐˢ׎΁ܑॾ..........................................9-4 ͹ܑॾ۞ᔳᖟ..........................................9-3 ͹ܑॾ۞ֹϡ..........................................9-3 ϲ.....................................................9-3ޙܑॾ۞ ఍ந൪ࢬ..................................................9-2 ᑕϡ඀ёᆸ৺..............................9-2ٺྻү ᑕϡ඀ё۞Җࠎ.....................................9-1טଠ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-1 ௐ 9 ౢ ࢎᄦፋЪฟ൴ᒖဩ۞ Help ր௚................8-42 IHelpSystem ۞ֹϡ...................................8-41 Ψ Help ր௚....................................8-40ײۡତ Ітң఍ந Help .............8-40̮טCLX ଠ TApplication ఍ந Help ۞͞ё.........8-39 д CLX ᑕϡ඀ёֹ̚ϡ Help...................8-39 ఍ந Help ۞͞ё ............8-38ีטVCL ଠ TApplication тң఍ந VCL Help....8-38 д VCL ᑕϡ඀ёֹ̚ϡ Help...................8-38 ොΊ Help Selector.........................8-37 ොΊ Help ᕱᜓጡ ..........................8-37 І۞ොΊ ..........................8-37ۏHelp ր௚ IHelpSelector ۞၁ү...........................8-36 IExtendedHelpViewer ۞၁ү ...........8-35 ពϯ̰टϫᐂ........................................8-34 ᙯᔣф۞ Help ྤੈ .............8-33ٺពϯૄ Ш Help Manager ྙયྤੈ ................8-32 ׶ Help Manager ໛఼ ........................8-31 ICustomHelpViewer ۞၁ү ..............8-31 Help ր௚̬ࢬ ......................................8-30 χฟᑕϡ඀ё̚۞ Help Αਕ....................8-29 ۞޽ؠ....................................................8-29 ࿰న૞९ăາܑॾăͽ̈́͹ܑॾ ࣒ԼВֳีϫ........................................8-28 ϡ....................................8-28ֹ۞ۍ૞९ᇹ vi StringGrid ...........................................10-22 DrawGrid............................................10-21 Grid.............................................................10-21 ೩ϯপّ..............10-20̈́ځ̮І۞ᅃӄᄲ Progress Bar........................................10-20 ၗЕ..................................................10-20ې І.............................................10-19̮טពϯଠ І......................................10-19̮טᇾᗟଠ І......................................10-19̮טࢱࢬଠ І......................................10-18̮טࢱចଠ ଡજ͞๴..............................................10-18 17-10......................................................ۍࢬ ཏ௡͞๴׶๪ԛ޷ตཏ௡..................10-17 ཏ௡̮І.....................................................10-16 DateTimePicker ׶͡ፌ.....................10-16 ဦϯពϯ̮І(CLX ፾ѣ) ..................10-16 Еϯពϯ̮І......................................10-16 ඕၹᑭෛ̮І..............................10-15ېፘ ௡Ъ͞๴..............................................10-14 Еϯ͞๴׶ߤ८Еϯ͞๴..................10-13 І.............................................10-12̮טҚЕଠ Coolbar (VCL ፾ѣ) ...........................10-12 ̍׍Е..................................................10-11 Ᏼፄ๪ต..............................................10-11 ߤ८͞๴..............................................10-11 ԣి޷ต..............................................10-10 ဦԛ޷ต................................................10-9 І........................................10-9̮ט޷ตଠ І...............................10-8̮ט޷ต׶ᙷҬ۞ଠ І........................................10-8̮ט̶࿣ଠ І (VCL ፾ѣ) ..................10-7̮טሤᔣଠ І (CLX ፾ѣ)..................10-7̮טspin ଠ І........................................10-7̮ט˯˭ଠ І....................................10-6̮טคଠޘג ଡજค....................................................10-6 І...................................10-6̮טপঅ۞Ꮾˢଠ ͛фᇾច................................................10-5 І................................10-4̮ט͛фᑭෛଠ পّ .................................................10-3 І۞̮טMemo ̈́ RichEdit ଠ І۞পّ .....................10-2̮טበᏭଠ І........................................10-2̮טበᏭଠ І...............................................10-1̮ט͛фଠ Іᙷݭ 10-1̮טଠ ௐ 10 ౢ ᄃ XP ۞͹ᗟ........................9-66ีטВ఼۞ଠ ϯቑ඀ё................................................9-66 ᔳᖟ׶ពϯ̍׍Е................................9-66 ΐˢᔳᖟ۞̍׍Е................................9-65 ޽ؠΑਕܑග̍׍޷ต .................9-65 ၆ᕇᑝ۞аᑕ........................................9-65 నؠ cool bar ۞γ៍ .....................9-64 ΐˢ cool bar ̮І................................9-63 ឰଋ̷ೱ̍׍޷ต .........................9-63 ϲ˘௡̍׍޷ต .........................9-63ޙ ޽ؠᇆညග̍׍޷ต .....................9-61 ΐˢ̍׍޷ต .................................9-61 ֹϡ̍׍Е̮Іֽΐˢ̍׍Е............9-61 ၗ .....................9-60ېឰଋ̷ೱ޷ต۞ ϲ˘௡ΐిต .............................9-60ޙ ၗ .................9-59ېనؠΐిต۞੓ؕ ޽ؠΐిต۞ဦည .........................9-59 59-9..................... ̰ۍࢬז૟ΐిตΐ Іֽΐˢ̍׍Е................9-58̮ۍֹϡࢬ నࢍ̍׍Еᄃ cool bars..............................9-57 ๗ˢྤ໚ᑫ............................................9-56 GroupIndex পّ...........................9-55 ԔĈึ׀ՙؠΑਕܑีϫ۞Ъ ޽ؠֹϡ̚ΑਕܑĈMenu পّ..9-55 Αਕܑ............................................9-55׀Ъ дેҖഇม఍நΑਕܑีϫ................9-54 ඀Ԕ۞׻Щၚּ .............................9-54 Αਕܑีϫ׶ְІ఍நۍᇹ 53-9................................ۍ૟Αਕܑхјᇹ 51-9....................................ۍֹϡΑਕܑᇹ дనࢍഇม̷ೱΑਕܑ .................9-50 ̰टຏᑕёΑਕܑ̚۞޽΄ .........9-49 Αਕܑ....................................................9-49 ֹϡΑਕܑనࢍ̍׍۞̰टຏᑕё Іᑭෛጡ̚በᏭΑਕܑีϫ........9-49ۏд ᑭෛΑਕܑ .....................................9-48 ϲઘΑਕܑ........................................9-46ޙ າᆧă೧ˢ׶ӁੵΑਕܑีϫ .....9-43 vii ֹϡᓜࠧડા ...............................13-10 І .........................................13-9ۏᗆؠ 13-9........................................פᔖҺТॡх አેҖჰ...................................................13-9ם ᇤᆷ୻ੵ඀ёቅ.......................................13-8 ё̚఍நּγ .............13-8בдેҖჰ Ϥ׎΁ેҖჰᑭߤώ֗ߏӎඕՁ .13-7 ֹϡેҖჰડાតᇴ .....................13-7 ֹϡ͹ࢋ VCL/CLX ેҖჰ.........13-5 ё....................................13-5בᇤᆷેҖჰ Җჰ .............13-4ેٸߏӎᅮࢋᛖځ޽ ޽ؠ࿰న۞ᐹАᝋ .........................13-3 І................................13-3ۏҖჰે̼ؕܐ І...........................................13-2ۏؠཌྷેҖჰ ᇤᆷкેҖჰ඀ё 13-1 ௐ 13 ౢ ΐˢࢰड़׶(ٕ)ᇆͯ۞ቑּ.........12-40 ᑕϡ඀ё .......12-38ז૟ᓏࢰ׶(ٕ)ᇆͯΐ ΐˢ൑ᓏᇆͯ۞ቑּ ...................12-37 ᑕϡ඀ё..........12-35זԯ൑ᓏࢰ۞ᇆͯΐ ఍நкಫវΑਕ.........................................12-35 ຋አቢ୧۞ᘱᄦ ...........................12-33 І̚ ...........................12-32ۏॾܑזΐ ԯϡֽ੠ᖸ໣ဂજү۞᛼Ҝ аᑕ޷˭໣ဂજү .......................12-30 аᑕ໣ဂજү ...............................12-28 ӈॡՀາቑּ......................................12-28 ෭˯ગ෭ᘨ۞ဦԛ .......................12-27 ગ෭ᘨ̚ ...................12-26זԯဦԛગ ગ෭ᘨ ...................12-26זԯဦԛኑᄦ ֹϡગ෭ᘨ఍நဦԛ..........................12-25 ആೱဦԛ .......................................12-24 ᑫ९̚ ...................12-23זԯဦԛᐼх ଂᑫ९ྶˢဦԛ ...........................12-23 ˢ׶ᐼхဦԛᑫ..............................12-22ྶ 12-20........................... ีטΐˢᇆညଠ ᄦүΞଡજ۞ဦԛ .......................12-20 дဦԛ˯൪ဦ......................................12-19 ֹϡᘱဦ̍׍ ...............................12-16 ֹϡԣిตֽԼត̍׍..................12-16 ੠ᖸٙࢋֹϡ۞ᘱဦ̍׍ ...........12-15 І..............12-14ۏд඀ё̚఍நкࢦ൪ဦ 13-12....................................... ې൪΍ԛ ൪΍ۡቢ׶кᙝԛ .......................12-12 І...12-11ۏ൪΍ဦԛֽڱ͞۞ ֹϡ Canvas ׶నؠဦ৵ ...........................12-11פ᝝ 12-9......................................... הֹϡඊ ֹϡ൪ඊ .........................................12-6 І۞পّ.....................12-6ۏ ϡ Canvasֹ 4-12....................ڱ൪ο۞В఼ّপّ׶͞ І۞჌ᙷ....................................12-4ۏဦԛ ࢦາពϯᏈ၌........................................12-3 ဦԛ̝඀ёనࢍ۞ໄ៍...............................12-1 ఍நဦԛᄃкಫវ 12-1 ௐ 12 ౢ ซ˘Վ۞ྤੈ.............................................11-11 ׎΁۞በᏭጡ ...............................11-10 Diagram Editor..............................11-9 Unit Code Editor...........................11-8 Implementation Editor.................11-8 Editors ඄ॾ ..........................................11-7 Members ඄ॾ ......................................11-7 Diagrams ᑭෛ̮І.......................11-6 Units ᑭෛ̮І...............................11-5 Classes ᑭෛ̮І ...........................11-5 Collections ඄ॾ ...................................11-5 ֹϡ ModelMaker ۞ᑭෛ̮І..................11-4 ϲሀݭ................................................11-3ޙ ລ੨ IDE ֹϡ ModelMaker ...............11-2 ModelMaker ሀݭ ................................11-2 ModelMaker ૄᖂ.......................................11-2 ͽ ModelMaker నࢍᙷҾ̮̈́І 11-1 ௐ 11 ౢ І......................................10-24̮טજ൪ଠ ᘱ൪͞๴..............................................10-24 Bevel ....................................................10-24 Shape ...................................................10-24 Image...................................................10-23 ဦԛពϯ̮І.............................................10-23 Value list በᏭጡ (VCL ፾ѣ) ................10-22 viii ϲహវइІ........................................16-9ޙ ϲ̈́በᏭహវइІ...................................16-9ޙ щ྅̮ІహវइІ................................16-7 నࢍॡഇహវइІ.......................................16-6 ҋࢎహវइІ........................................16-6 ՙؠٙࢋֹϡ۞ેҖॡഇహវइІ....16-5 ྶˢహវइІ .................................16-5 ёજၗгב ֹϡ LoadPackage дᑕϡ඀ё̚ྶˢహវइІ................16-3 ેҖॡഇహវइІ.......................................16-3 హវइІ׶ᇾ໤ DLLs .........................16-2 ࠎ̦ᆃֹϡహវइІ?.................................16-2 ֹϡహវइІ׶̮І 16-1 ௐ 16 ౢ ૟ Internet ᑕϡ඀ёொങҌ Linux ˯..15-36 ྭπέ۞ Internet ᑕϡ඀ё.....................15-36 д dbExpress ᑕϡ඀ё̚Հາྤफ़..15-33 ૟ྤफ़ऱᑕϡ඀ёொങҌ Linux.......15-31 ֹϡ۰̬ࢬᆸ۞मள..........................15-30 ̮ІᆸѨ˯۞̙Т఍..........................15-29 dbExpress ۞̙Т఍...........................15-28 ྭπέ۞ྤफ़ऱᑕϡ඀ё.........................15-27 Linux ̝˯۞ϫᐂඕၹ.......................15-26 25-15................................... ڍγ៍ᄃड़ ր௚൳ᐂ .......................................15-25 Windows ᄃ Linux дᒖဩ˯۞मள ...15-22 ࣧؕቅ..................................................15-22 д Windows ᄃ Linux ̝มВֳ ඀ёொᖼ.....................................................15-21 д Windows ᄃ Linux ̝ม۞ᑕϡ д Linux ˯ᇤᆷ඀ё˯۞मள..........15-20 ̰ӣ௡Ъᄬ֏ቅ ...........................15-19 ඕՁ୧І޽΄ ...............................15-18 ֹϡ୧Іበᛌ޽΄ .......................15-16 ᇤᆷ׍Ξᛸّ۞඀ёቅ......................15-15 ఍நր௚ᄃෛ඄̍׍ะְІ..............15-14 मள .................15-13۞ڱၹ͞ޙІۏ CLX WinCLX ᄃ VisualCLX ಏ̮۞ͧྵ 15-10 ொങٕ;̝ᗒт۞Αਕ................15-8ڱ൑ VisualCLX ۞̙Т̝఍........................15-7 WinCLX vs. VisualCLX.......................15-6 ࣒Լ VCL ᑕϡ඀ё..............................15-4 ሀᑢ Windows ொങ ......................15-4 ྭπέொങ .....................................15-3 পؠπέொങ .................................15-3 ொങԫఙ................................................15-3 ொങ VCL ᑕϡ඀ё.....................................15-2 ฟ൴ CLX ᑕϡ඀ё.....................................15-2 ฟ൴ྭπέ۞ᑕϡ඀ё 15-1 ௐ 15 ౢ ؠཌྷଋҋ̎۞ VCL ּγ....................14-15 ᔳԛּγ..............................................14-14 14-13........טд VCL ̚࿰న۞ּγ఍ந፟ VCL ּγᙷҾ.....................................14-12 д VCL ᑕϡ඀ё̚఍நּγ...................14-11 ᇤᆷ finally block ........................14-10 ᇤᆷ௣ͤડ߱........................................14-9 ࢦາ͔൴ּγ .................................14-8 ּγ఍ந඀Ԕ۞ቑಛ .....................14-7 ఍நּγᙷҾ .................................14-6 ּγ఍நୃࢗ .................................14-5 ᇤᆷּγ఍ந඀Ԕ................................14-4 ͔൴ּγ................................................14-3 ᇤᆷ try block .......................................14-2 ؠཌྷ᜕ܲડ߱...............................................14-2 ּγ఍ந 14-1 ௐ 14 ౢ ޽ؠ̙Т۞ЩჍග࠹Ҭ۞ેҖჰ...13-17 ׍Щ۞ેҖჰ ...............................13-16 ૟̙׍Щ۞ેҖჰᖼೱࠎ ેҖჰ۞׻Щ......................................13-16 ၆кેҖჰ඀ёซҖੵ᏾.........................13-15 ฟؕ׶ઃͤેҖჰ..............................13-15 ᖬᆷ࿰న۞ᐹАᝋ..............................13-14 І.........................................13-14ۏેҖેҖჰ ׎΁۞̍үԆј ...................13-12ޞඈ ׎΁ેҖჰԆјેҖ۞̍ү...13-12ޞඈ ׎΁۞ેҖჰ..............................13-11ޞඈ Вϡ੃ጸវ۞׎΁ԫμ ...............13-11 Վጡ ...............................................13-10 ͷଵγᆷˢ۞Тפϡкࢦ᝝ֹ ix ׎΁ֻᑕથ۞யݡ͛І......................18-20 ؠ......................18-20םNo-nonsense ଱ᝋ README.............................................18-20 DEPLOY..............................................18-20 ٙᅮ۞హវ଱ᝋ.........................................18-20 ώ......................................18-19ۍүຽր௚ фݭ......................................................18-18 Яᑕ̙Т۞ᗞҒᇴϫ ...................18-18 ҂ณ ...........................................18-17۞ ̈̂ีטજၗአፋܑॾ׶ଠ ॡ۞҂ณ .......................................18-16 ̈̂ีט̙જၗአፋܑॾ׶ଠ ׶ᗞҒᇴϫ......................18-16ޘژᏈ၌ྋ ̙Т͹፟ᒖဩ˭۞඀ёనࢍ.....................18-15 CGI ᑕϡ඀ё...............................18-14 ֹሀ௡੓үϡ ...............................18-14 ጡ˯۞̶൴જү............18-13ڇApache Ҩ ̶൴ Web ᑕϡ඀ё...................................18-13 ĞDataSnapğ.......................................18-12 ̶൴кลᆸྤफ़ऱᑕϡ඀ё Borland Database Engine...........18-11 ̶൴ BDE ᑕϡ඀ё............................18-11 ̶൴ dbExpress ྤफ़ऱᑕϡ඀ё......18-10 ̶൴ྤफ़ऱᑕϡ඀ё...................................18-8 ̶൴ CLX ᑕϡ඀ё.....................................18-8 DLL ۞Ҝཉ ....................................18-8 ᅃӄّ඀ё .....................................18-7 18-7.............................. ีטActiveX ଠ ሀ௡ .........................................18-4׀Ъ इІᑫ .............................................18-4 ᑕϡ඀ёᑫ९ .................................18-3 Ա΍ᑕϡ඀ёᑫ९ .........................18-3 ֹϡщ྅඀ё........................................18-2 ̶൴˘ਠᑕϡ඀ё.......................................18-2 ̶൴ᑕϡ඀ё 18-1 ௐ 18 ౢ ၆ྤ໚ซҖώ˿̼..............................17-15 ώ˿̼ᑕϡ඀ё.........................................17-15 જၗг̷ೱྤ໚ DLL.........................17-14 ֹϡྤ໚ DLL.....................................17-13 ϲྤ໚ DLL.....................................17-11ޙ ̶ᗓྤ໚..............................................17-11 ޷ᔣ၆ߍ .......................................17-11 ॾё׶ଵЕึԔ ...........................17-10 ဦԛᇆည .......................................17-10 ͛ф .................................................17-9 నࢍֹϡ۰̬ࢬ....................................17-9 ׶઼Ҿѣᙯ۞Αਕ .........................17-9 BiDiMode পّ ..............................17-6 ͚೯ .................................................17-5 дᑕϡ඀ё̚ΐˢᗕ͞Шពϯ۞ ᆵф̮ .............................................17-5 кҜ̮௡фะ .................................17-3 OEM ᄃ ANSI ф̮ะ...................17-3 фะ .................................................17-2 ඀ёቅ۞఍ந........................................17-2 ઼ᅫ̼ᑕϡ඀ё...........................................17-2 ώ˿̼....................................................17-2 ઼ᅫ̼....................................................17-2 ઼ᅫ̼׶ώ˿̼...........................................17-1 ϲ઼ᅫ̼ᑕϡ඀ё 17-1ޙ ௐ 17 ౢ इІะЪᑫ९......................................16-18 ԯహវइІ̶൴ග׎΁۞ฟ൴ˠࣶ..16-18 ̶൴ֹϡహវइІ۞ᑕϡ඀ё..........16-18 ̶൴హវइІ.............................................16-18 ٙயϠ۞ᑫ९ ...........16-17ޢјΑበᛌ ֹϡ׻΄ЕซҖበᛌ׶ాඕ .......16-16 ᄃహវइІѣᙯ۞በᛌጡ޽΄ ...16-14 በᛌహវइІ......................................16-13 ͘જበᏭహវइІࣧؕᑫ..................16-13 Contains ̄ή...............................16-12 Requires ̄ή...............................16-11 హវइІ۞׻Щ ...........................16-11 ᄮᙊహវइІ۞ߛၹ..........................16-11 በᏭߊѣ۞హវइІ..........................16-10 x ඀ё۞ DLLs ˘Т̶൴..................18-11 18.4 ૟ dbExpress ᑕϡ඀ёᄃᜭજ ࠎ፾ϲેҖ۞ΞેҖᑫ .................18-10 18.3 ૟ dbExpress ᑕϡ඀ё̶൴ј ሀ௡ᄃ׎࠹ֶᙯܼ ...................18-5׀18.2 Ъ ᑕϡ඀ёᑫ९ ...................................18-3 18.1 10-17............................. ޘܜҤࢍ۞фҚ 17.2 8-17.................ڱ͞۞ 17.1 VCL ͚̚೯ BiDi 16.3 ᄃహវइІѣᙯ۞׻΄ЕበᛌጡᏴี....16-17 16.2 ᄃహវइІѣᙯ۞በᛌጡ޽΄ .....16-14 16.1 በᛌ࿅۞హវइІᑫ९ ...................16-2 ăᄃְІ 15-35ڱՀາྤफ़۞পّă͞פ15.9 ϡֽԣ І .................15-29̮פ15.8 ࠹၆ᑕ۞ྤफ़х 15.7 ૱֍۞ Linux ϫᐂ .........................15-26 15.6 дLinux ᄃWindows үຽᒖဩ̚۞मள15-22 15.5 WinCLX ٙ፾ѣ۞ಏ̮ .................15-11 15.4 VisualCLX ٙ፾ѣ۞ಏ̮ .............15-11 VisualCLX ಏ̮ .............................15-10 15.3 WinCLX-only ᄃඈᆊ۞ 15.2 Հજᄃ࠹ள۞Αਕ ...........................15-8 15.1 ொങԫఙ ...........................................15-3 14.1 ߄Ᏼ΍ֽ۞ּγᙷҾ .....................14-12 13.2 WaitFor а็ࣃ..............................13-13 13.1 ેҖԔ۞ᐹАᝋ ...............................13-3 12.7 кಫវ྅ཉ۞ᙷݭ׶׎Αਕ .........12-39 12.6 ໣ဂְІણᇴ .................................12-29 12.5 ໣ဂְІ .........................................12-29 12.4 CLX ̝ MIME ݭၗᄃ૱ᇴ ...........12-25 12.3 ൪ο̮І۞В఼ّপّ ...................12-5 12.2 ൪ο̮І۞В఼ّপّ ...................12-4 І۞჌ᙷ ...............................12-4ۏ12.1 ဦԛ І۞পّ .......................10-3̮ט10.1 ͛фଠ 9.9 నؠ cool ޷ต۞γ៍ ......................9-64 9.8 నؠ̍׍޷ต۞γ៍ .......................9-62 9.7 నؠΐిต۞γ៍ ...........................9-60 9.6 Αਕܑనࢍ̍׍۞̰टຏᑕёΑਕܑ޽΄ 9-50 9.5 ቑּᇾᗟ׶ιࣇ۞ጱ΍ЩჍ ...........9-42 9.3 જү̶ᙷ ...........................................9-37 পّ۞࿰నࣃ ...................................9-31 9.2 Action Manager ̝ PrioritySchedule જүనؠ˯۞ఙᄬ ...........................9-22 9.1 38-8... ڱ͞ 8.5 д TApplication ྆۞ Help 8.4 ྤफ़ሀ௡۞̰टᏴಏᏴี ...............8-21 ጡᑕϡ඀ё .....................8-16ڇ8.3 Web Ҩ फ़ऱࢱѨ ...............8-14ྤ۞˯ۍ8.2 ̮Іሀ ёऱ۞በᛌ޽΄ ...........................8-12ב 8.1 7.2 Fixed ׶ variable ۞ጾѣ۰ҋ൪ࢲॾ 7-17 ͛ф۞পّ ...............................7-11פ7.1 Ᏼ 6.1 ̮Іሹࢱࢬ̈́ٙΒӣ۞̮І .............6-8 5.16 фҚ࠹ᙯ۞በᛌ޽ϯ..........................5-36 5.15 фҚኑᄦ඀Ԕ ...................................5-32 5.14 ̄фҚ඀Ԕ .......................................5-32 5.13 ࿬ඕԍфҚ࣒Լ඀Ԕ .......................5-31 5.12 ࿬ඕԍфҚ̂̈ᆷᖼೱ඀Ԕ ...........5-31 5.11 ࿬ඕԍфҚͧྵ඀Ԕ .......................5-31 5.10 ̄фҚ඀Ԕ .......................................5-30 5.9 фҚ࣒Լ඀Ԕ ...................................5-29 5.8 ̂̈ᆷᖼೱ඀Ԕ ...............................5-29 5.7 фҚͧྵ඀Ԕ ...................................5-28 5.6 გநҚЕ۞ᙷҾ ...............................5-16 5.5 ᛳّ૱ᇴ׶ᇴࣃ ...............................5-10 5.4 Ч࣎ᑫ९ฟୁሀё˭Ξϡ۞ᑫ९Вֳሀё.5-8 5.3 ᑫ९Вֳሀё .....................................5-8 5.2 ᑫ९ฟୁሀё .....................................5-7 5.1 Origin ણᇴࣃ .....................................5-5 3.2 ࢦࢋ۞ૄᖂᙷҾ .................................3-6 3.1 ̮І̄඀ёऱ .....................................3-1 1.1 фݭ׶௑ཱི .........................................1-3 ဦܑ xi bdRightToLeftReadingOnly.......... 17-7 17.4 TListBox నј 17.3 TListBoxనј bdRightToLeft NoAlign..17-7 17.2 TListBox నј bdRightToLeft ....... 17-6 17.1 TListBox నј bdLeftToRight ....... 17-6 ဦ̂̈၆ྖ͞๴............................. 12-24 12.1 д BMPDlg ඀ёಏ̮̚۞ᕇੱ 11.9 Diagram Editor ............................. 11-10 11.8 Unit Code Editor............................. 11-9 11.7 Implementation Editor ᑭෛ̮І.. 11-8 11.6 Members ᑭෛ̮І ......................... 11-7 11.5 Diagrams ᑭෛ̮І......................... 11-6 11.4 Units ᑭෛ̮І ................................ 11-5 11.3 Classes ᑭෛ̮І............................. 11-5 11.2 ពϯቑּሀݭ۞ ModelMaker....... 11-4 11.1 ModelMaker ̍׍Е۞˘ొЊ....... 11-3 10.2 Progress bar................................... 10-20 І۞ˬ჌ԛё ...........10-7̮טคଠޘג 10.1 9.10 Αਕܑ۞ Save Template ၆ྖ͞๴ ...9-53 ͞๴ቑּ ...........................................9-52 9.9 Αਕܑ۞ Insert Template ၆ྖ 9.8 Select Menu ၆ྖ͞๴.....................9-51 Αਕܑඕၹ ...........................9-46۞ې9.7 ૰ 9.6 ૟ΑਕܑีϫΐҌ͹Αਕܑ ...........9-44 ёΑਕܑ ...........................................9-41 9.5 ֹϡΑਕܑనࢍ̍׍ֽనࢍᇅ΍ ̮І ...................................................9-41 9.4 MainMenu ̮Іᄃ PopupMenu 9.3 Αਕܑఙᄬ .......................................9-40 9.2 Action Manager በᏭጡ..................9-26 ֽ໚̮І۞॰ߛ ...............................9-19 І׶ྤफ़̮ט9.1 ѣྤफ़ຏۢଠ 4.1 ˘࣎ᖎಏ۞ܑॾ .................................4-4 3.1 ᖎ̼۞ߛၹဦ .....................................3-6 ဦּ xii ܝDelphi ԣిˢ ңֹϡፋЪฟ൴ᒖဩ(IDE)ֽฟ൴ᑕϡ඀ёͽ̈́тңҋࢎͽ௑Ъଋ۞ᅮࢋĄ тځķ̚۞ౢ༼̬௜ଋᄮᙊ Delphi ۞ፆүᒖဩĂ֭ᄲܝдĶDelphi ԣిˢ ܝDelphi ԣిˢ ᖎ̬ 1-3 ϲ׍ѣ੼ड़ਕ۞ Windows XPăWindows 2000ăWindows 98 ׶ޙёᇤᆷĂ ᑕϡ඀ёซҖԣి۞ᑕϡր௚ฟ൴(RAD)Ąֹϡ DelphiĂଋΞͽϡ౵͌۞඀ ІጱШăෛᛇ̼۞඀ёనࢍᒖဩĂιΞͽឰଋ၆Ч჌ᙷݭ۞ۏDelphi ߏ˘࣎ Delphi ߏ̦ᆃĉ щ྅ϫᐂ̚۞ିጯኝ඀ PDF ᑫĄ д Contents ̚۞ĶTutorialsķ)ٕߏд Delphi)ځफ़ऱᑕϡ඀ёĂኛણዦቢ˯ᄲ Ăညߏฟ൴͛фበᏭጡĂٕྤځ޷ొಶ঱гֹϡ Delphi ֽᇤᆷ඀ё۞ᄲٺᙯ ૟Ә෦ଋтңֶ໰ҋ̎۞ᅮՐҋࢎ Delphi ۞ፋЪᒖဩĄ тңӀϡ఺ֱ̍׍ᇤᆷᑕϡ඀ёĄௐ 4 ౢĶҋࢎᒖဩķځDelphi ᇤᆷ඀ёķᄲ ௐ 2 ౢĶᄮᙊᒖဩķࠎଋ̬௜ Delphi ፋЪᒖဩ̰۞͹ࢋ̍׍Ąௐ 3 ౢĶֹϡ ͽ̈́д Delphi ᒖဩ̚Ξͽֹϡ۞ధк̍׍ĄځՀྎ௟۞ᄲ זଋਕૉϒቁ۞ฟֹؕϡώயݡĄώ३˵Ә෦ଋдֹϡயݡॡдң఍ΞͽԱ ೩ֻଋ Delphi ฟ൴ᒖဩ׶Αਕ۞ໄ៍ĂрឰܝDelphiĊώԣిˢ זֽܓᝌ ᖎ̬ ᄃ඀ёనࢍ͘Ίܝ1-4 ˢ ϲາ૳͗Ą!ޙΊ඀Ԕ ࣶϺ൑૳͗ॡĂ˵ΞӀϡොົܧଋڍ͗ྤੈӈΞҋજซҖ Delphi ۞ොΊĄт Borland Community ۞ົࣶĂٕጾѣѣड़̝హវොΊ૳͗ĂΪࢋᏮˢ࠹ᙯ̝૳ ଋ̏ߏڍĂҭߏଋυืϫ݈ϒాඕҌშᅫშྮĄтڱ͞۞ܮቢ˯ොΊߏ౵ᖎ ГොΊ!ޢy ൾ y ૟హវ۞ୁϡᔣቅͽᑫ९ٕฎІ͞ё๗ˢĄ ᑫ९Ąפᔣቅ(activation key)ĂΞӀϡώᏴีᏴ ϡୁזώᏴีΞ౅࿅࿪ྖٕშࢱᕱᜓጡොΊĂ࣐ࡶଋଂ࿪̄ฎІ̏̚ќ y ͽ࿪ྖٕშࢱᕱᜓጡොΊ ώᏴีߏӀϡ̏ాඕ̝შྮซҖቢ˯ොΊ y дშྮ˯ොΊ யϠ၆ྖ॰೩ֻଋα჌ᏴፄĈ!ົޢயݡԔཱིᄃ଱ᝋᔣቅĂᏮˢ ௐ˘ѨֹϡॡĂົኛଋᏮˢޢк͞ёΞซҖ Delphi ۞ොΊĂ༊щ྅Ԇјޝѣ Delphi ොΊ Ă඀ёనࢍჟីඈඈĄۍइనࢍ̍׍ăᑕϡ඀ёܑ̈́ॾᇹ ീྏੵ᏾ăొཌᑕϡ඀ёॡٙᅮ۞˘̷̍׍ĂΒ߁Ξࢦኑֹϡ۞̮Іऱăፋ RAD ̍׍ Kylix ࠹Т۞ྭπέྋՙ͞९ĄDelphi ೩ֻ˞ٙѣనࢍăฟ൴ă Linux ˯۞ ٺ Windows NT ᑕϡ඀ёĄDelphi Тᇹ˵೩ֹֻϡд Borland ᖎ̬ 1-5 ΞӀϡௐ˟჌Ᏼี)ͽ࿪ྖٕშࢱොΊ*Ą! ቢ˯ොΊॡĂڱ༊ଋٙщ྅హវ۞፟ጡϏᄃშᅫშྮాඕĂٕߏѣ֨ͫᒒ൑ ! ᄃ඀ёనࢍ͘Ίܝ1-6 ˢ ᛉଋֹϡቢ˯ොΊĄޙѣপঅࣧЯĂܧො ੵ ё๗ˢ̝ᏴีĂ֭дଋ۞ր௚̚Ᏼፄ activation.slip ᑫ९Ą హវୁϡྤफ़ĂΞӀϡ૟హវ۞ୁϡᔣቅͽᑫ९ٕฎІ͞ז࣐ࡶଋА݈̏ќ ᖎ̬ 1-7 ĂΪࢋᏴፄྍีϫ֭޷˭ F1Ą!ځᒔ଀ӈॡቢ˯ᄲ ଋΞͽдฟ൴ᒖဩ۞Їңొ̶Β߁Ᏼಏีϫă၆ྖ͞๴ă̍׍Еͽ̮̈́І˯ F1 Help ᏮˢଋࢋԱ۞͛фĄ!ޢԱķࢱѨ൒ ֭ᕇᏴĶ̰टķࢱѨĄ୬˞ྋ̮Іٕ۰׎΁͹ᗟĂኛᕇᏴྍี৶͔Ăٕ۰Ķವ ࢋᕱᜓ఺ొ̶۞̰टĂኛᏴፄ Help | Delphi Help ٕ Help | Delphi ToolsĂ ΊĂͽ̈́ధкᄃ Delphi ׎΁࠹ᙯ۞ΑਕĄ! Ą఺ొ̶உᄏ Delphi ۞඀ёฟ൴͘ΊăDelphi Language ͘ځ̮І۞ྎ௟ᄲ ϡ۰̬ࢬপّăᄬ֏၁үă඀ёనࢍԫμăֹ̈́ٺր௚೩ֻధкᙯځቢ˯ᄲ ځቢ˯ᄲ ᗟ̈́ www.borland.com შ৭Ą! ĶWhat's Newķ͹۞̚ځώ̝າΑਕ۞ซ˘ՎྤੈĂኛણዦቢ˯ᄲۍώٺᙯ ચͽ̈́ Borland შ৭ڇy Borland ฟ൴ˠࣶ͚೯ y Оᄦ۞३ᚱ ځy ቢ˯ᄲ ଀ĈפΞͽϡᇴ჌̙Т۞ԛёֽੈྤ۞ھд Delphi ̚உᄏᆸࢬᇃ ٙࢋ۞ྤੈזԱ ᄃ඀ёనࢍ͘Ίܝ1-8 ˢ дЇң၆ྖ͞๴྆ᐝ޷˭ Help ޷ตĂ˵ౌົពϯ၆ᑕ۞ቢ˯͛ІĄ ! ৵޷ F1Ą дܑॾ˯۞̮ ! ! ! ! ! ! ! ! ! ! ! ̮৵޷ F1Ą ֏ăVCL ٕ CLX ̚Ăд඀ёᄬ д඀ёበᏭ ! Ąځᄲ ಶਕពϯ VCL ЩჍ˯޷ F1 ۞পְّٕІ Іᑭෛጡۏд ! ᖎ̬ 1-9 ௖វф дώٕ͛඀ё̚۞௖វф΃ܑܲ঻фٕበᛌጡ۞ᏴีĄ ҘĄڌଋٙυืᏮˢ۞Їң ಏቢវ ಏቢវ͛фϡֽܑϯдᏈ၌ٕ඀ёቅٙ̚΍ன۞͛фĄι˵ϡֽ΃ܑ фវٕ௑ཱི ຍཌྷ ܑ1.1 д͘Ίֹٙ̚ϡ۞фវ׶௑ཱི ώ͘Ίֹϡтܑ1.1 ٙ̚ೡࢗ۞фវ׶௑ֽܑཱིϯ׎ٙ΃ܑ۞পঅ̰टĄ ͘Ίၚּ ଀Ą!פι Delphi ԫఙྤੈ͛І׶૱֍યᗟྋඍ(FAQ)˵Ξͽдྍშ৭ Delphi ۞ણ҂३ϫĄ׎ ٺੈă͕଀׶ԫఙ۞г͞Ąშ৭Тॡ˵೩ֻ˞ధкᙯ дშ৭˯ĂଋᔘΞͽણΐధкາჷ੅ኢཏ௡Ă఺ߏ Delphi ฟ൴ˠࣶϹೱྤ http://www.borland.com/devsupport/Ą Borland೩ֻЧёЧᇹ̝͚೯ีϫĂͽ੨ЪЧ჌̙Тฟ൴ۤཏ̝ᅮՐĄણ҂ ચڇBorland ฟ൴ˠࣶ͚೯ ޷ F1 ӈΞĄ!ޢ᏾ᄱੈिפ˞ྋ᏾ᄱࣧЯĂΪࢋଂ̚Ᏼ ༊᏾ᄱੈिϤበᛌጡᄃᓑඕጡயϠГ඀ёበᏭጡ˭͞পঅ۞ෛ඄̰ॡĂࡶࢋ Ąځϫ۞ᄲ ಶਕពϯྍี ٕෛ඄˯޷ F1 ׻ ΄Ă၆ ྖ ͞ ๴ дЇңΑਕܑ ! ᄃ඀ёనࢍ͘Ίܝ1-10 ˢ KeyCaps ఺჌фវϡֽܑϯдᔣሹ̚۞޷ᔣĄּтĂĶ޷EscᔣඕՁΑਕᏴಏĄķ ˵ϡֽૻአߙֱপҾ۞фĂညߏາ۞ЩෟĄ ୆វф д͘Ί̚ϡֽܑϯDelphi۞ᙊҾфĂညߏតᇴٕݭၗЩჍĄ୆វТॡ фវٕ௑ཱི ຍཌྷ ᄮᙊᒖဩ 2-1 ۏІᑭෛጡĂۏ׍Ąд Delphi ̚ĂፋЪᒖဩΒ߁̍׍ЕĂΑਕܑĂ̮ІሹĂ Delphi ฟ൴ᒖဩٙ೩ֻ۞ೀ࣎͹ࢋ̍ זԣгĂଋಶົ࠻ޝĂޢDelphi ୁજ ፋЪᒖဩ y ᗕᑝҜд Delphi\Bin ϫᐂ˭۞ Delphi32.exeĄ y ଂฟؕᏴಏĂᏴፄેҖĂ֭Ꮾˢ Delphi32Ą ඀ёะ| Borland Delphi 7| Delphi 7Ąפy ଂฟؕᏴಏĂᏴ ϲଥश)Ąޙଋѣڍy ᗕᑝ Delphi ۞ဦϯ (т જ DelphiĈୁֽڱଋΞͽֶͽ˭ೀ჌͞ ୁજ Delphi Ąځᒖဩ۞ᖎࢋᄲ тңୁજ DelphiĂ̬֭௜ᒖဩ̚͹ࢋ۞ొ̶ᄃ̍׍Ăͽ̈́ፋЪځώౢ༼૟ᄲ ᄮᙊᒖဩ ᄃ඀ёనࢍ͘Ίܝ2-2 ˢ ࡶຐࢋጯ௫тңҋࢎፋЪᒖဩĂኛዦ᝝ௐ 4 ౢĶҋࢎᒖဩķĄ ЪᒖဩĄ! ࢬĂᕱᜓᙷҾྤफ़ऱĂᇤᆷ඀ёቅĂീྏĂੵ᏾Ă̈́გந૞९҃ͦᅮᗓฟፋ дፋЪᒖဩ̚Ăଋٙᅮ۞඀ёనࢍ̍׍Бొݬ͘Ξ଀Ąଋਕૉనࢍֹϡ۰̬ ̼నࢍ̍׍௲༼Ą ۞ DFM ᑫĄଋᔘΞͽ͘જгበᏭЇң Delphi யϠ۞඀ёቅĂ̙҃ົᄃෛᛇ ͽ඀ёቅበᏭጡᑭෛѩܑॾͽ͛ф͞ёӔனגĂಶΞͽϲޢีט׎ιෛᛇଠ ̈́඀ёቅበᏭጡ̝ม̷ೱĄּтĂ༊ଋдܑಏనࢍ̍׍˯ଵЕрೀ࣎޷ต̈́ Delphi ፋЪᒖဩߏᗕШፆᓂ۞̍׍Ą఺ܑϯଋΞͽ̙ᕝгдෛᛇ̼నࢍ̍׍ ᑭෛ඀ёቅ۞ Code Explorer Ә෦ଋ඀ёቅ̝ໄ៍֭ឰଋԣి ІᑭෛጡĄۏІ఍ந඀Ԕ۞ ְפІ̝পّ֭ᏴۏϡֽԼត ॾĄ ёΞͽΒӣధкܑ ۩ϨܑॾĄᑕϡ඀ ඀ёֹϡ۰̬௜۞ ϡֽฟؕనࢍᑕϡ ቅ۞඀ёበᏭጡĄ ϡֽᑭෛ׶በᏭ඀ё Ąۍ̮І۞ሀ ёۡ̚ତֹϡ̝ ଋ̏གྷΞͽд඀ ᆷ඀ё ଋᇤܮ჌Αਕᄃ̍׍͞ Αਕܑᄃ̍׍Е೩ֻЧ णனଋ̮Іม۞ͭ̄ᙯܼ ဦ౅࿅ลᆸё۞͞ёېІፘۏ ώ۞̙ТѣѣٙमளĄۍ পҾ۞̍׍̮̈́ІĂົᐌ඾ Delphi ဦĂ඀ёቅበᏭጡĂCode ExplorerĂ૞९გநࣶͽ̈́׎ι̍׍ĄߙֱېІፘ ᄮᙊᒖဩ 2-3 ਕܑ̈́̍׍Еķͽ̈́ĶᐼхॸࢬଵЕķඈ̈༼Ą ொҌາ۞ҜཉĄࡶᅮࢋՀкྤੈĂኛણ҂ௐ 4 ౢĶҋࢎᒖဩķ̚۞ĶщଵΑ Delphi ۞̍׍ЕౌߏΞҋࢎ۞ĄଋΞͽΐˢາ۞޷ตĂ˵Ξͽ૟ࣧѣ۞޷ต І࠹ᙯ۞જүĂѩΑਕܑჍࠎԣଥΑਕܑĄ ۏଋΞͽдధк̍׍̈́ဦϯ˯޷˭໣ဂΠᔣͽពϯ˘࣎ΑਕܑĂͽซҖᄃѩ ĄޢߏΞҖॡĂιົ΍னд˭ٛᏴಏ׻΄Е̝ ಶည̍׍Е޷ต˘ᇹĂధкΑਕ˵ౌѣ၆ᑕ۞ԣଥᔣΞֹϡĄ༊ߙ࣎ԣଥᔣ ેҖ ᇶઃ ಏՎ੠ᖸ ! በᏭጡ ᗝγ۞ ࢱࢬሀ௡ າ۞ WebSnap ଋٙࢋ۞Ąפ८ View | ToolBars ֭ פ̍׍ЕĂᏴ ֽܑᔳᖟ̍׍ЕĄࢋពϯᔳᖟ۞ ଋ˵Ξͽֹϡ໣ဂΠᔣ۞Αਕ ตĂൾઃ˘ົ׊ಶົពϯ೩ϯĄ ޷ז੠ᖸ ࢋԱ΍޷ตٙઇ۞ְĂ޽ எˢ ેҖ۞૞९ Е΍ଋΞͽ ྤफ़ሀ௡ າ۞ WebSnap ᑕϡ඀ё າ۞ WebSnap Internet ̍׍Е ੵ᏾̍׍Е ૞९̚ז ԯᑫ९ΐ ѣᑫ९ ᐼхٙ ᑫ९ ฟୁ ܑॾ ᑭෛ ᏾ॸࢬ నؠੵ ܑॾ າᆧ ݈ॸࢬ ᐼхϫ ॸࢬЩჍ ̏ᐼх۞ ૞९ ฟୁ ᑫ९ ᐼх ᑫ९ າᆧ ׶඀ёಏ ̷ೱܑॾ ёಏ̮ ᑭෛ඀ ९̚ொੵ ԯᑫ९ଂ૞ ᑭෛ̍׍Е ॸࢬ̍׍Е ᇾ໤̍׍Е ! ၆ᑕ۞ᏴีĄ!זตĄٙѣ̍׍Е޷ต࠰ΞдΑਕܑ̚Ա ϡүຽ׶׻΄۞޷૱פҜд͹ෛ඄۞ Delphi ̍׍ЕĂӣѣਕૉ೩ֻԣిх ඄۞ሀᇹ ё˭Ă͹ෛ ࿰నଵЕ͞ ҫፂ൪ࢬ˯͞۞͹ෛ඄ĂΒӣΑਕܑĂ̍׍Ё̮́ІሹĄ ϡ̍׍ЕĂΑਕֹܑ ᄃ඀ёనࢍ͘Ίܝ2-4 ˢ Іķ̈༼Ą̮ٸΞͽྻү൑ᄱĄኛણ҂ௐ 3 ౢ۞Ķдܑॾ˯ཉ ϲᑕϡ඀ёγ៍ͽ̈́඀ёቅ̝ม۞ాඕĂឰᑕϡ඀ёޙĂڱϲְІ఍ந͞ޙ Іᑭෛጡనؠ̮І۞পّĂۏдܑॾ˯۞̮ІĂΞͽ౅࿅ٸཉٺనؠ̮ІĄ၆ Ξֶ໰ଋຐࢋдֹϡ۰̬ࢬ̚णன۞γ៍Ăдܑॾܑٕಏనࢍ̍׍˯ଵЁ́ ιࣇĄ ឰҰΞͽдᑕϡ඀ё̚ፆଠ-ڱՏ̮࣎Іౌѣ׎পҾ۞ᛳّ⎯পّĂְЇ́͞ ̮І ̷ೱՀк۞ࢱࢬ ̮Іሹ۞Ч࣎ࢱѨĂ޷Αਕ̶௡ ϡֽฟୁ̈́ᐼхᑫ९۞၆ྖ஼ඈඈĄ ͛ф͞๴ăup/down ޷ตć၆ྖ஼ࢱࢬಶΒӣ˞૱ϡ۞၆ྖ஼̮ІĂּт ĂּтĈีטּтĂStandardăAdditionalăͽ̈́ Win32 ࢱѨಶΒӣ˞ෛ඄ଠ Ξෛ̮ІĄ఺ֱࢱࢬֶΑਕّ૟̮Іડ̶ࠎధкཏ௡Ąܧᑕϡ඀ё۞Ξෛٕ ̮ІሹΒӣధкࢱࢬ̈́Ч჌̙Тཏ௡۞ဦϯĄՏ࣎ဦϯ΃ܑ˘࣎Ξϡֽనࢍ ϲֹϡ۰̬ࢬޙё ӄଋࠎᑕϡ඀םဦĂΞېІፘۏІᑭෛጡᄃۏචϡ̮Іሹăܑಏనࢍ̍׍ă Іᑭෛጡۏ̮ІሹĂܑಏనࢍ̍׍̈́ ޷ F1Ą!ޢĂኛ޽ШྍᏴีځଋᅮࢋЇңѣᙯΑਕܑᏴี۞ᄲڍт ซ˘Վྤੈ… ᄮᙊᒖဩ 2-5 ဦ֭՟ѣពϯ΍ֽĂኛᏴፄ View | Object TreeViewĄېІፘۏĂڍт ёĄב఍ந ཉଋٙᇤᆷ۞ְІٸฟୁ඀ёበᏭጡܮဦ̰۞̮ІĂͽېІፘۏຍ˘࣎Ҝд ဦົͽࡓҒયֽཱི೩ᏹĄଋ˵ΞͽᗕᑝЇېІፘۏІᛳّ՟ѣԆјĂۏ઄т ॡĂ֤ᆃ׌۰ม۞ᙯܼಶតј˞ͭ̄ᙯܼĄ˭ٸ͞˯ ٛҌ Panelٳ๴͞פ८ ଋ૟ڍ๴̮ІĂѩॡ఺׌̮࣎ІߏΈԙᙯܼĄҭт͞פ˯ΐˢ˞ panel ᄃ८ ଋд FormڍဦՀજ̮Іᄃ׎΁̮І۞ᙯܼĄּтĂтېІፘۏଋΞͽ౅࿅ ІᑭෛጡᄃܑॾົТॡՀԼ൏ᕇٙдĄۏဦ̰Լត˞൏ᕇĂѩॡې ІፘۏІᑭෛጡăܑಏనࢍ̍׍ТՎĂٙͽ༊ଋдۏᑭෛ͞ёᄃېܼĄፘ͚ ІมΈԙăͭ̄۞ᙯ̮ځ྿͞ёᄲܑ۞ېᑭဦΞ౅࿅ลᆸёٕፘ͚ېІፘۏ ဦېІፘۏ !৶͔̚ຩವĶComponent PaletteķᙯᔣфĄځдᄲ ซ˘Վྤੈ… ІĂજၗгពϯ׎পّ۞̰टĄ ІᑭෛጡົॲፂٙᏴ۞̮ۏĂޢ˯ॾܑזٸдଋ૟̮І ᄃ඀ёనࢍ͘Ίܝ2-6 ˢ ІĄۏࣧ Іᚗऱ྆۞ۏ۞࣒Լົᇆᜩд Іۏ૞९ٺ၆ޢֹϡ޽۞ߏ͟ ІĄۏ࣒Լົᇆᜩ૞९྆۞̄ І۞ۏྍٺІᚗऱ྆၆ۏдޢ І۞ኑώĄᚶٚ޽۞ߏ͟ۏЊ ኑᄦ(࿰నࣃ)д૞९̚ΐˢ˘ ІĈۏᚶٚăֹٕϡߊѣ۞ ІॡĂΞͽᏴፄኑᄦăۏϲາ ޙІۏІᚗऱ྆۞ۏ༊Ұॲፂ frameĂಏ̮ͽ̈́ჟីඈඈĄ Іᚗऱ۞Ч࣎ࢱࢬΒ߁ܑॾĂۏ ဦĄېІፘۏֽពϯ ኛ޷˭ Alt-Shift-F11 Іᑭෛጡ̰۞൏ᕇĄ ۏဦᄃېІፘۏត ॡĂDelphi ົҋજԼ Іۏ۞˯ᕇᏴܑॾ ТྻүĄ༊ଋם׍ົ ෛጡᄃܑಏనࢍ̍ ІᑭۏဦăېІፘۏ ! !ІĄۏІ࠹Ҭ۞ۏϲ̝ޙІᚗऱĄАᑭߤᚗऱ࠻࠻ߏӎѣ׶ٙࢋۏ஼Ăιಶߏ File | New| Other Ψ΍ New Item ۞၆ྖ פ༊ଋࢋฟؕາ૞९ॡĂኛᏴ ІĄۏІĂቑּ඀ё׶׎ιధкਕૉᖎ̼ฟ൴̍ү۞ۏྤफ़ሀ௡ăჟីĂВֳ ІĂညߏܑॾă၆ྖ͞๴ăۏІᚗऱ(Object Repository)ӣѣధкᑕϡ඀ёۏ Іᚗऱۏ !৶͔̚ຩವĶObject TreeViewķᙯᔣфĄځдᄲ ซ˘Վྤੈ… फ़ऱ࠹ᙯ̮Іมᙯܼ۞ᗃ୻Ă͍׎পҾѣᑒӄĄ!ྤٺဦ၆ېІፘۏ ! ᄮᙊᒖဩ 2-7 Code InsightăClass Completion ͽ̈́ Code BrowsingĄ ӄଋĂΒ߁םࣧؕ඀ёᑫ̚Ą༊ଋдᇤᆷ඀ёॡĂDelphi ೩ֻᇴ჌̍׍ֽ זASCII ඀ёቅበᏭጡԯ඀ёቅΐ ۞ޙ९ܑٕॾᑫ̚Ąଋ˵Ξͽۡତֹϡ̰ ҋજͅߍд૞ົڍ࣒Լܑॾ׶̮І۞পّॡĂՀԼ۞ඕ֭פ඀ёቅĄ༊ଋᏴ ͽෛᛇ̼͞ёనࢍᑕϡ඀ё۞ֹϡ۰̬ࢬॡĂDelphi ົயϠ࠹၆ᑕ۞ Delphi ඀ёቅበᏭጡ ώ҃ѣ̙ٙТĄ!ۍ ৶͔̚ຩವĶObject RepositoryķᙯᔣфĄ఺࣎ีϫ૟ֶଋ۞ Efmqijځдᄲ ซ˘Վྤੈ… ˘༼Ą ІᚗऱķۏΐˢڕІᚗऱĂኛણ҂ௐ 4 ౢ۞Ķ૟ᇹۏ୬૟૞९ᄃܑॾቑώΐˢ ۞ึԔĄ ΍னд New Items ၆ྖ͞๴ ᕇᏴ቏ᐝͽԼត఺ֱᇾចࢱ Іᚗऱ̚۞ᇾចࢱĄۏ׻Щ ଋΞͽາᆧăொੵăٕࢦາ ֭Ᏼፄ PropertiesĂٕ۰ۡତϤ͹ΑਕܑᏴፄ Tools | Repository ᏴีĄ ІĂኛд New Items ၆ྖ஼̚ಏ޷໣ဂΠᔣۏІᚗऱٕொੵۏІΐˢۏ୬૟ ᄃ඀ёనࢍ͘Ίܝ2-8 ˢ ĄۍγĂΞనࢍ࣎ˠ۞ᇹۍёቅ̚Ąੵ˞Delphiٙ೩ֻ̝ᇹ Code templates ޷˭Ctrl+JЕ΍૱ϡ۞඀ёనࢍୃࢗĂଋΞͽΐˢҌ࣎ˠ۞඀ ٙࢋ۞ᙊҾфͽពϯ׎ؠཌྷĄזTooltip symbol insight дበᏭ඀ёቅॡĂ޽ ۞ࣃĄ ٙࢋ۞តᇴពϯ׎ϫ݈ז༊඀ёซҖੵ᏾҃ᇶઃેҖॡĂ޽ evaluation Tooltip expression Ąڱٙѣણᇴ۞ᄬ̝ڱЩჍ׶ν߁ཱིಶਕពϯྍ͞ڱCode parameters Ꮾˢ͞ Ψಶਕ૲΍ણᇴ۞୻ಏĄײڱٕ͞ ёב޷Ctrl+spaceពϯྍតᇴ̝ણᇴ۞ϒቁ୻ಏĄᏮˢ඀Ԕă ۞Interfaceડ๴ĂଋՀΞͽᏴፄк࣎ีϫĄᏮˢ޽ؠୃ֭ࢗ ޷˭EnterĄд඀ё̚ޢ׶ְІ۞୻ಏĂᏴፄϒቁ۞ୃࢗڱ͞ ྍᙷҾ۞ᛳّăٺCode completion ᏮˢᙷҾЩჍГᏮˢήᕇ (.) ົពϯ૞ᛳ ̍׍ ྻү͞ё ܑ2.1 Code Insight̍׍ Code Insight ̍׍ົд඀ёቅበᏭጡ̚ពϯԣଥΑਕܑĄ Code Insight ቅĄ ۞඀ё ٙயϠ Delphi ቅ̚Ą ඀ёזІົͅᑕ ॾ˯۞ܑ̮זΐ ᄮᙊᒖဩ 2-9 ৶͔̚ຩವĶCode Insightķ和ĶClass Completion」主題。۞ځдᄲ ซ˘Վྤੈ… ᏴĄ Explorer ࢱѨĂ֭ቁؠ Finish incomplete properties ఺࣎Ᏼีѣజ̺ זೱ ࡶࢋనؠ Class CompletionĂኛᏴፄ Tools | Environment Options ֭ͷ̷ ӘĄކΐˢᙷҾڱCompletion Αਕࠎଋ૟͞ ϺΞϤ Classڱϲ඀ёቅૄώߛၹĄ̏၁ү۞͞ޙڱෟĂ֭ࠎᙷҾ۞ٙѣ͞ Ә̚ҋજΐˢ private read ̈́ write ޽ؠކCursor ᏴีĄDelphi ົдυࢋ۞ ޷˭ Ctrl+Shift+CĂٕ۰޷˭໣ဂΠᔣᏴፄ Complete Class atޢinterface ఍Ă൒ Ә̝ކClass Completion ΑਕΞயϠ඀ёቅ̝ૄώߛၹĄ૟ഫᇾᕚдᙷҾ Class Completion ᙯౕ˯ࢗ఺ֱ̍׍Ą ฟୁٕܮଋυืֹϡ Tools | Editor Option ֭ᕇᏴ Code Insight ࢱѨĂͽ Ә۞ੈिĄކ̶ొ ҋજࠎଋពϯѣᙯ఺ܮ Tooltip ߙֱф˯ॡĂז༊ଋ૟໣ဂொ ͞ёଵЕĄ ፄ Sort by Name ឰ୻ಏͽфϓ ଋΞͽ౅࿅ᕇᏴ໣ဂΠᔣ֭Ᏼ ᇴߏᖡҒĄבҒĂ҃ ඀Ԕ׶ᛳّົజᇾϯࠎᖡქ ඀ёቅ̚Ą!זԯιΐ ϫ֭޷˭ Enterีפ୻ಏ̚Ᏼ Ă׶ְІ۞ᇅ΍ё͞๴Ąଂڱ ࣎Е΍ᙷҾ̝ϒቁপّĂ͞ ˢήᕇॡĂDelphi ົҋજពϯ˘ ϡԆј඀ёቅĂдଋᏮֹڍт ᄃ඀ёనࢍ͘Ίܝ2-10 ˢ ৶͔̚ຩವĶCode editorķᙯᔣфĄ!ځдᄲ ซ˘Վྤੈ… т୬ҋؠଋ۞඀ёቅበᏭᒖဩĂኛણ҂ௐ 4 ౢ۞Ķҋؠ඀ёበᏭጡķ˘༼Ą Әᄃ၁үม̷ೱĄ!ކଋΞͽ౅࿅ Ctrl+Shift+Ɠٕ۰ Ctrl+Shift+Ɣд඀Ԕ ! ! ! ! ࣎Ą˘˭ז݈ـตĂಶ ཉĂᕇᏴ Forward ޷ Ѩଋ̍ү۞඀ёҜ˘ܕ ౵ ז ᕇᏴ Back ቏ ᐝĂа ۞ؠཌྷొ̶Ą ඀ёበᏭጡჯ᜕඾ଋٙྯҌ Әొ̶ĄކᙯྍᙊҾф۞ ֭Ᏼፄ FindĂ੺˯ಶྯ᜙Ҍѣ ޷˭ Ctrl ٕ۰ᕇᏴ໣ဂΠᔣĂ ! ҂ᕇԣిொҜĄ ۞ҜཉĄଋΞͽᕇᏴ Forward ᄃ Back य़۞˭ٛё޷ตĂ֭౅࿅።Ϋ۞ણ Forward ᄃ Back ۞޷ตĄ༊ଋྯҌ఺ֱؠཌྷॡĂ඀ёበᏭጡົ੃ᐂଋٙд ྍᙊҾфؠཌྷ۞г͞Ą඀ёቅበᏭጡಶည Web ᕱᜓጡ˘ᇹѣ඾ـྯ ቢĂଋΞͽᕇ˭΁֭غ໣ဂഫᇾೱតј͘۞௑ཱིĂ֭ͷᙊҾфೱតјᖡҒΐ ӘĄ޷˭ Ctrl ᔣĂކಏΨઇ Tooltip Symbol Insight ពϯྍᙊҾфдң఍జ ۰׎΁ᙊҾфॡĂົѣ࣎ԣଥᏴٕ ,ڱ༊ொજ໣ဂдᙷҾăតᇴăᛳّă͞ Code!Browsing ᄮᙊᒖဩ 2-11 ٕЕОĄ Ă֭ͷซҖᐼхځĂଋΞͽࠎ఺࣎ Diagram Ꮾˢ˘࣎Щфᄃᄲޢ༊ଋԆјͽ ٕ׎΁ොྋĄ ߙ࣎޽ؠ۞̮Іـྋડ๴ా ֹ֭ϡ allude ాඕቢ૟ྍො າᆧ˘߱ොྋĂܮྋડ๴ͽ ඾̙Тݭၗ۞ᙯܼĄᕇᏴො ᙯᓑĄాඕቢ۞̙Т˵΃ܑ ̮Іมͽ̮̈́Іᄃᛳّม۞ ͽ̈́ Lookup – ֽ޽ؠ̮Іᄃ ต – PropertyăMaster/Detailă ֹϡ Diagram ۞̍׍Е޷ ᏮˢЩфĂ֭ೡࢗଋ۞ဦԛຍཌྷĄ ۞ DiagramĂኛᏴፄ˭ٛё͞๴Ą ࡶࢋᕱᜓд఺૞९̰׎΁ଋ̏׻Щ ! Diagram זဦϯ Ѣٳ ଂ Object TreeView lookupĄଋ˵Ξͽдాඕมٕဦϯมΐˢොྋડ๴Ą ตĂΐˢα჌ాඕጡ۞˘჌ĂΒ߁ alludeăpropertyămaster/detail ͽ̈́ ՟ѣᙯᓑҭଋຐពϯ۞̮ІĂֹϡ Diagram ࢱࢬ˯۞̍׍Е޷ֱ֤֭ٺ၆ ҋજాඕᛳّᄃ dataset ׌ဦϯĄົܮDiagram ࢱĂ݋ᛳّాඕጡ זဦϯ Ѣྍဦϯͽ̈́׎ᛳّٳफ़ሀ௡Ă֭ͷྤזтĂ઄тଋΐˢ˘࣎ dataset ̮І ҋજणன׎࠹ֶᙯܼĄּົܮ(ࢱࢬ˯ॡĂѩॡቢ୧ٕాඕጡ (connectorsז ShiftĄ༊ଋ૟ parent-children ٕ component-property ѣ࠹ֶхᙯܼ̝ဦϯ ٛ࿅඀̚ኛ޷ҝٳDiagram ࢱݬۡଵЕĄࡶࢋͪπଵЕ݋д זٕ࣎к࣎ဦϯ ٛ˘ٳဦ̚ېІፘۏଂޢϲ˘࣎ DiagramĂኛАᕇᏴ Diagram ࢱĄ൒ޙࢋ ᛳّ۞ᙯܼĄזᙯܼăͭ̄ᙯܼĂٕ۰ߏ̮І ཉдܑॾٕྤफ़ሀ௡˯̮Іม۞ᙯܼĄ఺ֱᙯܼΒ߁Έԙٸϯᄃాቢܑ྿ଋ ࢱѨϒߏଋᇤᆷ඀ёቅ۞г͞Ă˵ߏ࿰నពϯ۞ࢱࢬĄDiagram ࢱࢬ౅࿅ဦ ώ̙ТĂд඀ёበᏭጡ˭͞Ξਕѣ˘ٕ࣎к࣎ᇾចĄCodeۍ۞ ֶଋ Delphi Diagram ᄃ඀ёనࢍ͘Ίܝ2-12 ˢ ৶͔̚ຩವĶform filesķ͹ᗟĄ!۞ځдᄲ ซ˘Վྤੈ… ϲ۞ܑॾ۞ᐼхॾёĄޙ۞Ᏼีͽՙؠາ Environment Options ᕇᏴ Designer PageĂГ̺ᏴĶNew forms as textķ ܑॾᑫ९Ξͽ͛ф( ࿰నࣃ) ٕ˟ซҜॾёֽᐼхĄଋΞͽд Toolǖ фೡ̰ࢗटĄ ܑॾᛳّ۞͛ በᏭጡ̚ᑭෛ Text д඀ёቅ ֹϡ View As ӈΞĄ аܑಏనࢍ̍׍ĂТᇹгͽ໣ဂΠᔣಏᕇበᏭጡĂᏴፄ View as Form Ᏼี ܔಏᕇܑॾĂᏴፄ View as Text ᏴีĂ఺ॡಶΞͽฟؕበᏭܑॾᑫ९Ąࡶࢋ ߁Տ̮࣎І۞ϖᜈপّĄ୬д඀ёቅበᏭጡ˯ᑭෛܑॾᑫ९Ăኛͽ໣ဂΠᔣ ᑫ९(ઘᑫЩߏ.dfm ٕߏ CLX ᑕϡ඀ё۞.xfm)ೡܑࢗॾ˯۞Տ̮࣎ІĂᔘΒ Delphi ۞ෛᛇనࢍ̍׍ֽనࢍܑॾĂDelphi ૟ܑॾхдܑॾᑫ९̰Ąܑॾ ܑॾߏ Delphi ૞९۞ܑࢬొ̶Ă˵ಶߏᑕϡ඀ё۞ֹϡ̬ࢬĄ఼૱ԧࣇϡ ᑭෛ࣒̈́Լܑॾᑫ९ ৶͔̚ຩವĶDiagram pageķᙯᔣфĄځдᄲ ซ˘Վྤੈ… ᄮᙊᒖဩ 2-13 Іٙᅮ۞ᑫ९ĄଋΞͽд૞९გநࣶ-Delphi ೩ֻ۞૞९ۏᑕϡ඀ёٕВֳ Ăົҋજฟୁ˘࣎າ૞९Ą˘࣎૞९̚Β߁ధкଋ୬ฟ൴ޢ ༊Ұୁજ Delphi ૞९გநࣶ ৶͔̚ຩವĶCode Explorerķ͹ᗟĄ۞ځдᄲ ซ˘Վྤੈ… Explorer ᇾចĄ פ֭Ᏼ ୬నؠ඀ёᕱᜓጡ̰ពϯֱࣹีϫĂኛᏴፄ Tools | Environment Options ဦϯĄ ౌົЯ׎ݭၗѣ඾̙Т۞ Տ࣎඀ёᕱᜓጡ̰۞ีϫ ѨٙдҜཉ ёᕱᜓጡٕ඀ёበᏭጡ݈ Ctrl+Shift+E Ξ૟ഫᇾொҌ඀ ၁ઇొ̶Ą޷˭זொגϲ ϫĂ݋඀ёበᏭጡ̰۞ഫᇾ ᗕᑝ඀ёᕱᜓጡ̰۞ี ! ొ̶Ą! Ә۞ؠཌྷކொҌྍᙷҾົܮĂ֤ᆃ඀ёበᏭጡ̰۞ഫᇾڱᕱᜓጡ̚۞˘࣎͞ ଋΞͽֹϡ඀ёቅᕱᜓጡд඀ёበᏭጡֽ̚аྯ᜙ĄּтĂ༊ଋᗕᑝ඀ёቅ ˵ពϯЕд vtft ̄ή̚۞׎ιಏ̮Ą! ёĄιבăፋវّតᇴă׶඀ёಏ̮ٙ̚ؠཌྷ۞ڱफ़ݭၗăᙷҾăপّă͞ ဦ͞ёЕ΍඀ёቅट۞ྤېёቅᕱᜓጡ̚࠻֍በᏭጡ̝̚඀ёቅ̰टĂͽፘ Delphi ॡĂ඀ёቅᕱᜓጡᑕྍົ΍ன඀ёቅበᏭጡ۞ν͞ෛ඄̰Ąଋົд඀ ώ೩ֻ඀ёቅᕱᜓጡ(Code Explorer)Ăฟୁۍ ࣐ࡶଋֹٙϡ۞ Delphi ඀ёቅᕱᜓጡ ᄃ඀ёనࢍ͘Ίܝ2-14 ˢ ̈́ણ҂۞̈́జણ҂۞ಏ̮Ą ಏ̮ࢱពϯಏ̮Ăಏ̮̰۞ᙊҾфĂͽ ᙷҾࢱពϯลᆸё۞ᙷҾߛၹĄ ёĄבĂតᇴ̈́ڱ Бા௑ཱིࢱពϯᙷҾĂݭҾĂপّĂ͞ ˬࢱĂ̶ҾߏБા௑ཱིĂᙷҾ̈́ಏ̮Ą ᑭෛડ(νᙝ)ͽ̈́௟༼ડĄᑭෛડ̶ࠎ ૞९ᕱᜓጡѣ׌๴Ξͽአፋ۞ቑಛ: View | Browser Ξฟୁ૞९ᕱᜓጡĄ ё)ඈĄᏴፄבăតᇴᄃڱϡ̝ᙷҾăಏ̮ăБા௑ཱི(ྤफ़ݭၗăপّă͞ Әֹٕކဦពϯ૞९̰ଋٙې૞९ᕱᜓጡΞՀྎ௟гᑭෛ૞९Ąιਕૉͽፘ ૞९ᕱᜓጡ ৶͔̚ຩವĶProject Managerķ͹ᗟĄ!۞ځдᄲ ซ˘Վྤੈ… តՀ૞९నؠĂኛણ҂ௐ 4 ౢĶనؠ૞९ᏴีķĄ! ९ΐˢТ˘࣎૞९ཏ௡Ăּтк࣎ેҖᑫĂҰࠤҌΞͽТॡበᛌιࣇĄࡶࢋ ଋΞͽֹϡ૞९გநࣶԯ࠹ᙯ۞૞९௡Ъј˘࣎૞९ཏ௡ĄᖣϤԯ࠹ᙯ۞૞ ! View | Project Ᏼีֽୁજ૞९გநࣶ(Project Manager)Ą פ Ї́඀ёऱ۞ᑫ९ĄኛᏴۏგந̍׍̚ᑭෛ̈́௡ᖐ఺ֱܑॾĂಏ̮Ăྤ໚Ă ᄮᙊᒖဩ 2-15 ৶͔̚ຩವĶTo-Do Listsķ͹ᗟĄ!۞ځдᄲ ซ˘Վྤੈ… ॡχ̺Ą Ԇјѩี̍ү ୻ಏϡ۞׻΄Ą ពϯឰଋଵԔ׶ᎡᏴ д୻ಏ˯޷˭Πᔣົ | To-Do list Ξͽາᆧ̈́ᑭෛᄃፋ࣎૞९࠹ᙯ۞̍үЕܑĄ ΐˢࣧؕቅĄᏴፄ Viewځ̍үΐˢѩЕܑ̰Ăٕۡତ૟ߙֱྵপঅ۞̍үᄲ ࿰ؠ̍үܑ੃ᐂ඾૞९̰࿰ࢍࢋซҖ۞ЇચĄଋΞͽۡତ૟ঘ̈́ፋ࣎૞९۞ ࿰ؠ̍үܑ ৶͔̚ຩವĶProject Browserķ͹ᗟĄ!۞ځдᄲ ซ˘Վྤੈ… ๴χ̺ӈΞĄ͞פҌ Explorer ࢱࢬĂ૟ All symbols ८ Tools|Environment OptionsĂ̷ೱ פឰιΒӣ Delphi ٙ̚ѣ۞̮৵ĄኛᏴ Ă૞९ᕱᜓጡΪពϯϫ݈૞९ٙΒӣ۞̮৵ĄҰΞͽԼតቑಛឰ˭ڶ࿰నଐ 2-16 ˢܝᄃ඀ёనࢍ͘Ί ֹϡ Delphi నࢍ඀ё 3-1 Іᚗऱķ˘༼ĄۏĶ Іᚗऱ۞௟༼Ăኛણ҂ௐ 2 ౢ۞ۏٺଋΐˢ૞९̚Ąጯ௫Հкᙯֻۍඈඈሀ ІᚗऱĂ೩ֻᗝγ۞ܑॾăሀ௡ă॰ߛĂࠤҌ၆ྖ஼ۏFile|New ૟ົΨ΍ File|NewĂГᗕᑝ Application ဦϯĄ פFile|New Application ٕᏴ ϲາ۞૞९ĂኛᏴፄޙϫ݈̏ฟୁ˞ߙ࣎૞९ĂҭଋᔘຐࢋΩγڍт (Unit1.dfm; CLX ߛၹ۞ᑕϡ඀ё݋ߏ Unit1.xfm)ඈĄ ˘࣎૞९ࣧؕᑫ(Project1.dpr)Ăಏ̮ᑫ९(Unit1.pas)Ăͽܑ̈́ॾྤ໚ᑫ ϲĄιົҋજயϠޙĂາ۞૞९ົҋજޢ ඀̚ҋજயϠ۞Ą༊ଋୁજ Delphi ϲ۞ಶߏдበᛌ࿅ޙ૞९ߏ˘ཏᑫ९۞ะЪĂ఺ֱᑫ९̙ߏдଋฟ൴඀ёॡ ϲ૞९ޙ ۞૞९჌ᙷĄ ᇤᆷ඀ёቅĂበᛌĂੵ᏾Ă൴Ҷ඀ёͽ઼̈́ᅫ̼ᑕϡ඀ё۞ᇤᆷ׶Ξͽฟ൴ ϲ૞९Ă఍நܑॾĂޙ౅࿅ Delphi ซҖహវฟ൴۞˘࣎ໄ៍ĂΒ߁ځώౢᄲ ϡ Delphi నࢍ඀ёֹ ᄃ඀ёనࢍ͘Ίܝ3-2 ˢ ϲֹϡ۰̬ࢬ(UI)Ąޙֽ˯͹ࢋܑॾٺཉٸ ֹϡ DelphiĂଋࢵАᖣϤд̮Іሹ(Component Palette)̚Ᏼፄ̮І֭૟ιࣇ ϲֹϡ۰̬ࢬޙ ৶͔̚۞Ķdata modulesķ͹ᗟĄځણ҂ᄲ ซ˘Վྤੈ… ༊ଋฟୁ˘࣎̏གྷхд۞ྤफ़ሀ௡ĂDelphi ົពϯιٙΒӣ۞̮ІĄ फ़ሀ௡̚ྤ זٸΞෛ̮І૟׎ܧ ۞˯໣ဂᗕᑝ̮Іሹ үಶညଋдֹϡܑॾ˘ᇹĄ Ξෛ̮Іΐˢྤफ़ሀ௡۞જܧϫ݈۞૞९̚јࠎ˘࣎າ۞ಏ̮Ą૟זົజΐ ࣎۩۞ྤफ़ሀ௡Ăд඀ёቅበᏭጡ̚ߏͽ˘࣎ᗝγಏܑ̮ϯĂ֭ͷ఺࣎ሀ௡ ϲ˘࣎ྤफ़ሀ௡ĂኛᏴፄ File|New|DataModuleĄDelphi ົฟୁ˘ޙࡶࢋ ௡ᖐ۞̍׍Ąܮ௡Ξͽ೩ֻଋ˘࣎͞ ٕ۰ߏຐࢋ૟ଋᑕϡ඀ё۞ྤफ़ऱాତᄃྤफ़఍நఢ݋ొ̶̶ฟॡĂྤफ़ሀ ଋχზࢦኑӀϡ఺˘௡۞ྤफ़ऱᄃր௚̮ІĂڍд೼఼۞ܑॾ˯Ąҭߏтٸ Ξෛ̮ІΞͽྫྷΞෛ̮І˘੓ܧΞෛ̮І۞ܑॾĄܧྤफ़ሀ௡ߏ˘჌ΪΒӣ ΐˢྤफ़ሀ௡ ৶͔̚۞「Projects」主題Ą!ځણ҂ᄲ ซ˘Վྤੈ… ९჌ᙷķĄ ౅࿅ Delphi Ξͽฟ൴۞૞९჌ᙷĂኛણ҂ࢱѨ3-10۞Ķ૞ٺDLLĄࡶຐዦ᝝ᙯ ༊ଋฟؕ˘࣎າ૞९ॡĂଋυืۢ྽ଋࢋฟ൴۞տౣߏ˘ਠᑕϡ඀ёᔘߏ ֹϡ Delphi నࢍ඀ё 3-3 Іۏ۞˯дܑॾפଋΞͽ౅࿅ᕇᏴֽᏴ నؠ˘̮࣎І۞পّົԼតιдଋ۞ᑕϡ඀ё̚ពϯ۞͞ёͽ̈́ҖࠎĄ༊ܑ Ăనؠιࣇ۞পّ֭ᇤᆷιࣇ۞ְІ఍ந඀ёĄޢॾܑ̝זཉٸдଋ૟̮І నؠ̮Іপّ ৶͔̚۞「Component Palette」主題Ą!ځણ҂ᄲ ซ˘Վྤੈ… дܑॾ˯۞ҜཉĄٸତ඾ĂᕇᏴଋࢋԯι ІĄ̮פ ۞୻ಏ̚Ᏼ ϓึԔଵЕ ٕ۰Ăଂ޷ф дܑॾ˯ଋຐࢋ۞Їңг͞ĄזٳᏴፄ̮І֭ͷ ᕇᏴд̮Іሹ˯۞̮ІĄ ཉ̮І۞г͞޷˘˭Ąٸॾ˯χზܑזޢ2 д̮І˯޷˘˭Ă൒ 1 д̮І˯ా޷׌˭Ăٕߏ ॾ˯Ĉܑזཉ̮Іٸѣ׌჌͞ё ཉ̮Іٸ˯дܑॾ ᄃ඀ёనࢍ͘Ίܝ3-4 ˢ Ąּтᄲଋΐ˞˘࣎޷ต׶˘࣎ᇅ΍ёᏴಏڱι۞পّᄃ͞זפΞͽхܮІ ̮۞זІពϯጡ˵͚೯णฟ inline ̮Іણ҂۞ΑਕĂឰଋ൑ืᏴፄజણ҂ۏ มВѣ۞পّĄ Іᑭෛጡ૟ົពϯ఺ֱ̮І̝ۏĂྖ۞פ༊ܑॾ˯෹࿅˘࣎ͽ˯۞̮ІజᏴ ଋٙࢋ۞֤˘࣎ĄפّࣃĄᏴ ࿰న۞পזᕇᏴШ˭቏ᐝΞͽ࠻ ّ۞পّበᏭጡĄ ពϯϡֽበᏭྍপ ᕇᏴЇң࠷ர޷ต Լࠎ FalseĄ ͽԯనؠࣃଂ True Հ д఺㗗ా޷˟˭ಶΞ ࣎࠷ர௑ཱིĄߙֱপّĂညߏ SizeĂۡତᏮˢࣃĄ˘זّ˯޷˘˭Ăଋ૟ົ࠻ ೱĄߙֱপّѣ࠹ᙯ۞পّበᏭጡֽనؠྵኑᗔ۞পّࣃĄ༊ଋд఺ᇹ۞প পֽّᄲĂଋΞͽ౅࿅дপّಏф˯۞ᗕᑝ҃д True ׶ False ̝ม̷ڒͽο к۞পّ׍ѣᖎಏ۞পّࣃůּтᗞҒ۞ЩфĂTrue ٕ False ͽ̈́ፋᇴĄޝ ଋ˵Ξͽдΐཱི˯ా޷˟˭ฟୁྎ௟۞୻ಏĄ ၆ྖ͞๴Ą ՀԼᇴ࣎পّ۞ ୁ˘࣎Ξͽ˘Ѩ ᕇᏴ࠷ர޷ตฟ Լι۞నؠࣃĄ Π઎۞᛼̚Հ পّ֭дפᏴ ιĄפІֽᏴ ۏॾ˯۞̮Іٕ ଋΞͽᕇᏴдܑ ۞পّĄ Button1Ă֭ͷពϯι פ఺㗗ߏᏴ ІĄдۏפಏֽᏴ ֹٕϡ఺࣎˭ٛ୻ Inspector)̚Ą Іᑭෛጡ(ObjectۏĂι۞পّᄃְІົពϯдޢ̝˞פॾ˯۞̮ІజᏴ ֹϡ Delphi నࢍ඀ё 3-5 ĄڱΨ͞ײតপّࣃ֭ ёĄ఺߱඀ёቅົԼבĄ఺߱ͅᑕ۞඀ёቅಶߏְІ఍நڶېёቅͅᑕ఺࣎ ĄּтĈ޷˭˘࣎޷ตĂಶົѣ˘߱඀ڶ˘ְ࣎ІᙯᓑҌր௚ٙ̚൴Ϡ۞ଐ дેҖॡഇĂଋ۞඀ёቅٕధࢋ၆Ξਕ൴Ϡдߙ̮࣎І˯۞ְІઇ΍ͅᑕĄ ᇤᆷְІ఍ந඀Ԕ ઇᏴፄĄࢋ౅࿅ଋ۞ࣧؕቅֽྻүĂኛણ҂ௐ 2 ౢ۞Ķ඀ёቅበᏭጡķ˘༼Ą І̚ۏ۞ᙷҾĄࠎ˞ᑒӄଋԆј఺І̍үĂଋΞͽଂᙷҾ඀ёऱ̚۞ᇴ˼࣎ ధᔘѣ˘ֱଋҋٕ̎ڱΞෛ۞̮ІĂଋ఼૱ΪᅮᇤᆷְІ఍ந඀ԔĂ͞ܧᄃ ၹϡ۞ડ߱Ăညߏ࿰Ащ྅۞Ξෛޙ̶ొ̂˞Delphi ۞ RAD ᒖဩࠎଋ೩ֻ ٙ΃ܑ۞඀ёቅĄޢٙѣᑕϡ඀ё౵̙Ξٕ৿۞ొ̶ĂӈߏдՏ̮࣎І̝ ᇤᆷ඀ёቅ ৶͔̚۞「Object Inspector」主題Ąځણ҂ᄲ ซ˘Վྤੈ… পّߏქҒ۞Ą ࡓҒ۞҃ι۞Ѩ Inline ̮Іણ҂ߏ னĄ ˭ΐཱི(+)ॡົ΍ ܑ۞পّдଋ޷ ᇅ΍ёΑਕޢ൒ ࠎ PopupMenu1, PopupMenu পّ నؠ޷ต̮І۞ ᇅ΍ёᏴಏ۞পّĄٺপّࠎ PopupMenu1ĂಶΞͽពϯ΍ٙѣᙯ Іᑭෛጡ̚Ξͽనؠ PopupMenuۏॾ˯Ă༊Ᏼፄ˞޷ต̮ІĂдܑזІ̮۞ ᄃ඀ёనࢍ͘Ίܝ3-6 ˢ ၹ׶ VCL ߏᙷҬ۞Ą (Timer)̮ІĄ˭ࢬ۞ဦܑពϯ΍ߙֱၹј VCL ۞͹ࢋᙷҾĄCLX ۞ลᆸߛ Ξෛ̮Іညߏྤफ़ะ(datasets)ͽ̈́੺ᏻܧ׎΁ֹϡ۰̬ࢬ۞ၹј̮Іᔘѣ edit controls)Ă޷ตͽ̈́)ีט̙ҭΒӣ˞ેҖॡഇ۞Ξෛ̮ІĂညߏበᏭଠ ёऱבέ̮І඀ёऱ(Component Library for Cross PlatformĂCLX)Ą఺ֱ Component LibraryĂVCL)ͽ̈́д Linux ᄃ Windows ᑕϡ඀ёֹ̚ϡྭπ ĄଋΞͽд Windows ᑕϡ඀ёֹ̚ϡෛᛇ̼̮І඀ёऱ(Visualีט ІĂ྆ࢬΒӣᇤᆷ඀ёॡֹٙϡ۞̮ІᄃଠۏϲޙDelphi ೩ֻ̮І඀ёऱֽ ֹϡ̮І඀ёऱ ৶͔̚۞「events」͹ᗟĄځણ҂ᄲ ซ˘Վྤੈ… ቅĄ யϠૄώ۞඀ё ࠎາ۞఍ந඀Ԕ ؠࣃ᛼ĂDelphi ົ ٕ۰ా޷׌˭న ந඀ԔĄ ߊѣ۞ְІ఍פ ଂ˭ٛᏴಏ̚Ᏼ ޷ต̮ІΞͽ఍ந۞ְІĄזΞͽ࠻ Іᑭෛጡ˯۞ Event ࢱᇾចಶۏTButtonĄᕇᏴ Ă׎ݭҾពϯࠎĈפдѩĂButton1 ̏జᏴ Іᑭෛጡ̚޷˭ְІࢱѨĄۏд֭פ ࡶຐࢋ៍࠻дܑॾ˯۞̮Іٙ̚࿰Аؠཌྷр۞ְІ఍ந඀ԔĂኛА૟̮ІᏴ ֹϡ Delphi నࢍ඀ё 3-7 ଋΞͽАࠎଋ۞૞९ซҖበᛌĂତ඾Ωγઇੵ᏾۞જүĂٕ۰ଋΞͽ౅࿅ፋ Ăଋᅮࢋ၆ଋ۞૞९ซҖበᛌ̈́ੵ᏾Ą౅࿅ DelphiĂޢдଋԆјଋ۞඀ёቅ ૞९በᛌ̈́ੵ᏾ ଱ᝋᏴፄኛણ҂http://www.borland.com/delphiĄ ৶͔̚۞「VCL」͹ᗟĄOpen Sourceͽ̈́дCLX˯۞ځReferenceķͽ̈́ᄲ ट̚۞ĶVisual Component Library Referenceķ׶ĶCLX̰ځኛણ҂ᄲ ซ˘Վྤੈ… ּĄ ώӮ̮І඀ёऱ۞ࣧؕቅͽ̈́ Delphi ඀ёనࢍԫμ۞ቑۍ ̂кᇴ۞ Delphi ϠְІ̝඀ёቅĂଋΪᅮࢋ࢑య޷ตజᕇ޷ॡٙ၆ᑕેҖ۞඀ёទᏭĄ Ăಶ̙ᅮࢋᇤᆷ޷ตజᕇᑝॡٙயีטϡ޷ตଠֹڍᛈ൴ OnClick ְІĂт ྅੓ֽ۞ĄᓝּֽᄲĂ޷ตߏ࿰Аజనࢍрያ඾໣ဂᕇᑝֽދޘ̮Іߏజ੼ ֽԣి۞ฟ൴ᑕϡ඀ёĄ дፋЪ൴णᒖဩ(IDE)̚ĂٙͽଋΞͽֹϡညߏܑಏనࢍ̍׍(Form Designer) ఺ֱ̮Іజღ૜ඕЪٺDelphi ۞ܑॾᄃྤफ़ሀ௡̚ĄϤ זІሹ˯ͽ̈́జΐˢ Ăֹ׎Ξͽజщ྅д̮ڱІ׍ѣߙֱপّ̈́͞ۏ۞ֽ˭Ϥ TComponent ᚶٚ ᄃ඀ёనࢍ͘Ίܝ3-8 ˢ ҂ௐ 4 ౢ۞ĶઃҞ̍׍ෛ඄ķ˘༼Ą Ăኛણڱϡ۞ֹ͞ٽՀटܮࡶຐጯ௫тң૟఺ֱੵ᏾ϡ۞ෛ඄ඕЪд˘੓ͽ ੵ᏾ෛ඄Ą ᇴ࣎׀ଋΞͽЪ ϡֹٽࠎ˞Հट ѣБొ۞ੵ᏾ጡᑭෛΑਕĄ ώౌ׍ۍ View|Debug Windows ֽពϯ఺ֱෛ඄Ą̙ߏٙѣ۞ Delphi פᏴ ၗăሀ௡ăCPU ̰ट׶ְІ੃ᐂĄᖣϤېᝑăႾ࠻୻ಏăડાតᇴăેҖჰ Ψુײ౅࿅ፋЪੵ᏾ጡĂధкੵ᏾ϡ۞ෛ඄ౌΞͽֹϡĂΒ߁̚ᕝᕇ୻ಏă ѣ೩ֻĄ Run Button ֱ޽΄д̍׍Е˯˵ ٙѣ۞ੵ᏾޽΄Ąߙ פଂ Run ΑਕܑΞᏴ Run|Run ٕߏ޷˭ F9Ą פٕߏᏴ ଋΞͽдፋЪฟ൴ᒖဩ̚ฟୁੵ᏾ล߱Ăያ඾ᕇ޷ੵ᏾̍׍Е˯۞ Run ޷ต ̺Ᏼ Integrated debuggingĄ Tools|Debugger OptionsĂᕇᏴ General ࢱ֭ቁؠ̏ פϡፋЪੵ᏾ጡĂኛᏴ ၗĄࢋֹېԼྤफ़ࣃĄଋΞͽుҖેҖଋ۞඀ёĂдՏ࣎̚ᕝᕇᑭߤ඀ё۞ ඀ё۞ેҖă៍࠻តᇴ࣒֭טDelphi ֹϡ˘࣎ፋЪݭੵ᏾ጡĂٙͽଋΞͽଠ Project|OptionsĂᕇ Ᏼ Compiler ࢱѨ֭ቁؠ Debug Information ̏జᏴ੓Ą פЪੵ᏾ጡ૟በᛌᄃੵ᏾˘ѨԆјĄࠎ˞ֹϡੵ᏾ॡྤੈֽበᛌ඀ёĂኛᏴ ֹϡ Delphi నࢍ඀ё 3-9 y Resource DLL ჟីâ࣎ DLL ჟីϡֽயϠ֭გநྤ໚ DLLĄ ᖼೱ۞इІΒӣ˞˭ࢬˬ჌۞ፋЪ̍׍Ĉ ЊĄ ώ༊үߏಏ˘૞९̚۞˘ొۍࣇგநજүΞͽ૟Т˘࣎ᑕϡ඀ё۞̙Т઼Ҿ ώ̚ౌѣ఺࣎इІĄ౅࿅఺࣎ᖼೱइІĂԧۍ ઼ҾĂҭ̙ߏдٙѣ۞ Delphi ૞९઼ᅫ̼ĄDelphi Βӣ˞ᖼೱ۞इІϡֽ૟హវώ˿̼֭Тॡ൴ण̙Т۞ በᏭጡ(IME)ͽ̈́ؼҩфะֽ૟ଋ۞ڱ׶ෛᛇ̼̮І඀ёऱ(VCL)͚೯Ꮾˢ Delphi ࠎ઼ᅫ̼׶ώ˿̼۞ᑕϡ඀ё೩ֻ࠹༊к۞পّĄፋЪᑕϡᒖဩ(IDE) ઼ᅫ̼۞ᑕϡ඀ё ৶͔̚۞Ķdeploying, applicationsķ͹ᗟĄ!ځኛણ҂ᄲ ซ˘Վྤੈ… InstallShield Express Custom Edition for DelphiĄ ёĄࡶຐщ྅ InstallShield Express ĂϤ Delphi ۞నؠ൪ࢬ̚Ᏼፄ ϲ˘࣎щ྅඀ޙ఺ֱᑫ९ĂٺExpress ۞నؠ̍׍Ą఺࣎̍׍Ξͽᑒӄଋ၆ ѣЩࠎ InstallShieldܢܮӄ۞ᑕϡ඀ёඈඈĄDelphi ΍ఱॡםइІᑫ׶ ϡ඀ё۞ॡ࣏Ăଋ૟ᅮࢋٙѣ࠹ᙯ೩ֻ͚೯۞ᑫ९ĂּтΞેҖᑫăDLLă ౅࿅̶൴ᑕϡ඀ёĂֹ଀׎΁ˠΞͽщ྅ֹ֭ϡଋ۞ᑕϡ඀ёĄ༊ଋ̶൴ᑕ ̶൴ᑕϡ඀ё ৶͔̚۞Ķdebuggingķ׶Ķintegrated debuggingķ͹ᗟĄ!ځኛણ҂ᄲ ซ˘Վྤੈ… ҂ௐ 4 ౢ۞ĶᐼхॸࢬҶཉķ˘༼Ą ࢬ੨ཉĄՀ௟༼۞ొ̶ኛણۍ఺࣎ॸࢬ۞זଋՏѨࠎᑕϡ඀ёੵ᏾ॡĂֹϡ ༊ଋ૟ॸࢬనؠјੵ᏾ֹϡॡĂΞͽ૟నؠᐼхјੵ᏾ϡٕેҖϡෛ඄Ą༊ ᄃ඀ёనࢍ͘Ίܝ3-10 ˢ ᒖဩ˭Ą Linux ۞ זညĄд Delphi ͚ٙ̚೯۞ Windows পѣ۞ّኳ૟̙ົۡତொങ ࠹ޝᑕϡ඀ё̚γĂι۞ፋЪ൴णᒖဩ(IDE)׶˘ਠ۞ Delphi ᑕϡ඀ёߏ Ξͽֹϡд CLX่ځІऱ۞ีϫܑۏApplicationĄੵ˞̮Іሹ۞̮Іͽ̈́ Linux ۞үຽր௚˯ેҖĄࢋ൴ण CLX ᑕϡ඀ёĂኛᏴፄ File|New|CLX ౅࿅ Delphi Ξͽฟ൴ 32-bit ྭπέᑕϡ඀ёĂЯѩΞͽд Windows ᄃ CLX ᑕϡ඀ё পّЕܑĄ! ώ͚೯۞̍׍ࠎңĂણ҂ www.borland.com/delphi ˯۞ۍࢋۢ྽ଋֹϡ۞ ซ˘Վྤੈ… ՙඉ-͚೯ր௚(decision-support system)Ą ጡĂкลᆸёᑕϡ඀ёĂCORBA ͽ̈́ڇϡ඀ёĂྤफ़ऱᑕϡ඀ёĂCOM Ҩ ጡᑕڇጡᑕϡ඀ёĂညߏ Web Ҩڇώᔘ͚೯˞Ҩۍ̈́кࢦҖ඀۞ੵ᏾Ąߙֱ Іሀݭ)׶ automation controller ͽۏᑫĂҋࢎ̮ІĂкેҖჰĂCOM(̮І ώ۞ Delphi ౌ͚೯˘ਠϡ౉۞ Win32 ෛ඄඀ёనࢍĂDLLs, इІۍٙѣ ૞९჌ᙷ ৶͔̚۞Ķinternational applicationsķ͹ᗟĄځኛણ҂ᄲ ซ˘Վྤੈ… Tools OptionsĄ DLL Wizard ဦϯĄࢋ၆ᖼೱ̍׍ซҖ௡ၗ۞જүĂᏴፄ Tools|Translation ᗕᑝ Resourceޢࡶຐฟୁ Resource DLL ჟីĂኛᏴፄ File|New|Other ൒ y Translation Repository(ᖼೱऱ)â࣎ϡֽᐼхᖼೱ۞Вֳྤफ़ऱĄ ۞ܑॾ(table)Ą y Translation Manager(ᖼೱგநࣶ)â࣎ϡֽ៍࠻׶በᏭᖼೱ࿅۞ྤ໚ ֹϡ Delphi నࢍ඀ё 3-11 ֽĄ Application ဦϯĄଋΞͽଂ̮Іሹ۞ WebSnap ࢱѨ૟ WebSnap ̮Іΐซ ᗕᑝ Web Serverޢϡ඀ёĂኛᏴፄ File|New|OtherĂᕇ Ᏼ WebSnap ࢱѨ൒ ጡᑕڇϲ˘࣎າ۞ WebSnap Ҩޙᇤᆷ˘ਠࢱࢬᖼೱ̍ү۞ְІ఍ந඀ёĄ кॡม͉܅дથຽទᏭ۞నࢍ˯Ă̙҃ᅮࢋ܅WebSnap ۞ฟ൴ˠࣶΞ૟ॡม ᄃෛᛇ̼Ąܮ඀ё̚۞̍үĄྻϡ WebSnap дฟ൴˯ͧ WebBroker Հΐᖎ ጡᑕϡڇ͚೯ͽ̈́ Web შࢱሀ௡Ą఺ֱາᆧ۞ΑਕΞҋજ఍ந˘ਠ Web Ҩ WebSnap ᆧΐ˞ᖼೱጡăᗝγ۞ࠁਖ਼۰ăᗝγ۞ page யϠጡăsession ۞ ଋ۞ Web ሀ௡̚Ąז̚۞ Internet ׶ InternetExpress ࢱѨ૟̮Іΐ ᗕᑝ Web Server Application ဦϯĄଋΞͽଂ̮ІሹޢFile|New|Other ൒ פጡᑕϡ඀ёĂኛᏴڇϲ˘࣎ WebBroker Web Ҩޙё̚Ąࢋב఍ந Ϡ၆ᑕ۞જүĂ֭а็შࢱගֹϡ۰Ąᑕϡ඀ё۞થຽទᏭົజؠཌྷдְІ ጡᑕϡ඀ёԫఙჍ̝ࠎ WebBrokerĂιΞͽ̶ࠁࢋՐĂயڇѝഇ۞ Web Ҩ ώ҃ؠĄۍ Delphi ׍ѣ׌჌̙Т۞ԫఙბ࠻ଋֹϡ۞ Delphi Web შࢱ۞͞ё૟ HTTP ۞ੈि็ᅍаΝĄࢋ૟ Web ۞ྤफ़็ਖ਼΍ΝĂ ጡ˘੓ລ੨ֽ఍நϡ͗ბ۞ᅮՐ֭ͽڇጡᑕϡ඀ёߏ׶ Web ҨڇWeb Ҩ ጡᑕϡ඀ёڇWeb Ҩ Referenceķ͹ᗟĄ! ৶͔̚ĶCLXځࢋۢ྽ֱࣹ̮ІΞͽд൴णྭπέᑕϡ඀ёॡֹϡĂણ҂ᄲ ซ˘Վྤੈ… ᄃ඀ёనࢍ͘Ίܝ3-12 ˢ Access ͽ̈́Їң۞ ODBC ྤफ़ֽ໚Ą ೩ֻధк೼࿆۞ྤफ़ऱॾёĂΒӣ˞ dBaseĂParadoxĂFoxProĂMicrosoft y ᚗᖡྤफ़ऱ͔ᑜ(Borland Database Engine, BDE)ߏ˘௡ᜭજ඀ё׎̚ फ़ऱĄྤפྤफ़ะֽх MSSQL, MySQL ׶ OracleĄ౅࿅ dbExpress ᜭજ඀ёĂଋΞͽֹϡಏШ ጡͧྵԣి۞ాତĂ׎̚Βӣ˞ DB2ĂInfromix, InterBaseĂڇ၆ SQL Ҩ y dbExpress ߏ˘௡ྤफ़ऱᜭજ඀ё۞ะЪĂϡֽ೩ֻྭπέ۞ᑕϡ඀ё ૟ྤफ़ะᄃྤफ़ాତ̮Іΐˢྤफ़ሀ௡̚Ąֽځᄲ ጡĂኛॲፂ݈ٕࢗ၆ᑕ˭Еాତ̍׍̝ڇЧёЧᇹ۞ྤफ़ऱҨזତ඾ࢋాତ फ़ሀ௡̚Ąྤז˯۞̬ࢬĄГֹֽϡ Data Access ࢱѨĂ૟˘࣎ data source ΐ ϲྤफ़ऱᑕϡ඀ёĂࢵАֹϡ Data Controls ࢱѨ۞̮Іֽనࢍଋܑॾޙࢋ Delphi ೩ֻ࠹༊кᇹ۞ྤफ़ऱᄃాତ۞̍׍ֽᖎ̼ྤफ़ऱᑕϡ඀ё۞൴णĄ ྤफ़ऱᑕϡ඀ё ৶͔̚۞ĶWeb applicationsķ͹ᗟĄځኛણ҂ᄲ ซ˘Վྤੈ… फ़ሀ௡Ą WebSnap ᑕϡ඀ёྤ פᑕϡ඀ёဦϯֽх ᕇᏴ New WebSnapޢ View|Toolbars|Internet ൒ פଋ˵Ξͽ౅࿅Ᏼ HTML ࢱពϯ΍ֽĄ ሀ௡ົ૟ଋ۞̍үͽ ௡ٕࢱѨሀ௡ĄࢱѨ ߏӎֹϡྤफ़ሀפᏴ ጡᑕϡ඀ёĄ ڇਕᑒӄੵ᏾ Web Ҩ ጡڇ˘࣎ീྏϡ۞Ҩ ϡ඀ёĄιᔘΒӣ˞ ጡᑕϡ඀ёݭၗ۞ᑕ ڇҖдЧ჌۞ Web Ҩ ϲ˘࣎ਕેޙଋΞͽ ֹϡ Delphi నࢍ඀ё 3-13 ჌̙Тॾё۞ྤफ़ऱܑॾĄ ϲă៍࠻׶በᏭ Paradox ׶ dBase ࿣ޙDatabase Desktop(DBD32.exe)ឰଋ Database Desktop ৶͔̚۞ĶDatabase Explorerķ͹ᗟĄ!ځٕߏણ҂ᄲ Help|ContentsĄ פDatabase|ExplorerĄ ତ඾Ᏼ פϤ Delphi ۞͹ᏴಏĂᏴ ซ˘Վྤੈ… ّะЪĄ ྤफ़ऱҾЩĂ៍࠻ schema ྤੈĂેҖ SQL ߤྙ׻΄ͽ̈́ჯ᜕ྤफ़ϫᐂ׶ᛳ ϲޙSQL Explorer(DBExplorer.exe)Ξͽᕱᜓ֭በᏭྤफ़ऱĄଋΞͽϡιֽ SQL Explorer (Database Explorer) Help|ContentsĄ! פᏴޢAdministratorĄ൒ ඀ёะ|Borland Delphi 7|BDEפϤ Windows ۞ฟؕᏴಏĂᏴ ซ˘Վྤੈ… ٙϡֽాତྤफ़ऱ۞ҾЩ(aliases)Ąีטຏۢ VCL ଠ ֹϡ BDE Administrator(BDEAdmin.exe)ֽ௡ၗ BDE ᜭજ඀ё֭నؠྤफ़ BDE Administrator ৶͔̚۞Ķebubcbtf!bqqmjdbujpotķ͹ᗟĄځኛણ҂ᄲ ซ˘Վྤੈ… ώ۞ Delphi ౌ׍ѣТᇹк჌۞ྤफ़ऱాତ̍׍Ąۍ༊൒Ă̙ߏՏ࣎ फ़ຏ̮ۢІ඀ёऱ (library of data-aware components)Ą Delphi ۞ྤ ٺώ೩ֻ౵੼ड़த۞̮І̬ࢬĄIBX ˵࠹टۍ۞ޢ̝̈́ 5.5 ͽ̈́ࠎ InterBaseפInterBase ՀซลΑਕ۞х ٺᖂĄIBX ᑕϡ඀ё೩ֻ၆ Іߛၹࠎૄ̮פy InterBase Express(IBX)̮Іߏͽҋࢎ۞ Delphi ྤफ़х ІĄۏф׶ဦԛͽ̈́ҋࢎ۞થຽ ᙯᓑّྤफ़ऱĂ࿪̄ฎІ׶ᑫ९ր௚Ă͛ܧ੼ล̬ࢬĂΒӣ˞ᙯᓑّᄃ І(ActiveX Data Object, ADO)ߏ຋హ၆Їңྤफ़ֽ໚۞ۏy ActiveX ྤफ़ ᄃ඀ёనࢍ͘Ίܝ3-14 ˢ ёĄ˘࣎ DLL ̚ΒӣבΨ۞ײ ௡Ă׎̚Βӣ˞Ξͽజ׎΁ᑕϡ඀ёٕ DLLs જၗాඕ඀ёऱ(Dynamic-link libraries, DLLs)ߏ˘჌̏གྷజበᛌр۞ሀ DLLs ĶcomponentsĂcreatingķ͹ᗟĄ! ৶͔̚۞ځϲҋࢎ̮Іķͽ̈́ᄲޙኛણ҂඀ёࣶฟ൴͘Ίௐ̣ొЊĶ ซ˘Վྤੈ… इІķĄ ᇄથٙ೩ֻ۞̮ІĂኛણ҂ௐ 4 ౢ۞Ķщ྅̮І˧םˬѩฟؕĄࢋщ྅Ϥௐ Component|New ComponentĂΨ΍ New Component ჟីĂϤ פІĂᏴ ϲາ۞̮ޙᇄથٙฟ൴۞̮ІٕҋҖᄦү̮ІĄࢋ˧םˬଋΞͽщ྅Ϥௐ ᄃ˘࡭ّĄ ۞඀ёγ៍Ăಶυืࢋҋࢎ̮ІĄҋࢎ̮Іܳซᑕϡ඀ёม඀ёቅ۞ГӀϡ ೀѐ۞඀ёౌ̙ᅮࢋщ྅າ̮ІĄҭѣॡ࣏ࠎ˞ྋՙপঅ۞યᗟٕᅮࢋপҾ ਕĂ̏གྷਕૉ႕֖̂ొ̶ᑕϡ඀ёฟ൴۞ᅮՐĄଋ˵ధΞਕֹϡ Delphi ᆷр Delphi ٙ೩ֻ۞̮І̏གྷ࿰Ащ྅д̮Іሹ˯֭ͷਕૉ೩ֻЧёЧᇹ۞Α ҋࢎ̮І Help|Delphi Tools ֽણ҂ĶData Dictionaryķ͹ᗟĄ פᏴ ซ˘Վྤੈ… ጡ̶ֳ̚఺ֱᗝγ۞ྤੈĄڇᅈბ۞ҨٺDictionary Ξͽхд ϲᗝγ۞᛼Ҝᛳֽّೡࢗྤफ़۞̰टᄃពன۞͞ёĄDataޙાĂѩ఍ଋΞͽ ᑕϡ඀ё̝γ۞ҋࢎᐼхડٺ༊ଋֹϡ BDE ॡĂData Dictionary ೩ֻ፾ϲ Data Dictionary Help|User’s Guide ContentsĄ! פᏴޢDesktopĄ൒ ඀ёะ|Borland Delphi 7|DatabaseפϤ Windows ۞ฟؕᏴಏĂᏴ ซ˘Վྤੈ… ֹϡ Delphi నࢍ඀ё 3-15 ! ৶͔̚۞Ķtype librariesķ͹ᗟĄ!ځኛણ҂ᄲ ซ˘Վྤੈ… ϲ֭ჯ᜕ݭၗऱĄޙֽ(editor ఺ֱีϫ۞ྤੈĄDelphi ೩ֻ˞ݭၗऱበᏭጡ(Type Libraryٺֹϡ۞ᙯ ϲΞֻ׎΁ᑕϡ඀ёٕฟ൴̍׍ֽޙёऱ̚ĂଋΞͽב ᑕϡ඀ёٕ ActiveX ଋ۞ COMזІᙷҾ۞ྤੈĄᖣϤӣ߁ݭၗऱۏጡٙ೩ֻ۞ڇͽ̈́Ҩีטଠ ёͽ̈́Ϥ ActiveXבफ़ݭၗĂ̬ࢬĂјࣶྤٺݭၗऱߏᑫ९Ă׎̚Βӣ˞ᙯ ݭၗऱ ৶͔̚۞ĶCOMķ׶ĶActiveXķ͹ᗟĄ!ځኛણ҂ᄲ ซ˘Վྤੈ… ຋హ Word ۞၁វĄ ౅࿅ᑕϡ඀ё۞̬ࢬயϠ˘࣎ޢॾ˯൒ܑזཉ˘࣎຋హ Word ̮ІٸଋΞͽ ጡ̮ІĄଋΞͽညֹϡ VCL ̮Іਠ۞ֹϡ఺ֱ̮ІĄᓝּֽᄲĂڇCOM Ҩ జщ྅д̮Іሹ̚۞ ActiveX ࢱѨĄ̮Іሹ̚۞ Server ࢱѨ೩ֻЧёЧᇹ ቑώีטΨჟីĄActiveX ଠײFile|New|Other ତ඾ᕇ޷ ActiveX ࢱѨֽ פĄᏴีטϲ ActiveX ଠޙDelphi ͚೯຋హ۞ COM ᇾ໤֭೩ֻჟីֽ COM and ActiveX ৶͔̚۞ĶDLLsķ͹ᗟĄ!ځኛણ҂ᄲ ซ˘Վྤੈ… Ąڕϲ˘࣎ DLL ۞ᇹޙᗕᑝ DLL Wizard ဦϯֽޢFile|New|Other ൒ פ඀ёቅٕྤ໚఼૱జ෹࿅˘࣎ͽ˯۞ᑕϡ඀ёֹϡĄᏴ۞ 3-16 ˢܝᄃ඀ёనࢍ͘Ί ҋࢎᒖဩ 4-1 ಶΞͽວજ͹ෛ඄̚۞Αਕܑᄃ̍׍ЕĄ ଋΪࢋԹҝ׎̚˘࣎̍׍Е۞ᗕቢ୧Ğνᙝ۞֤׌୧ቢğ ׎΁۞г͞Ăͽѩࢦ௡ιࣇ۞ҜཉĄ זٳд͹ෛ඄̚ĂᖣϤಏᑝΑਕܑă̍׍Еᄃ̮Іሹνᙝ۞ᗕቢ୧Ă૟ιࣇ щଵΑਕܑᄃ̍׍Е ᐼхଋາ۞ॸࢬγ៍Ą ೀ࣎̍׍ෛ඄ă׀଀౵ָ̍үड़தĂΒ߁ࢦາщଵΑਕܑᄃ̍׍ЕăЪפͽ IDE ೩ֻధк̍׍ᅃӄ૞९۞ฟ൴ĂЯѩଋٕధຐࢋҋ̎ࢦາщଵ̍үડા щଵଋ۞̍үડા Ąڱώౢ̬௜˘ֱనؠ Delphi IDE ฟ൴̍׍۞͞ ҋࢎᒖဩ ᄃ඀ёనࢍ͘Ίܝ4-2 ˢ ˯ĄּтĂௐ˘Ѩฟୁ Delphi ॡĂ࿰నଵЕ͞ё˭Ă඀ёቅᕱᜓጡĞCode ତ૟ιઃҞдЇ˘ෛ඄ۡޢଂ View ΑਕܑĂଋΞͽΨ΍Їң̍׍ෛ඄൒ ఺ֱ̍׍ෛ඄Ą!פϺਕԣిгх Ω˘࣎ෛ඄ֹ̰଀ιࣇјࠎ˘វĂਕૉ˘๴ொજ⎯тѩߊ̙ҫϡ͉к۩มז ΐ˘࣎ෛ඄ܢგநĄઃҞĞDockingğ⎯޽۞ߏܮઃҞд׎ι۞ෛ඄˯ͽ͞ ଵЕĄధкෛ඄ΞͽڱଋΞͽχฟ̈́ᙯౕ࣎Ҿ̍׍ෛ඄Ă֭૟ιࣇֶଋ۞ຐ ઃҞё̍׍ෛ඄ д online Help ৶͔̚ຩವ Ķtoolbars, customizingķĄ ซ˘ՎྤੈČ ன೩ϯĄ ̍׍Еඈဦϯਕҋજព Ᏼ Show tooltips ֹ̮Ї́ д Options ࢱѨĂቁؠ̺ Їң˘࣎̍׍Е˯Ą! זѢٳ΄׎̚۞׻פᏴ ଂ Command ࢱѨĂΞͽ ! Їң˘࣎ଋຐᕚ˯۞̍׍Е˯Ą!זѢٳ૟ιޢ൒ ϯĄᖣϤᕇᏴ Commands ࢱ ѨĂᏴ ፄ ˘ ࣎ Category ГᏴፄ˘࣎ CommandĂ ଋΞͽᏴፄ View|Toolbars|Customize ֽᆧΐٕӁੵ̍׍Е˯۞̍׍̈́ဦ ჌ଵЕ͞ёĄ ͹ෛ඄۞Ω˘ ιࣇொੵĄ͍׎༊ଋጾѣᗕᏈ၌͚೯ॡĂѩΑਕՀࠎѣϡĄ дॸࢬ˯۞׎ιг͞ࠤҌߏ૟ٸฟĂ૟ιࣇٵଋ˵Ξͽ૟௡ј͹ෛ඄۞̮І ҋࢎᒖဩ 4-3 ଋ˵Ξͽ૟̍׍ЕͽкࢱѨෛ඄͞ёઃҞĄ Ҟ˯ΝĄ ဂĂෛ඄ಶົઃ ฟ໣ٸ۞֎རॡ ಛ॰ቢ၆໤ෛ඄ Ѣෛ඄۞γٳд Ą׀ฟ໣ဂ׌࣎ෛ඄ӈົЪٸ৏ԛ֭෭˯Ω˘࣎ෛ඄۞֎རĂѩॡ ৏ԛγ॰ᒺ̈ј˘࣎۞זଋ࠻זѢෛ඄ۡٳ׎ι۞ෛ඄̚Ăזࢋԯෛ඄ઃҞ ඄̰Ą ઃҞд׎ιෛ ٕԯෛ඄ۡତ ෛ඄׀͞ёЪ 4-5ࢱͽࢱѨ ଋ˵Ξͽт ઃҞд඀ёቅበᏭጡ˯۞Ą ဦ̚۞ Project Manager ׶ Code Explorer ߏ ૟૞९გநࣶĞProject Managerğ˵ٛซΝĂឰˬ࣎̍׍ෛ඄ඕЪд˘੓Ą ExplorerğົઃҞд඀ёቅበᏭጡĞCode Editorğ۞ν͞ĄࡶଋᅮࢋĂΞͽ ᄃ඀ёనࢍ͘Ίܝ4-4 ˢ ᏾ॸࢬ నؠੵ ݈ॸࢬ ᐼхϫ ЩჍЕд఺׊ ̏ᐼх۞ॸࢬ ଋҋࢎॸࢬĄܮ۞ॸࢬ੨ཉЕܑĂᔘѣ׌࣎ဦϯͽ͞ ଋΞͽҋࢎ̈́ᐼхଋ۞ॸࢬ੨ཉĄIDE ̚ѣ˘࣎ Desktop ̍׍ЕĂΒӣϫ݈ ᐼхॸࢬ੨ཉ д online Help ৶͔̚ຩವ ĶdockingķĄ ซ˘ՎྤੈČ ۞ᏴีᙯౕĄ Tools | Environment Options ۞ Preferences ࢱ ѨĂ૟ĶAuto drag dockingķ ࢋᙯଫҋજઃҞĂΞͽдொજෛ඄۞ॡ࣏Тॡ޷˭ Ctrl ᔣĂٕߏᕇᏴ!ڍт ࡶࢋ૟ෛ඄፾ϲ΍ֽĂኛᗕᑝι۞ᗕቢ୧ٕࢱѨᇾចĄ ໣ဂĄ ฟٸ໤ෛ඄۞֎ར̝݈ Ѣ۞॰ቢ၆ٳࢱࢬĂд ࢋឰઃҞ۞ෛ඄׍ѣк ҋࢎᒖဩ 4-5 PropertiesĄ פy д̮Іሹ˯ಏᑝ໣ဂΠᔣĂᏴ Palette ࢱѨĄ זTools | Environment OptionsĂ̷ೱ פy Ᏼ Component | Configure PaletteĄ פy Ᏼ Ψ΍ѩ၆ྖ஼Ĉڱ̮ІĂኛֹϡ Palette Properties ၆ྖ஼ĄଋΞͽֹϡ˭Е͞ ࢋΐˢăӁੵăࢦາщଵٕՀЩ̮ІሹࢱѨĂٕߏᔳᖟăࢦາщଵࢱѨ˯۞ ࢦາщଵ̮Іሹ y щ྅າ۞̮ІĄ Іሹ˯Ą̮זԯιࣇΐ֭ۍϲ̮Іᇹޙ y y ၆ࢱѨࢦາщଵăՀЩٕາᆧăொੵĄ y ᔳᖟٕࢦາщଵ̮ІĄ ˯ĄଋΞͽአፋ̮І΍னд̮Іሹ˯۞ҜཉึԔĂΒ߁ д̙Т۞ࢱѨٸІĂιࣇֶ໰Αਕۏధкѣϡ۞˞ٸ˯Ă̮Іሹ˭ڶې࿰న ҋࢎ̮Іሹ д online Help ৶͔̚ຩವ Ķdesktop layoutķĄ ซ˘ՎྤੈČ ཉ۞ЩჍГ޷˭ OKĄ Ꮾˢଋຐᐼх̝ॸࢬ੨ Ξᐼхϫ݈۞ॸࢬĄܮ࣎ЩჍפีГࠎଋ۞າγ៍ ޷˭ Desktop ̍׍Е۞ Save ตٕᏴፄ View | Desktops | Save Desktop Ᏼ ޢА૟ॸࢬщଵјଋԓ୕۞ᇹ̄Ăּтពϯ͞ёă̂̈̈́ෛ඄ҜཉඈඈĄ൒ ᄃ඀ёనࢍ͘Ίܝ4-6 ˢ ॾ˯ߏ˘ᇹ۞Ą! ܑזιࣇ۞ְІ఍ந඀ԔĂಶрညߏͽЧҾ۞જү૟఺ֱ̮Іΐޙ࣒Լٕࢦ ĂଋΞͽࢦາщଵ̮І۞ЧҋҜཉĂࢦనιࣇ۞পّĂޢ˯ॾܑזٸజۍᇹ ဦϯĄ۞ۍι۞ࢱѨ̈́΃ܑѩᇹٸЩĂᏴፄᕚפۍྖ஼ົฟୁĂଋυืࠎѩᇹ Component Template Information ၆ ޢ | Create Component TemplateĄ̝ Component פᏴޢᑭෛጡనؠιࣇ۞পّĂϡ໣ဂ૟ιࣇБొ॰Ᏼ੓ֽĄ൒ ІۏĂΪࢋᖎಏг૟ܑॾ˯˘ٕ࣎к࣎۞̮ІଵЕрĂ౅࿅ۍϲ̮Іᇹޙࢋ ϡĄ!ֹޢд̮Іሹ˯ֻ׎ιܑॾ͟ٸۍ˘̮࣎Іᇹ ĂГ૟ιࣇᐼхјޢёב̮࣎ІĂనؠр࿰నপّĂ֭ࠎιࣇᇤᆷְІ఍ந ឰଋΞͽщଵрᇴۍߏΞͽͽ˘࣎જүಶΐˢܑॾ۞˘௡̮ІĄᇹۍІᇹ̮ ۍϲ̮Іᇹޙ ซ˘ՎྤੈĄז޷˭ Palette Properties ၆ྖ஼˯۞ Help ޷ตӈΞ଀ ซ˘ՎྤੈČ ࢱѨĄ ̮Іሹͽ̈́າᆧ ଋΞͽଂາщଵ ҋࢎᒖဩ 4-7 ӣѣ۞̮ІĄ ྍइІٙזᕇᏴ Components ಶਕ࠻ इІಶົ΍னд఺୻ಏ̚Ą ༊ଋщ྅׎ιᇄથ۞̮ІॡĂ΁ࣇ۞ ఺ֱߏ࿰Ащ྅д Delphi ̚۞इІĄ Վូщ྅इІٕۡତᏴፄ Component|Install PackagesĄ ځᇄથ۞̮Іѝ̏በᛌࠎइІԛёĂ֤ᆃଋΞͽ޷໰ᇄથ۞ᄲ˧םˬௐڍт IDEĄDelphi ̮ІइІઘᑫЩࠎ.bplĄ זІ݋ϡֽщ྅̮І ٕ IDE Тॡֹϡ۞඀ёቅĄᑕϡ඀ёેҖॡֹϡેҖॡഇइІĄనࢍॡഇइ ёऱĞDLLğĂιΞజ Delphi ฟ൴۞ᑕϡ඀ёבइІߏ˘჌পঅ۞જၗాඕ Ğpackageğ̰Ă̖ਕщ྅Ҍ̮Іሹ˯Ą ଀̮ІĂ̮ІౌυืАበᛌˢइІפ̙ኢߏଋҋҖᇤᆷ̮Іٕଂ׎ιᇄથ щ྅̮ІइІ д online Help ৶͔̚ຩವ Ķtemplates, componentķĄ ซ˘ՎྤੈČ ! ᄃ඀ёనࢍ͘Ίܝ4-8 ˢ ޷˭ Import ActiveX Control ၆ྖ஼۞ Help ޷ᔣĄ ซ˘ՎྤੈČ ົࠎιᗝγкΒ྅˘࣎ಏ̮Ą ॡĂDelphiีטIDE ˯Ą༊ଋщ྅ ActiveX ଠ זІ૟ι྅̮פЕܑᏴีטଠ Control ၆ྖ஼Ąд఺׊ଋΞͽොΊາ۞ ActiveX ̮ІٕϤ̏ොΊ ActiveX Component | Import ActiveX Control ֽฟୁ Import ActiveX פࣇĄᏴ Іሹ˯Ă֭ͷдଋ۞ Delphi ඀ёֹ̰ϡι̮זଋΞͽ૟ ActiveX ̮Іщ྅ ีטщ྅ ActiveX ଠ д online Help ৶͔̚ຩವĶframesķ̈́ĶTFrameķĄ ซ˘ՎྤੈČ ᆧ˘࣎ಏ̮Ą Editor ົࠎҋજ఺࣎ frame າ frame ˯ࢬĄCode זෛ̮Іΐ ଋΞͽᐌຍ૟Ξෛٕ̙Ξ ࢋฟୁ˘࣎າ۞ frameĂᏴፄ File|New|FrameĄ frameĄ ۞ޢᇆᜩ҃តјՀજזצົౌ ܑॾٕ frame ѣֹϡ఺࣎Հજ݈۞ frame ԼតĞΒӣ׎ι frameğĄ˵ಶߏᄲĂѣ˘࣎ frame ۞నࢍజՀજĂЇң˘࣎ frame జயϠ֭ᐼх੓ֽĂι̪൒ߏ࣎ಏ̮҃ͷົᚶٚ˯ࢬٙѣ̮І۞Їң І྆ࢬĄ˘ҭۏֹϡĄframe ΞͽΒӣдܑॾă׎΁ frame ٕߏ׎ι۞टጡ ࢦኑܮҭͧ੓ܑॾ˫Հညߏҋࢎ۞̮ІĄframe Ξͽᐼхд̮Іሹ˯Ăͽ͞ frameĞTFrameğಶည˘჌ܑॾĞformğâ჌Ξͽࢦኑϡֽ྅๱̮І۞टጡĂ ֹϡ frame д online Help ৶͔̚ຩವĶinstalling componentsķ̈́ĶpackagesķĄ! ซ˘ՎྤੈČ ҋࢎᒖဩ 4-9 ჍĂ֭૟ New Project χ̺Ă޷˭ OKĄ ЩۍObject ˭ࢬĄᏴፄଋԓ୕۞࿰నᇹ ٺˢ Projects ࢱѨ˭ࢬĂ֤ᆃιົЕ ଋഅགྷ૟૞९ΐڍRepository ၆ྖ஼̚Ăд̙Т Page ྆Ᏼፄ࿰న૞९Ăт јࠎ࿰న૞९ĂᏴፄ Tools |RepositoryĄд Objectۍࡶࢋឰଋ۞૞९ᇹ Іᚗऱķ˘༼ğĄۏౢ۞Ķ Ğኛણ҂ௐ 2ۍІᚗऱ྆߄˘࣎ Delphi ࣧώಶѣ۞૞९ᇹۏ˘༼ğĂٕߏଂ ІᚗऱķۏזۍĞ֍4-10ࢱ۞ĶᆧΐᇹۍऱĞObject Repositoryğ྆۞˘࣎ᇹ Іᚗۏॾ۞૞९ĄଋΞͽᏴፄ Project|Add to RepositoryĂ૟ଋ۞૞९хј ϲ˘࣎׍ѣ۩Ϩܑޙົ Ă֤ Delphiۍଋ֭Ϗ޽ؠߙপঅ૞९༊ଋ࿰న૞९ᇹ ڍϲ˘࣎ᇾ໤۞າ૞९Ąтޙົ File | New Application ॡĂIDE פ༊ଋᏴ ޽ؠ࿰న૞९ܑ̈́ॾ д online Help ৶͔̚ຩವĶProject OptionsķĄ ซ˘ՎྤੈČ ٕՀЩ Defproj.dof ఺࣎ᑫ९Ą ϫᐂ˭۞ Defproj.dof ᑫ९̚Ąࡶ୬аೇ Delphi ࣧώ۞૞९࿰నࣃĂኛӁੵ Dephi7\Bin זϲॡֹϡ۞࿰నࣃĄ૞९࿰నࣃనؠົᆷޙ९నؠјࠎາ૞९ ĂΞֹϫ݈۞૞ޢ૟ Project Options ၆ྖ஼ν˭֎۞ Default ߤ८͞๴χ̺ నؠ૞९࿰నࣃ ۞૞९నؠࣃĄ ̚۞Їң࣒ԼౌΪ၆ϫ݈૞९ѣड़Ąҭଋ̪൒Ξͽឰϫ݈૞९నؠјࠎ࿰న Project|OptionsĄд Project Options ၆ྖ஼ פጡඈᏴีѣপঅనؠĂኛᏴ ଋ۞૞९Ăᅮࢋგந૞९ϫᐂĂٕߏ၆ܑॾăᑕϡ඀ёăበᛌጡ̈́ాඕڍт నؠ૞९ᛳّ ᄃ඀ёనࢍ͘Ίܝ4-10 ˢ Project |Add To RepositoryĂ๱Ԇ Add to Repository ၆ྖ஼۞̰टĄ ĄࢵА૟૞९хᑫĂᕇᏴۍІᚗऱ۞ᇹۏтң૟ଋ۞૞९តјځᓝּᄲ ᑕϡ඀ё۞ॡ࣏Ăഴ͌ฟ൴ॡมᄃᆧซݡኳĄ ౄ˘րЕѣ඾ᙷҬΑਕᄃᙷҬֹϡ۰̬ࢬ۞ޙІࢦϡΞͽдۏВֳᄃࢦϡĄ Ăឰ׎΁۞ˠΞͽ౅࿅შྮۍІᚗऱ྆۞ᇹۏІхјۏଋΞͽ૟ଋٙጾѣ۞ Іᚗऱۏזۍᆧΐᇹ Ķprojects, specifying defaultķ̈́Ķforms, specifying defaultķĄ! д online Help ৶͔̚ຩವĶtemplates, adding to Object Repositoryķă ซ˘ՎྤੈČ ᇶॡᖬᄏ࿰న૞९ܑٕॾĄ ЇңีϫפଋΞͽଂ New Items ၆ྖ஼ĞϤ File|New|Other ٙΨ΍ğ̚Ᏼ ϲ۩ϨܑॾĄޙົ ޽ؠЇң࿰నܑॾĂ݋ Delphi ϲ۞າܑॾĄࡶଋϏޙ҃࿰నາܑॾߏ༊ଋᏴፄ File | New Form ᏴีॡĂ ϲ۞ܑॾĄޙ૲ܢϲ˘࣎າ૞९ॡĂޙ޽ؠ࿰న૞९Ą࿰న͹ࢋܑॾߏ༊ଋ̚ ۍІᚗऱ྆۞˘ુ૞९ᇹۏଋ˵Ξͽ޽ؠ࿰న۞͹ࢋܑॾ̈́າܑॾĂтТଂ ົॲፂ࿰న૞९ҋજฟୁ˘࣎າ۞૞९Ą File|New Application ॡĂDelphi ಶ פĂՏ༊ଋᏴޢ˘όଋ޽ؠ࿰న૞९ Main FormĄ New Form ٕ פĂᏴۍ࿰నᇹ ࠎۍࢋనؠ Objects˭۞ܑॾᇹ New ProjectĄ פĂᏴۍ࿰నᇹ ࠎۍࢋనؠ Objects˭۞૞९ᇹ ѣĄ ӣ૞९ٕߏܑॾٕߏ׌۰ౌ Іᚗऱ۞Տ˘࣎page྆ࢬΒۏ ҋࢎᒖဩ 4-11 ᕇᏴд Environment Options ၆ྖ஼ Designer ࢱѨ˯۞ Help ޷ตĄ! ซ˘Վྤੈ… Ξෛ̮ІពϯЩჍٕᇾᗟĄܧ۞ٸଋܑॾ˯ٙཉ ঐĶ၆ᆅॾቢķΑਕĂٕߏଋ˵ΞͽᏴፄߏӎࢋឰפؠĄּтଋΞͽฟୁٕ Tool|Environment Options ၆ྖ஼۞ Designer ࢱѨ˯ѣܑಏనࢍ̍׍۞న ҋࢎܑಏనࢍ̍׍ ৶͔̚ຩವĶEnvironment Options dialog boxķ͹ᗟĄ! ځኛᕇᏴд Environment Options ၆ྖ஼̚ྍࢱѨ۞ Help ޷ตĂٕ۰дᄲ ซ˘Վྤੈ… Tools | Environment OptionsĄ פѣ૞९ౌົѣᇆᜩĄࢋనؠᒖဩઐрĂᏴ ඀ёቅበᏭጡඈඈĄᒖဩనؠ۞ᇆᜩ่̙ͤϫ݈ฟୁ۞૞९҃̏Ă҃ߏ၆ٙ Іᑭෛጡ̈́ۏଋΞͽՀԼధкፋЪᒖဩ۞γ៍̈́ҖࠎĂּтܑಏనࢍ̍׍ă నؠ၆̍׍۞ઐр д online Help ৶͔̚ຩವĶtemplates, adding to Object RepositoryķĄ ซ˘ՎྤੈČ າ૞९۞࿰నᏴีĂኛણ҂4-9ࢱ۞Ķ޽ؠ࿰న૞९ܑ̈́ॾķ˘༼Ą јࠎՏѨ Delphi ฟୁۍࢋឰଋ۞າᇹڍĄтۍଋ۞າ૞९ᇹזЇ˘ࢱѨğ࠻ ۞ٸ˭˘Ѩଋฟୁ New Items ၆ྖ஼ĂಶΞͽд Projects ࢱѨĞٕ׎ιଋх ۞ Project ࢱѨĄ Іᚗऱۏಶົ΍னдۍ ፄ Project ૟ֽଋ۞າᇹ AuthorĂд Page ЕܑᏴ Ꮾˢ TitleăDescriptionă ᄃ඀ёనࢍ͘Ίܝ4-12 ˢ ֭՟ѣঐεĄ ঐ Published ϫᐂĂ֤ Published ϫᐂ༼ᕇಶົঐεĂҭߏ྆ࢬ۞̮৵פт జᏴፄĂ֤࣎ϫᐂ˭۞Տ̮࣎৵ಶົЧҋ΍னдဦ˯۞͹຅Ąᛊ̙ڍ௡Ąт ߙ࣎ϫᐂజᏴፄĂ֤࣎ϫᐂ྆۞̮৵ಶົͽ˘࣎༼ᕇֽܑϯ֤࣎ཏڍؠĄт д Explorer categories ˭۞ߤ८͞๴үనޢ΍۞Ᏼಏ˯Ᏼፄ PropertiesĂ൒ ଋΞͽՀԼ඀ёቅᕱᜓጡ۞ཏ௡నؠĂ౅࿅д඀ёቅᕱᜓጡ˯޷ΠᔣĂдྯ Automatically show Explorer ᏴีĄ ঐפࢋҋજฟୁ඀ёቅᕱᜓጡĂ̙ڍঐ఺ีপّĄтפࢱѨనؠٕ ҋજฟୁĄଋΞͽд Tools|Environment Options ၆ྖ஼۞ Code Explorer дୁજ Delphi ॡĂ඀ёቅᕱᜓጡ(ௐ 2 ౢ۞Ķᕱᜓ඀ёቅķ˘༼̬̏௜࿅) ົ నؠ඀ёቅᕱᜓጡᏴี ̈́ Code Insight ࢱѨ˯۞ Help ޷ตĄ ᕇᏴд Edit Options ၆ྖ͞๴˯ GeneralăDisplayăKey MappingăColor ซ˘Վྤੈ… Code Insight ̍׍۞ᏴีĄኛણዦௐ 2 ౢ۞ĶCode Insightķ˘༼Ą በᏭጡ̰۞ٺଋᔘΞͽд Editor Options ၆ྖ஼۞ Code Insight ࢱѨనؠϡ ᇹёඈඈĄۍҒ૾̈́ᒺڱăᗞҒăήޘфݭăᙝࠧᆵ በᏭጡ۞నؠĄּтĂଋΞͽᏴፄᔣሹ၆ᑕăٺOptions ၆ྖ஼˯ѣрೀࢱᙯ ຐࢋአፋనؠ۞̂ໄಶߏ඀ёቅበᏭጡ˞Ąд Tools | Editorג˘࣎ଋົϲ ҋࢎ඀ёቅበᏭጡ ҋࢎᒖဩ 4-13 ৶͔ຩವĶCode Explorer, Environment optionsķĄځኛдቢ˯ᄲ ซ˘Վྤੈ… ̙ТݭҾ۞ϫᐂĄ ˭۞ϫᐂֽពϯЧ჌ ̺Ᏼ Explorer categories! ӘึԔଵЕĄ ކЕᔘߏֶ໰ ໰фϓึԔଵ ѣ۞̮৵ߏֶ ଋΞͽనؠٙ 4-14 ˢܝᄃ඀ёనࢍ͘Ί నࢍ Delphi ᑕϡ඀ё ׶ԫμĄه඀ёٙᅮࢋ۞៍ ώֽฟ൴ᑕϡۍдĶనࢍ Delphi ᑕϡ඀ёķ̚۞ౢ༼̬௜ֹϡ Delphi Їң నࢍ Delphi ᑕϡ඀ё ᖎ̬ 1-1 ૱ܧІឰనࢍֹϡ۰̬ࢬត଀ۏ༼ĄּтĂώ͘Ί૟ୃࢗтңྻϡ˘ਠ ඀ёĄ఺ొЊೡࢗΞͽᑕϡдЇң Delphi ᑕϡ඀ё۞඀ёనࢍԫఙ௟ ϲ˘ਠ۞ Delphi ᑕϡޙy ௐ˘ొЊĈĶనࢍ Delphi ᑕϡ඀ёķĂೡࢗтң ఺͘ΊΒӣ̣࣎ొЊĈ ͘Ί̰ट Ąځ͘Ίٕߏቢ˯ᅃӄᄲ ԫμĄࢋ၆ Delphi ඀ёనࢍ׶ፋЪฟ൴ᒖဩѣૄώ۞ᒢྋĂኛણ҂ԣిฟؕ ఺ώ඀ёฟ൴ˠࣶ͘Ί઄నଋ̏ሢଉ Delphi ֭ᒢྋ Delphi ඀ёనࢍ۞ૄώ ώ۞ Delphi ౌ׍౯˯ࢗΑਕĄۍჟីĂ൒̙֭҃ߏٙѣ ధк͚೯ Web ฟ൴Ăซล XML ԫఙ׶ྤफ़ऱฟ൴ซลΑਕٙᅮࢋ۞̮Іٕ ϲ௑Ъຽࠧᇾ໤ఢॾ۞ᑕϡ඀ёĈт SOAPăTCP/IPăCOM+ă׶ ActiveXĄ ޙጡᑕϡ඀ёιਕૉឰଋڇϡ඀ёăᇤᆷҋࢎ۞̮ІăயϠშᅫშྮ Web Ҩ ϲ͹ଂߛၹྤफ़ऱᑕޙ඀ёฟ൴ˠࣶ͘Ίೡࢗ̚੼৺۞඀ёฟ൴͹ᗟĂညߏ ᖎ̬ ᄃ඀ёనࢍ͘Ίܝ1-2 ˢ ώౌ׍౯ĄۍDelphi ۞Ч࣎ ܧ͚೯֭ І۞̮טᄃயϠ ActiveX ଠีטёऱĄ၆ COM ଠב ඀ё۞ COM-based ਠ̈́ Web ࠎૄᖂᑕϡ˘ٺΞϡีטCOM+۞̮ІĂͽ̈́ࠎ˞ឰ COM ଠ І࠹̢үϡĄDelphi Βӣ͚೯ ActiveXĂۏ۞ ͽ COM ࠎૄᖂ۞ API Ξͽдည Windows Shell ؼҩ̬ࢬ׶кಫវᑕϡ඀ё۞ր௚˭Ă׶׎΁ ϲᑕϡ඀ёĂޙy ௐαొЊĈĶฟ൴ͽ COM ࠎૄᖂ۞ᑕϡ඀ёķĂೡࢗтң ώౌ׍౯ĄۍDelphi ٙѣ۞ ܧΑਕ֭ ྵҲล۞͚೯Ă఺༼˵ೡࢗтңֹϡ socket ̮ІĄ఺̮Іٙ၁ү۞ధк შᅫშྮᑕϡ඀ёٺચ۞ߛၹĄᙯڇ BizSnap Ξֹϡ SOAP-based Web WebSnap ឰଋд GUI ᒖဩ˭నࢍშࢱĂ͚֭೯ֹϡ XML ͛Іͽ̈́ ጡᑕϡ඀ёĂڇϲྭπέ۞Ҩޙ׎̚Βӣ˞ Web Broker ߛၹĂΞͽឰଋ ბᑕϡ඀ёĂڇ۞ᑕϡ඀ёĄDelphi Βӣ˞˘ాҚ۞̍׍ֽᇤᆷ Web Ҩ y ௐˬొЊĈĶᇤᆷშᅫშྮᑕϡ඀ёķĂೡࢗтңயϠ̶೸дშᅫშྮ˯ ώౌ׍౯ĄۍDelphi ٙѣ ܧᅮ̝Αਕ֭ dbExpressĂInterbaseExpress ׶ ADOĄࢋ၁үซลྤफ़ऱᑕϡ඀ёٙ Ăѣט፟פጡྤफ़ऱĄଋΞͽᏴፄֹϡк჌۞ྤफ़хڇSQL Ҩ ྤफ़ऱт Paradox ׶ dBase ͽ̈́ည InterBaseăOracle ׶ Sybase ۞შྮ к჌ྤफ़ऱĂ׎̚Βӣ˞ώгפϲྤफ़ऱᑕϡ඀ёĄDelphi ឰଋΞͽх ޙy ௐ˟ొЊĈĶฟ൴ྤफ़ऱᑕϡ඀ёķĂೡࢗтңֹϡྤफ़ऱ̍׍׶̮І ёऱĄבDLLă׶׎΁ ώॡĂтңՙؠົֹϡֱࣹహវइІăۍͽ̈́дயϠᑕϡ඀ё۞யݡ৺ ੈΒӣѣड़۞በᛌጡᏴีăInstallShield Express ۞ֹϡă଱ᝋ۞યᗟă ൴۞˘ౢྎ௟ೡࢗтң૟ᑕϡ඀ё̶൴ගֹϡ۰ĄּтĂι۞ྤ̶ٺᙯ ۞ᑕϡ඀ёĄ тңฟ൴Ξͽд Windows ٕ Linux πέ˯በᛌᄃેҖځѣ˘࣎ౢ༼ᄲ automationă׶ᇤᆷ઼ᅫ̼۞ᑕϡ඀ёĄ ѣೀ࣎ౢ༼ೡࢗဦԛ۞఍நă᏾ᄱ׶ּγ఍நăֹϡ DLLă OLE Ăညߏ఍நфҚă఍ந͛фăనࢍ Windows ఼ϡ၆ྖ͞๴ඈඈĄ˵ٽट ᖎ̬ 1-3 Ąځώᄃྎ௟۞યᗟᄲۍವՐ͚೯ॡĂኛА೩ֻଋ۞үຽᒖဩăֹٙϡ̝யݡ Delphi ۞ણ҂३ϫĄ ٺੈă͕଀׶ԫఙ۞г͞Ąშ৭Тॡ˵೩ֻ˞ధкᙯ дშ৭˯ĂଋᔘΞͽણΐధкາჷ੅ኢཏ௡Ă఺ߏ Delphi ฟ൴ˠࣶϹೱྤ ચĄڇኛણ҂შ৭ http://www.borland.com/bww ͽವՐ༊г۞͚೯ Ă͗މ̝˿઼࡚ώܧٺhttp://www.borland.com/devsupport/delphiĄ၆ Delphi ٙ೩ֻ۞͚೯Ăኛણ࠻შ৭ Borland ˵೩ֻкᇹ͚೯Ᏼีͽ႕֖̙Тฟ൴۰ཏ௡۞ᅮࢋĄࢋᒔۢѣᙯ ચڇฟ൴۰͚೯ Keycaps ఺჌фԛ΃ܑᔣሹ˯۞ߙ࣎ᔣĄּтĂĶ޷ESCᔣඕՁΑਕᏴಏķĄ ˵ϡֽૻአߙֱфĂညߏາ۞ЩෟĄ ୆វф д͘Ί̚۞୆វф΃ܑDelphi۞ᙊҾфĂညߏតᇴٕݭၗЩჍĄ୆វф ˵ϡֽૻአߙֱфீĂּтາЩෟĄ ௖វф дώٕ͛඀ё̚۞௖វф΃ܑDelphiܲ঻фٕበᛌጡᏴีĄТॡ௖វф ᏮˢĄ ϡ̚߁ֽཱི߁ҝᏴፄّีϫĄ఺ᙷ͛фಶ̙ϡుф۞ֹ̚ڱ[ ] д͛фٕᄬ ҘĄڌυืᏮˢ۞Їң ಏቢវ ಏቢវ͛фܑϯдᏈ၌ٕдDelphi඀ёቅٙ̚΍ன۞͛фĄι˵΃ܑଋ фݭٕ௑ཱི ຍཌྷ ܑ1.1 фݭ׶௑ཱི ఺ώ͘Ίֹϡܑ 1.1 ೡࢗ۞фݭ׶௑ֽཱིពϯপঅ͛фĄ ͘Ίၚּ შྮᑕϡ͘Ί̚Ą Ој˘ΊĄௐ˟ొЊҌௐαొЊ݋ЕОдྤफ़ऱᄃ׀Ъܝௐ˘ొЊᄃԣిˢ 1-4 ˢܝᄃ඀ёనࢍ͘Ί ֹϡ Delphi ฟ൴ᑕϡ඀ё 2-1 ͽ̈́ᇤᆷҋࢎ̮І۞ԫఙ௟༼Ąีטϲ ActiveX ̈́ COM ଠ ޙొ̶೩ֻЧёฟ൴˘ਠϡ౉Ăྤफ़ऱĂშᅫშྮĂIntranet ᑕϡ඀ёĂ׶ ώౢᖎൺг̬௜ Delphi ฟ൴ᒖဩͽ̈́ιᄃฟ൴ฉഇ۞ᙯᓑّĄώ͘Ί۞׎ι І(Windows or Linux)ۏ྅੓ֽ۞ދёऱב Qt ёऱΒӣ˞૟בy Borland CLX(Component Library for Cross-Platform)ᙷҾ І(Windows)ۏ྅੓ֽ۞ދ׎΁ѣϡ۞඀ёԫμ ёऱΒӣ˞૟ Windows API ͽ̈́בy VCL(Visual Component Library)ᙷҾ ёऱΒӣĈבІጱШ඀ёనࢍĂ׎Ԇፋ۞ᙷҾۏ ͽ̈́Чё۞ჟីඈඈĄDelphi ͚೯ৌϒ۞ۍRAD)ĂΒ߁ᑕϡ඀ёܑ̈́ॾᇹ Delphi ೩ֻ˘इԣిᑕϡ඀ฟ൴̍׍(Rapid Application Development, ၹѣड़த۞ᑕϡ඀ёĄޙ౵ᖎ̼۞඀ёቅ Delphi ֽฟ൴Їң 32-bit ᑕϡ඀ё̶൴д Windows ٕ Linux ˯Ăֹ֭ϡ ІጱШĂෛᛇ̼۞ԣిᑕϡ඀ёฟ൴ᒖဩĄଋΞͽֹϡۏBorland Delphi ߏ ϡ Delphi ฟ൴ᑕϡ඀ёֹ ᄃ඀ёనࢍ͘Ίܝ2-2 ˢ ඀ё̶ٕ೸ёᑕϡ඀ёĄפኑᗔ۞ྤफ़ऱх ౵זଋΞͽֹϡ Delphi ֽฟ൴Їң 32-bit ᑕϡ඀ё-ଂ˘ਠϡ౉۞̍׍඀ё నࢍᑕϡ඀ё Ąځ˵೩ֻٙѣΑਕܑĂ၆ྖ஼̈́ෛ඄۞ྎႽᄲ ր௚ځѣፋЪᒖဩՀԆፋ۞̬ࢬĄѩγĂቢ˯ᄲٺ͘Ί၆ܝώயݡ۞ԣిˢ ώӮΒӣٙѣ̍׍ĄۍDelphi ٙѣ ܧ֭ πέ̝ᑕϡ඀ёĄྭٺ݄ͽфϓ QĂ݋Ξֹϡ ІЩჍ࠰ۏёऱ̝ٙ̚ѣב ЩჍ࠰݄ͽфϓ TĂт TStatusBarĄ҃д Qt Іۏёऱٙ̚ѣב̶ΞдፋЪᒖဩ̰౅࿅̮ІሹֹֽϡĄ޷໰ၚּĂҾ І̂ొۏёऱٙ೩ֻ۞בёऱĄᙷҾבy ጾѣᅮкΞࢦኑֹϡ̮І̝ᙷҾ y ׻΄Е̍׍ĂΒ߁በᛌጡĂాඕጡ̈́׎ι̍׍ y ׎ιధк̍׍ĂּтፋЪੵ᏾ጡĂԆፋ͚೯ፋЪᒖဩ̰۞ੵ᏾̍׍ y ૞९გநࣶϡֽგந˘ٕк࣎૞९۞ᑫ९ ᆸ۞ទᏭغy ඀ёቅበᏭጡϡֽᇤᆷ ၗېІۏІᑭෛጡϡֽᑭෛ࣒̈́Լۏ y ёऱבІ۞ΞؼҩᙷҾۏy Β߁ధкΞࢦϡ నࢍᑕϡ඀ё۞ֹϡ۰̬ࢬ y ܑಏనࢍ̍׍(Form Designer)ٕჍࠎܑॾ(Form)Ă೩ֻ۩Ϩ۞ෛ඄ϡֽ ٙᅮ̝̍׍ĈܐDelphi Β߁ٙѣనࢍᑕϡ඀ё̝ ฟ൴ॡมĄ ϲࣧݭᄃᒺൺޙࢍĂ൴णĂീྏĂੵ᏾̈́ொϹᑕϡ඀ёٙᅮ۞̍׍ĂΞΐి Ăଋ̏གྷ఍дፋЪᒖဩ(IDE)̝̚˞Ą఺࣎ᒖဩ೩ֻٙѣଋనޢ ୁજ Delphi ፋЪฟ൴ᒖဩ ֹϡ Delphi ฟ൴ᑕϡ඀ё 2-3 ௡̚Ą఺ֹ଀ଋΞͽ౅࿅૞९გநࣶТॡฟୁ˘ٕ࣎к࣎૞९Ą૞९ཏ௡ឰ д૞९ลᆸߛၹ۞౵౤ბĂߏ૞९ཏ௡ĄଋΞͽ૟к࣎૞९ΐˢ˘࣎૞९ཏ ፆүĄ ̂ొ̶۞ᑫ९Ăҭ౵ᖎಏ̈́Ξያ۞͞ёᔘߏ౅࿅ Delphi ۞ෛᛇ̼̍׍ֽซҖ ёពϯĂΒ߁ಏ̮ЩჍĂܑॾͽ̈́૞९̰̝ᑫ९ྮशĄᔵ൒ଋΞͽۡତበᏭ ଋΞͽд૞९გநࣶ̚ᑭෛ૞९۞̰टĄ૞९გநࣶΞ૟૞९ඕၹͽลᆸ͞ ϲ۞Ăѣֱߏበᛌ૞९ॡҋજயϠ۞Ąޙѣֱᑫ९ߏనࢍॡഇ ϲ˞˘࣎૞९Ą˘࣎૞९ߏ௡јᑕϡ඀ёٙᅮᑫ९۞ะЪĄޙϡ඀ёॡĂଋಶ ϲ˘࣎ᑕޙ̚ Delphi ۞ᑕϡ඀ёฟ൴̍ү࠰ͽ૞९ࠎ͕̚Ą༊ଋд Delphi ϲ૞९ޙ ёऱķ˵ົ̬௜Ч჌ᑕϡ඀ё۞͚೯Ąבϲᑕϡ඀ёă̮Іᄃޙௐ 8 ౢĶ ֹϡ͘ΊĄ ᄃ׎΁ځࠎ Linux ᒖဩٙᆷ۞඀ёฟ൴ˠࣶ͘ΊĂٕߏ Kylix ۞ቢ˯ᅃӄᄲ ଋֹϡ Kylix ֽฟ൴ྭπέᑕϡ඀ёĂϺΞણ໰ Kylix ૞ڍέᑕϡ඀ёķĄт έᑕϡ඀ёᄃ Windows ׶ Linux ᒖဩ̝मளĂኛણ໰ௐ 15 ౢĶฟ൴ྭπ πྭٺ૟ਕឰଋ۞ᑕϡ඀ёд Windows ׶ Linux ̝มொങĄ୬ᒢྋՀкᙯ ΃д VCL ̚۞࠹၆ᑕ̮ІĂפϡΒӣд CLX ̚۞̮Іֹֽڍᑕϡ඀ёĄт ଋ˵Ξͽֹϡ DelphiĂ౅࿅ CLX ֽฟ൴д Windows ׶ Linux ˯۞ྭπέ ࢬĄ ᄬ֏ᆷјĄଋΞͽ૟ҋ̎ᆷ۞̮Іΐˢ̮ІሹĂ֭ͷෛᅮՐҋࢎ̮Іሹ۞ࢱ ଋਕૉͽ Delphi ᄬ֏ᇤᆷҋ̎۞̮ІĂ҃ٙ೩ֻ۞̂ొ̶̮І࠰ͽ Delphi ဩ̚Ą ֽ࣒Լ඀ёቅĂ҃ଋ၆඀ёٙઇ۞Їң࣒ԼౌΞӈॡгͅߍдෛᛇ̼ฟ൴ᒖ ඀ёቅበᏭጡ۞ޙд඀ёቅ̚Ă̝ͅϺ൒ĄଋΞͽЇң͛фበᏭጡĂΒ߁̰ ᑕͅົڍёྻү۞ Delphi ඀ёቅĄ༊ଋᏴፄ࣒̈́Լ̮Їܑ́ॾ۞পّॡĂඕ ༊ଋͽෛᛇ̼͞ёనࢍᑕϡ඀ёγ៍ॡĂܑಏనࢍ̍׍ТॡࠎଋயϠ͚೯඀ ᄃ඀ёనࢍ͘Ίܝ2-4 ˢ ٙ̚ઇ۞ԼតĂдܑॾ˯ઇซ˘Վ۞አፋĄ ॾĂᑭෛ֭ീྏଋдበᏭጡܑזՀາܑॾ۞̰टĄଋΞͽаޢቅ۞ត̼Ă൒ ٕΐˢՀк۞̮ІĄ༊ଋдበᏭጡ̚ᇤᆷ඀ёቅॡĂበᛌጡ̙ᕝгຏۢ඀ё ቅበᏭጡ̚ͽ͛фӔனĄଋΞͽд඀ёቅበᏭጡ̚ՀԼፋЪᒖဩயϠ۞ቅĂ ܑॾ۞̰टĂι۞ٙѣপّĂιጾѣ۞̮ІĂͽ̮̈́І۞পّĂΞͽд඀ё Ăಶ˘ؠᅮࢋᇤᆷ඀ёቅĄڱтᇤᆷְІ఍ந͞ ІᑭෛጡֽՀԼιࣇ۞ᛳֽّฟ൴඀ёĄҭѣధк඀ёనࢍՎូĂּۏ౅࿅ ޢдܑॾ˯Ă൒ٸІۏࢍᒖဩ̚Ăܑॾҋજјࠎາ૞९۞˘ొ̶ĄଋΞͽ૟ Delphi ඀ёቅበᏭጡߏ˘࣎ΑਕԆፋ۞ ASCII ͛фበᏭጡĄдෛᛇ̼඀ёన ᇤᆷ඀ёቅ ֽᄲĂ૞९யϠ۞ᑫ९ᄃγొણᄃ۞ᑫ९֭൑̙ТĄ д̦ᆃг͞˘ᕇ˵̙ࢦࢋĄ၆በᛌጡٸ༊ଋበᛌ૞९ॡĂၹј૞९۞ᑫ९х ᑫ९ྮश҃̏Ą༊ଋΐˢາ۞ಏ̮ॡĂDelphi ົҋજ఍ந఺ֱ௟༼Ą дֽࣧ۞г͞Ą૟Вֳᑫ९ΐˢϫ݈૞९Ϊߏд૞९ᑫ९۞ uses clause ΐˢ ଋ૟˘࣎Вֳ۞ᑫ९ΐˢ૞९Ăѩᑫ९֭Ϗజ޿֓Ҍ૞९ϫᐂĂι̪൒ڍт ̝ҋࢎ඀ԔᄃΑਕĄ ёב૞९ϫᐂ̝γĄТॡϺΞֹϡ̏ᆷј፾ϲٺܑॾᑫ९Ăӈֹ఺ֱᑫ९Ҝ ၹಏҜĄ૞९ΞͽֹϡЇңனх۞ಏ̮̈́ޙಏܑ̮̈́ॾߏᑕϡ඀ё̚ૄώ۞ ९నؠౌᐌ඾૞९ᐼхд૞९ᑫ९̚Ą ၆ྖ஼ֽՀԼ૞९۞ЧีనؠĂΒ߁ܑॾĂᑕϡ඀ёĂበᛌጡඈඈĄ఺ֱ૞ நࣶΐˢٕொੵᑫ९ॡĂ૞९ᑫ९ົҋજՀາĄଋΞͽ౅࿅ Project Options І(shared objects)۞޽ϯĄ༊ଋӀϡ૞९გۏϲᑕϡ඀ёٕВֳޙᑫ९Βӣ ˘ี૞९ᄃ׎Ч࣎ᑫ९̈́࠹ᙯనؠĂჍ̝ࠎ૞९ᑫ९ĂઘᑫЩࠎ.dprĄ૞९ ૞९ཏ௡Ą ଋ˘ѨΪฟୁ˘࣎૞९Ă֤ᆃಶ̙ᅮࢋֹϡڍߛၹᑕϡ඀ё۞̙Тొ̶Ąт ଋΞͽგந̈́ፆүк࣎࠹̢ᙯᓑ۞૞९Ăּт˘Тྻү۞ᑕϡ඀ёٕкᆸё ֹϡ Delphi ฟ൴ᑕϡ඀ё 2-5 ඀ё۞ેҖĂႾ࠻តᇴࣃͽ̈́ྤफ़ඕၹ̚۞᛼ҜĂͷΞдੵ᏾ล࣒߱Լྤफ़Ą טDelphi ೩ֻᑒӄଋ൴ன࣒̈́ϒ᏾ᄱ۞ፋЪੵ᏾ጡĄፋЪੵ᏾ጡឰଋΞͽଠ ඀ёੵ᏾ ො ଋᅮࢋ Kylix д Linux ᒖဩ̚በᛌ CLX ᑕϡ඀ёĄ Projects ٕ Project|Build All Projects ӈΞĄ Ᏼፄ Project|Compile Allޢѣ૞९Ąኛд૞९გநࣶ̚ĂᏴؠ૞९ཏ௡Ă൒ ၹ૞९ཏ௡۞ٙޙТ˘࣎ཏ௡̚ĂଋΞͽТॡበᛌٕٺଋ૟к࣎૞९ཉڍт ซҖాඕ̈́ેҖĄޢഅซҖՀજĂ֤ᆃበᛌጡົࢦາበᛌՀજ۞ಏ̮൒ޢ ඀ёд˯аበᛌ࿅ڍҖĄтેޢy дેҖ૞९ॡĂ૞९ົАซҖበᛌĂ൒ ၹ૞९ֽቁᄮଋ۞඀ёቅߏӎѣ᏾Ąޙၹ૞९Ąଋ˵ΞͽᖣϤ ޙॡĂࠎ˞ቁܲٙѣ۞඀ёቅౌ޷໰າనؠࣃበᛌٕాඕĂ౵р˵ࢦາ ߏӎഅགྷԼតĄࡶଋՀજ˞Бાّ۞በᛌٕాඕనؠޢιд˯аበᛌ࿅ ၹ૞९Ăѩॡ૞९̚۞ٙѣಏ̮ౌົజበᛌĂ̙ኢޙߏڱॡĂ౵р۞͞ ώТՎۍ࣒ԼٕߏΪຐቁؠٙѣᑫ९ౌᄃ౵າזy ༊ଋ̙ቁؠᑫ९ߏӎዎ ซҖԼត۞ಏ̮̖ົࢦາበᛌĄޢy ༊ଋበᛌ૞९ॡĂΪѣ˯аበᛌ࿅ ၹ(build)̈́ેҖ(run)ֽീྏଋ۞ᑕϡ඀ёĈޙңล߱ᖣϤበᛌ(compile)Ă ٙѣ۞૞९۞ϫᇾౌߏயϠ˘࣎Ξ̶೸۞ેҖᑫ९ĄଋΞͽдฟ൴ฉഇ۞Ї ĂಶΞͽдፋЪᒖဩٕߏଂ׻΄Еֽበᛌ఺࣎૞९Ąޢ ༊ଋԆјᑕϡ඀ёֹϡ۰̬ࢬ۞నࢍĂֶ֭̏໰࣎ˠٙᅮΐˢᗝγ඀ёቅ በᛌ૞९ ߁ٙѣ Delphi ૞९ᑫ९ౌΞͽд඀ёቅበᏭጡ̚ᑭෛ̈́በᏭĄ ІĂRTL ඀ёቅĂΒۏ ІĂCLXۏ Җᑫ྆ᐝůٙѣ۞ VCLે۞ޢӣдଋ౵ Delphi ۞඀ёቅயϠ̈́পّҚ߹ր௚ߏ඗၆̳ฟ۞࿅඀Ąٙѣ۞඀ёቅౌΒ ᄃ඀ёనࢍ͘Ίܝ2-6 ˢ Ăኛણዦௐ 18 ౢĂĶҶཌᑕϡ඀ёķĄځҶཉᑕϡ඀ё۞ซ˘Վᄲٺᙯ ώ۞ Delphi ౌ͚೯Ҷཌᑕϡ඀ёĄۍො ̙֭ߏٙѣ ଋᅮࢋ Kylix д Linux ᒖဩ̚በᛌ CLX ᑕϡ඀ёĄ ώౌѣ) ݋Ξ੠ᖸᑕϡ඀ёՀາĄۍ۞ ІĂΒ߁̶೸ёᑕϡ඀ёᅮࢋ۞ٙѣᑫ९ĄTeamSource software(̙ߏٙѣ ϲщ྅इޙώౌѣ)Ξࠎଋ۞ᑕϡ඀ёۍInstallShield Express(̙ߏٙѣ۞ Delphi Β߁˞Ξᅃӄᑕϡ඀ё̶൴Ҷཌ(deploy)۞̍׍ĄᓝּֽᄲĂ Ҷཌᑕϡ඀ё фϓฟ൴Ą ͽ Tܧ׶׎ιᙷҾ˘ᇹĂ˵ߏᙷҾĄ̙˘ᇹ۞ߏĂιࣇ఼૱ͽ E фϓฟᐝ҃ ҿᕝĂԱವ̈́఍ந᏾ᄱĄд Delphi ̚ĂּγಶֽטଋᔘΞͽֹϡּγ఍ந፟ Ąځኛ֍ቢ˯ᄲڱЪந̝఍ĄፋЪੵ᏾ጡϡֹϡ̙͞ז࿰ഇ֭Ա ٺΨુᝑ̈́඀ёᏮ΍ĂଋΞͽរᙋ඀ё۞ҖࠎߏӎЪײؠᕇĂ៍၅តᇴࣃĂ ፋЪੵ᏾ጡΞͽϡֽ੠ᖸેҖॡഇ᏾ᄱ̈́ទᏭ᏾ᄱĄેҖҌ඀ё̚۞ߙ࣎প ֹϡ̮І඀ёऱ 3-1 library)ᄃClasses unitĄ ёĄώ඀ёऱ̚ΒӣRTL(runtimeבBaseCLX ࠎٙѣCLXᑕϡ඀ё೩ֻҲลᙷҾᄃ ځ̶ᙷ ᄲ ܑ3.1 ̮І̄඀ёऱ ऱĄ˭Еܑॾ૟Е΍఺ֱ̄඀ёऱĈ І௡јĂֶ֭׎ֹϡϫ۞̝̙Т̶҃јрೀ࣎̄඀ёۏ̮І඀ёऱϤధк ˞ྋ̮І඀ёऱ ңᑕϡ඀ёĂҭѣֱᙷҾಶΪਕ΍னдপؠ۞ᑕϡ඀ё̚Ą ϲֹٕϡ̝ᙷҾĄѣֱᙷҾΞྻϡдЇޙᅮ̝̮ІĂͽ̈́ેҖॡഇ඀ёቅٙ ̝มྭπέ۞඀ёĄ̮І඀ёऱ׍ѣؼणّĂιӣ߁˞дፋЪฟ൴ᒖဩٙ̚ ऱĄVCL ϡֽฟ൴ Windows ඀ ёĂ҃ CLX ϡֽฟ൴Ξд Windows ̈́ Linux (VCL)̈́ Borland Component Library for Cross-Platform (CLX)׌इ̮І ᙷҾĄDelphi Тॡ೩ֻ Visual Component Library۞זᑕϡ඀ёॡΞਕֹϡ Delphi ೩ֻ۞̮І඀ёऱซҖໄ៍ّ۞ጱᜓĂ̬֭௜ధкଋдฟ൴ ٺώౢ၆ ϡ̮І඀ёऱֹ ᄃ඀ёనࢍ͘Ίܝ3-2 ˢ І࠰ߏϤ TControl ᙷҾᚶֽٚ҃۞Ąְ̈́ڱّĂ͞ Ą఺ֱᄃពϯγ៍࠹ᙯ۞ᛳޘ੼̈́ޘጾѣពϯγ៍࠹ᙯ۞ᛳّĂּт̮Іᆵ ౌีטιࣇ΍னĄٙͽ۞ଠזGUI ᑕϡ඀ё̚ĂેҖॡֹϡ۰Ξд൪ࢬ˯࠻ ϡдྻีטĂιࣇ఼఼ߏ TControl ۞̄ᙷҾĄଠีט჌̮ІĂԧࣇჍࠎଠ ෛᛇ̼̮І⎯ּт TForm ٕ TSpeedButtonĂΞдેҖॡഇ΍னд൪ࢬ˯۞֤ Іሹ˯Ą д̮ٸҖॡഇߏӎࠎΞෛĄѣֱ̮І݋ົેٺՙפෛᛇ̼̮ІĂԆБܧಶߏ Inspector)ֽۡତ޽ؠ̮Іᛳّࣃ̙҃υᇤᆷ඀ёቅĄ̂ొЊ̮І̙ߏෛᛇ̼ Іᑭෛጡ(Objectۏдܑॾٕྤफ़ሀ௡˯ซҖፆүĄଋΞֹϡٸॡഇ૟̮І ᚶٚҋ TComponent ᙷҾ̝̮І඀ёऱᙷҾ۞̄ะЪࠎ̮ІĄଋΞͽдనࢍ ၹ(construction)ăྋၹ(destruction) ᄃੈि఍ந(message handling)Ą ޙࢋΝ၁ઇૄώજүΒ߁ڱ̝̚͞ ٙѣᙷҾ࠰ᚶٚҋ TObject ᙷҾĂTObject πέᑕϡ඀ё̝ྤੈĂኛણዦௐ 15 ౢĂĶฟ൴ྭπέᑕϡ඀ёķĄ Ăт TLCKNumberĂ݋ᑕֹϡ CLXĄ୬ᒢྋՀкᇤᆷྭีטᑕϡ඀ё̝̚ଠ х̝ VCL ᑕϡ඀ёĂᑕֹϡ VCLĄ༊ଋຐᇤᆷྭπέᑕϡ඀ёٕߏֹϡ CLX ߏ Windows পѣ̝ΑਕĂٕߏؼणߊٕีטຐࢋֹϡࣧϠ̝ Windows ଠ VCL к˞ WinCLXĂCLX ݋ߏк˞ VisualCLXĄ༊ଋ ٺNetCLXĂ̙Тᕇд VCL ̈́ CLX ѣధк࠹Т۞̄඀ёऱĂιࣇӮѣ BaseCLXăDataCLX ᄃ applets)̝̮ІĄ ˯ۍטٕ ADO)Ăͽ̈́Ϊ͚೯Windowsԫఙ(COMĂNT Servicesٕଠ тBorland Database Engine)טዋϡ̝፟ڱLinux൑˞פІ݋ଳ̮פफ़х Ăྤีט྅̝ଠދ Windowsֹϡ̝ᙷҾĂΒ߁ࠎࣧϠWindowsٺWinCLX ೩ֻ่ Widget library (Qt)̝ૄώߛၹĄ VisualCLX ྭπέֹϡ̝GUI̮ІᄃgraphicsᙷҾĄVisualCLXᙷҾྻϡ˞ྭπέ Server ̝ᑕϡ඀ёĄ ၹWeb Serverᑕϡ඀ёٙᅮ̝̮ІĄ͚೯ApacheٕCGI WebޙNetCLX Βӣ फ़ĄྤפጡӮΞхڇٕߏӀϡdbExpressଂྤफ़ऱҨ फ़ऱ̝ྭπέᑕϡ඀ё̚Ă̙ኢଂჃჄᑫ९ྤפЪĂ఺ֱ̮ІΞֹϡдх ІĄώ඀ёऱ̝̮̚Іߏٙѣྤफ़ऱ̮ІะЪ̝̄̚ะ̮פბྤफ़х͗މ DataCLX ځᙷ ᄲ̶ ֹϡ̮І඀ёऱ 3-3 ჯ᜕̈́Լ։Ąٺٽజ΁ˠֹϡĂ˵ՀटٽனĄనࢍ։р۞ᛳّ૟ֹ̮ІՀट Іߏӎдᑕϡ඀ё̬ࢬ˯ពۏVisible ᛳّՙؠѩ ۞ีט۞ҖࠎĄּтĂଠ ᛳّ(Properties)ߏᙷҾ۞ߙֱপᇈĂᄃᙷҾ۞ෛᛇ̼γ៍࠹ᙯĂٕᇆᜩᙷҾ ᛳّ Delphi ᄬ֏ᇤᆷĄ ࠎ͹຅Ă҃ CLX ݋ͽ Qt widget ඀ёऱࠎ͹຅Ă҃ፋइ̮І඀ёऱ݋ͽ Ăͽ̈́ͅᑕֹϡ۰જү۞඀Ԕ(ְІ)Ąᔵ൒ VCL ͽ Windows API(ڱ͞)ү ІሀݭĄιؠཌྷ˞ྤफ़јࣶ(ᛳّ)Ăፆүྤफ़۞જְ̈́ڱᛳّĂ͞ٺၹޙ࠰ Іۏ ඕЪĂឰଋΞд Delphi ፋЪᒖဩ̰ԣిгฟ൴ᑕϡ඀ёĄVCL ̈́ CLX VCL ̈́ CLX ߏϤЧ࣎ᆸ৺ᙷҾะЪ੓ֽ۞඀ёऱĂᄃ Delphi ፋЪᒖဩღ૜ Їְ́ڱᛳّă͞ ĶCLX referenceķĄځCLX ݋ົᇾ ٺĶVCL referenceķĂ҃ᛳځᄃְІĂົᇾڱІăপّă͞ۏ۞ VCL ٺᛳ ĄځІᄲۏ ٕ CLX VCL זІ˯ĂГ޷˭ F1 ᔣಶΞߤۏЇң˘࣎ٺд඀ёቅበᏭጡ̚Ă૟ഫᇾཉ ĄځІ۞ྎ௟ᄲۏ VCL ̈́ CLX זߤ̚ځ༊ଋᇤᆷ඀ёॡĂϖᅈΞдቢ˯ᄲ ϲ఺ֱᙷҾ۞ᇹּĄޙдనࢍॡഇڱࢍ̍׍̚ΐˢ۞̮ІٙயϠĂଋ̪൒൑ ᇶॡّ۞̍ү(тд୻ಏ˯ᐼхྤफ़)ඈĄᔵ൒఺ֱᙷҾΞਕߏϤଋдܑಏన І(тᑫ९ٕߏગ෭ᘨ)ٕߏۏր௚פкᇹّ۞̍ү˯Ăιࣇ఼૱జϡֽхٺ І̝ᙷҾ(˵ಶߏᄲᚶٚҋ TObjectĂ̙҃ߏᚶٚҋ TComponent)˵ົϡ̮ܧ ᛇ̼̮Іົͽဦϯ΍னĂឰଋ఍ந׎পّᄃְІॡᄃ఍நෛᛇ̼̮І࠹ТĄ ෛܧෛᛇ̼̮ІĄనࢍॡ׎ٙѣܧඕ࿅඀Ăٙͽ TDataSource ಶߏాזົ࠻ ϡྤफ़ะĂֹ҃ϡ۰ֹ̙֭֭ีטдܑॾ˯ͽాඕଠٸ Ξͽ૟ TDataSource кᇹّ۞̍ү˯Ăּтᇤᆷాඕྤफ़ऱᑕϡ඀ёॡĂଋٺෛᛇ̼̮ІΞϡܧ ᄃ඀ёనࢍ͘Ίܝ3-4 ˢ ౌΞᄲߏְІጱШёĂЯࠎιࣇ͹ࢋజనࢍֽаᑕְІĄనࢍ඀ёॡĂ඀ё ൴ϠĄன̫̂ొ̶ᑕϡ඀ё۞ڶߙีજүٕଐ۞זְІ(Event)ߏ඀ёٙ଀ۢ ְІ ĄڱᙷҾᆸ৺ĂჍ̝ࠎᙷҾ͞ٺᛳڱѣ͌ᇴ͞ ІĂ˵ۏϡॡυА૟ᙷҾ၁វ̼јֹڱķĄᔵ൒̂ొЊ۞͞טଠפௐ 2 ౢĶх ёĄΞણ҂̮Іᇤᆷ۰͘Ίב఼૱˵ჍࠎјࣶڱᙷҾјࣶĂᙷҾٙጾѣ۞͞ ྍᙷҾ۞ publicĂprotected ᄃ private ᆸ৺۞ᛳّ̈́ٺٙѣᛳפΞͽхڱ͞ ؠཌྷᙷҾ۞ҖࠎĄᙷҾٙጾѣ۞ڱMethod)ߏࠎᙷҾٙጾѣ۞඀ԔĄ͞)ڱ͞ ڱ͞ ᇆᜩТ˘࣎ཏ௡۞ radio buttons ̮ІĄ І૲ֽᇆᜩĄּтĂనؠ˘࣎ radio button ̮І۞ Checked ᛳّಶົۏ І۞ᛳّΞͽ၆׎ιۏІ˯ĄԼតߙ࣎ۏ˘дಏטy ᛳّ۞ᇆᜩ̙˘ؠࢨ y ᛳّΞͽߏ෍ᑢ۞Ą ޽ؠ఺ֱજүĄ̚ڱ ͞פ࣒Լߙ࣎ᛳّΞਕጱ࡭Ω˘࣎ᛳّࣃ˵ТॡԼតĄଋΞͽдᛳّх ᛳّॡĂТॡᛈ൴ߙְֱІࠤҌ࣒Լ׎ιྤफ़ĄּтĂפy ଋΞͽనࢍдх ඀ёֽࣶᄲĂιಶᄃ˘ਠ۞ྤफ़јࣶ൑ளĄٺफ़ऱܑॾ̝̚Ăҭ၆ ྤٺٸ଀̈́నؠᛳّࣃຳ̚ซҖপঅ఍நĄּтĂᙷҾ۞ྤफ़Ξਕхפ ĂٙͽଋΞͽдڱΨߙ࣎পؠ͞ײ଀̈́నؠᛳّࣃ۞ৌϒજүΞͽߏפ y ྅ࠎ protected ٕ private ᆸ৺Ąދᛳّ۞͚೯ĂΞԆБ૟ྤफ़ٺy Ϥ ჯ᜕Ąٽ඀ёՀट дనࢍॡഇనؠᛳّࣃᅈͧᇤᆷ඀ёቅֽፆү̮ІᖎಏĂТॡ˵ឰଋ۞ ІᑭෛጡֽፆүĂΞͽෛᛇ̼͞ёֽӔன࣒̈́ԼᛳّࣃĄۏy ᛳّΞ౅࿅ ᇆᜩĄ۞ޢᛳّԼតזᛳّࣃĂ֭ͷдፋЪᒖဩ̚ϲӈ࠻ ͷԼតזΨĄଋΞͽдనࢍॡഇ࠻ײĂΪਕдેҖॡഇజڱy ᛳّ̙ည͞ ͽ˭ߏᛳّ۞ೀีপᇈē ֹϡ̮І඀ёऱ 3-5 ᚶٚลᆸᙯܼဦĄีטІĂ̮Ї́ଠۏᖎ̼۞ޘဦ3.1 ߏໂ ีטІĂ̮Ї́ଠۏ ౵າ੃ᐂॡٙயϠ۞ OnPost ְІĂಶߏ̰ొְІĄ ІٙயϠ۞Ąּтᑕϡ඀ё̚ឰྤफ़ะ෭˯ۏ̰ొְІߏϤଋ۞ᑕϡ඀ё̚ ̰ొְІ ְІ̙֭ߏۡତϤֹϡ۰͔൴۞Ą OnTimer ְІă̮Іٕෛ඄ᅮࢋࢦᘱॡᛈ൴۞ OnPaint ְІඈඈĄ఼૱ր௚ ր௚ְІߏϤүຽր௚யϠ۞Ąּт Timer ̮ІՏ࿣˘߱׽ؠॡมயϠ۞ ր௚ְІ ְֱІౌᄃֹϡ۰Җࠎ࠹ᙯĄ OnKeyPress(ֹϡ۰޷˭ᔣሹ޷ᔣ)̈́ OnDblClick(ֹϡ۰ᗕᑝ໣ဂ)ඈඈĄ఺ ֹϡ۰ְІߏϤֹϡ۰જү͔൴۞Ąּт OnClick(ֹϡ۰޷˭໣ဂ)Ă ֹϡ۰ְІ y ̰ొְІ y ր௚ְІ y ֹϡ۰ְІ Ξਕົ൴Ϡ۞ְІ჌ᙷ͹ࢋ̶ࠎĈ ؠॡ݋ົેҖ఺߱඀ёቅĂӎ݋ಶົેҖ࿰న఍நજүĄۺԔĂтࠎ Іົᑭߤଋߏӎ၆ྍְІ̏ᇤᆷ˞఍ந඀ۏ ൑ኢְІߏтң൴Ϡ۞ĂVCL ߏֶ໰࠹Т۞ેҖึԔᇤᆷ඀ёቅĄ ߙ߱͛фĄଋΞͽ੫၆ѣຍཌྷ۞જүᇤᆷְІ఍ந඀ԔĂ̙҃υᓁפตٕᏴ ჟቁ࿰ീֹϡ۰۞˭˘ՎજүĄ΁ࣇΞਕᏴፄ˘࣎ᏴಏีϫĂ޷˭޷ڱࣶ൑ ᄃ඀ёనࢍ͘Ίܝ3-6 ˢ ᑕ໣ဂજү۞ְІĄ ̮І۞࠹ᙯΑਕ̈́ᛳّĂּт̮ІҜཉ̈́ഫᇾ͚೯ඈඈĂТॡ೩ֻа য়ĄTControlᙷҾ೩ֻٙѣેҖॡഇΞෛؕ۞(ีטTControl ٙѣΞෛ̮І(ଠ ˯ፆүĄ̮ІΞͽጾѣ׎ι̮ІĄ TComponent ٙѣ̮І۞ؕয়ĂѩᙷҾឰ̮ІΞͽщ྅д̮Іሹ˯҃଀ͽдనࢍጡ І۞޽ࠁĄۏͷ̯ధ ĂטІϖᜈ፟ۏ΃ᙷҾ͚೯ޢTPersistent ٙѣ၁үᛳّᙷҾ۞ؕয়ĄTPersistent г఍ந᏾ᄱĄܪ඀ё଀ͽ႓ Exception ٙѣּγᙷҾ۞ؕয়Ąּγ఍நࠎ᏾ᄱଐԛ೩ֻ˘࡭۞̬ࢬĂឰᑕϡ ඈඈĄڱІᇹּ͞ۏϲăჯ᜕ăၨ໑ޙ۞ૄώਕ˧Ăּт ІٙᅮۏTObject VCL̈́CLXᙷҾऱ̚ĂٙѣᙷҾ۞ؕয়ĄTObject೩ֻٙѣ ᙷҾЩჍ ೡࢗ ܑ3.2 ࢦࢋ۞ૄᖂᙷҾ ˯ဦ̚Βӣ̱࣎ࢦࢋ۞ૄᖂᙷҾĂ˭ܑЕ΍ιࣇ۞ೡࢗĈ ҋ̎পҾ۞ΑਕĄٺٕ TWidgetControl ۞ٙѣᛳّĂ֭ΐˢᛳ Ăಶᚶٚ˞ TObjectĂTPersistenĂTComponentĂTControlĂTWinControlี ט݋ᚶٚҋ TWinControl ٕ TWidgetControlĄည TCheckBox ఺ᇹ۞ଠีט ᚶٚҋ TgraphicControlĂෛ඄ଠีטĂဦԛ۞ଠีטᚶٚĄѣ׌჌ݭၗ۞ଠ ࠰ଂ TControlีטTPersistent ٕ Tcomponent Ą׍ѣдેҖॡഇពϯҋ֗۞ଠ І݋ົᚶٚҋۏІౌᚶٚҋ TObjectĂдܑॾనࢍ̚΍ன۞ۏՏ˘࣎ * дྭπέ۞ᑕϡ඀ё̚݋ߏ TWidget Control [objects] [objects] [objects] [objects] [objects] [objects] Exception TGraphicControl TObject TPersistent TComponent TControl TWinControl* ဦ3.1 ᖎ̼۞ߛၹဦ ֹϡ̮І඀ёऱ 3-7 y TQueueĂАซА΍ቢّҚЕᙷҾ ซА΍ቢّҚЕᙷҾޢy TStackĂ y TListĂᙥඕҚЕᙷҾ ࣃੱЕ۞ᙷҾڒy TBitsĂᐼхο ྅ྤफ़ඕၹ۞ᙷҾĂּтĈދTObject ̶͚۞Ω˘௡ᙷҾߏ Ąڶι۞ּγଐ ᖼݭͽ̈́׎۞ڱ᏾ᄱĂ̙Ъפγ఍நྤੈĂּтੵͽ࿬᏾ᄱĂᑫ९хּ۞ޙ ΃ĄּγᙷҾ೩ֻ˞ధк̰ޢѩ̶͚̚ҫкᇴ۞ᙷҾߏ Exception ᙷҾ̈́׎ ІྤੈಶГ˵Ա̙а˞ĄۏĂޢٸІᛖۏਕ˧Ăٙͽ˘ό ၗᐼх੓ֽ۞ېІĄೱήྖᄲĂιࣇ̙׍ѣдజၨ໑̝݈૟ۏౌߏᇶॡّ۞ TObject ߏధкᖎಏᙷҾ۞ͭᙷҾĄѩ̶͚۞ٙѣᙷҾѣ࣎ВТ۞ᛳّĈιࣇ ఍ந(CLX ᑕϡ඀ё)Ą y ͚೯ੈि(message)఍ந(VCL ᑕϡ඀ё)Ăٕ͚೯Әۢੈि(notification) ІྤੈĂͽ̳̈́ฟᛳّ۞ેҖॡഇݭҾྤੈĄۏy ᙷҾ̈́ ϲٕၨ໑ॡаᑕ۞ਕ˧ĄޙІۏy ༊ ĈڱૄώΑਕٙᅮࢋ۞͞ ྅˞̮І඀ёऱٙ̚ѣᙷҾދ ૻ̂ΑਕӮϤ TObject ᙷҾٙ೩ֻ۞ĂTObject ΃ᙷҾĄధк̮І඀ёऱ۞ޢ۞ Іౌߏ TObjectۏ ҾĄٙѣ۞ VCL ̈́ CLX ΃ᙷҾ۞ٙѣᙷޢ TObject ̶͚Βӣٙѣଂ TObject ᚶٚҭ̙ߏ TPersistent TObject ̶͚ VCL ᄃ CLX Object Hierarchy ጨଭဦĄ ۞ܢҾลᆸဦĂኛણ҂ώயݡٙ ˭Еೀ࣎̈༼૟̶Ҿ̬௜Ч࣎͹ࢋᙷҾ̶͚̈́Ąࡶᅮࢋ VCL/CLX Ԇፋ۞ᙷ ΃ᙷҾჍ̝ࠎwidgetsĄޢ̝ TWidgetControl҃ีט΃ᙷҾჍ̝ࠎෛ඄ଠޢ̝ ൏ᕇĄTwinControl ଀ᔣሹᏮˢפͷΞͽีט΃ᙷҾౌߏΞෛଠޢয়Ă׎ؕ۞ีטٙѣଠ TWidegtControl TwinControl or ᙷҾЩჍ ೡࢗ ᄃ඀ёనࢍ͘Ίܝ3-8 ˢ т THeaderSectionsăTHeaderSectionăTListColumnsăᄃ TlistColumnĄ y ᚶٚҋ TCollection ̈́ TCollectionItem ̝ᙷҾĂιࣇჯ᜕̮І۞ีϫะЪĄ y TStringList გந͛фٕфҚҚЕ۞ૄᖂ٩෪ᙷҾĄ ྅ᙷҾĄދ̈́ TIcon ᙷҾĄTClipboard ߏүຽր௚ગ෭ᘨΑਕ̈́ፆү۞ y ਕૉგந̈́ពϯᇆည(тဦϯ̈́ᕇੱဦ)۞ૄᖂ٩෪ᙷҾĂּт TBitmap І۞ૄᖂ٩෪ᙷҾĂּт TBrushĂ TFontĂ̈́ TPen ᙷҾĄۏy ᘱဦ ІΒ߁Ĉۏѩ̶͚̚۞׎ι тңྶˢ̈́ᐼхᛳّྤफ़ĄטDefineProperties ឰଋΞͽଠ ڱֻ෍ᑢ͞ ĄιТॡ೩טІ۞̳ฟᛳّᐼх̈́ྶˢ۞፟ۏѩ̶͚̚۞ᙷҾᔘ೩ֻҋજ૟ ّ۞ጾѣ۰Ą ឰܑಏనࢍ̍׍ՙؠᛳڱ͞ ĄTpersistent ̰ӣ GetOwnerפдܑॾ˯ֽхܢ ፾ϲхдĂυืགྷϤᛳّ۞ጾѣ۰ Ǖ̮Іֶڱ၁ү̮І۞ᛳّ͚೯Ăٙͽ൑ ІߏۏІΞдనࢍॡഇӔனĄҭߏྍۏĂឰѩ̶͚۞טྍᙷҾ۞ϖᜈ፟ٺϤ Ąڶېаೇֽࣧ۞ аֽĂפၗ᝝ېІۏၗᐼх੓ֽĂͽ̈́тң૟ېІۏІᑕྍтң૟ۏ۞˯௡ ॾٕྤफ़ሀܑטଠטІϖᜈ፟ۏĄטІϖᜈ፟ۏᙷҾĄTPersistent ᙷҾ೩ֻ ΃۞ٙѣޢ TPersistent ̶͚Β߁ᚶٚҋ TPersistent ᙷҾҭ̙ߏ TComponent TPersistent ̶͚ ྤੈĂኛણ҂ௐ 5 ౢĶֹϡ BaseCLXķ ё۞ซ˘ՎבTObject ̶͚̚ᙷҾٕߏ Delphi ેҖॡഇ඀ёऱ̚Бા ٺᙯ ጸវඈඈĄ ᆷˢྤफ़۞ਕ˧Ăּтᑫ९Ă੃̈́פІ۞ͭᙷҾĂι೩ֻଂЧ჌ᐼхಫវ᝝ ۏTStream ˵ߏ TObject ̶͚̚ໂࠎࢦࢋ۞ᙷҾĄTStream ᙷҾߏٙѣྤफ़߹ ІĄۏ ྅ր௚൳ᐂྤफ़ऱ۞ TRegistryދІćͽ̈́ፆүۏ TPrinter ІϺ೩ֻΒ྅ᙷҾ(wrappers)Ăт͚೯Оܑ፟ЕО۞ۏTObject ̶͚ࠎγొ ֹϡ̮І඀ёऱ 3-9 ޷ตĄ ٙᅮаᑕ۞જү̈́γ៍ĂּтΑਕܑٕีטy TActionListĂგந̮Ї́ଠ TComponent ̶͚̚Β߁ͽ˭ೀ჌ᙷҾĈ Іᇹּ̚ĄۏTComponent ॡĂҚ߹ր௚ົۡତ૟ᛳّࣃ᝝ˢߊх۞ ܧ૟ࣃ᝝ˢĄࡶᛳّ۞ݭҾࠎ TPersistent ̶͚҃ޢϲྍ̮ІᇹּĂ൒ޙજ ѩᛳّॡĂົҋפࡶᛳّ۞ݭҾߏ TComponent ٕ׎̄ᙷҾॡĂҚ߹ր௚᝝ ΍ֽĄ(݈೩ߏ̮Іυืనࢍϒቁ۞ྋၹё૟׎୻ੵ)Ąٸ໑Ă૟ٙҫ੃ጸវᛖ ͽజܑॾጾѣ(дܑॾ̝˯)۞ٙѣ̮ІĂдܑॾၨ໑ॡĂ˵ົజܑॾా૲ၨ ΃ᙷҾĂٙޢ ၨ໑ιጾѣ۞ٙѣ̮ІĄּтĂЯࠎ TForm ˵ߏ TComponent Ąࡶ˘̮࣎Іጾѣ׎ι̮ІĂ֤ᆃ༊ιజၨ໑ॡĂྍ̮Іົҋજטજၨ໑፟ Іጾѣ۞̮ІЕܑγĂጾѣᙯܼᔘΞ೩ֻ̮І۞ҋ̮פComponents ੱЕֽх ቁг޽Ш̮ІĂາ̮Іಶົΐˢጾѣ۰۞ Components ੱЕ̚Ąੵ˞Ξϡ ˢ۞̮Іጾѣ۰ϒ็ڍၹ̄ͽ˘࣎ણᇴϡֽ޽ؠ̮І۞ጾѣ۰Ąтޙ̮І۞ Components ੱЕᛳّĄ І۞̮ٺٸ۰Ą˘̮࣎І˵Ξͽጾѣ׎ι̮ІĂιٙጾѣ۞̮Іх Owner ̈́ ComponentsĄՏ̮࣎Іౌѣ Owner ᛳّĂ޽Шጾѣѩ̮І۞ጾѣ TComponent ᙷҾᔘΐˢ̮І̝ม۞ጾѣᙯܼĄጾѣᙯܼϤ׌࣎ᛳّ͚೯Ĉ ௟༼ĄΪࢋߏ̮І۞̳ฟᛳّĂಶົҋજ׍౯ྤफ़ϖᜈّኳĄ̶ొ̂ ۞טІϖᜈ፟ۏĄѩ̶͚ΐˢྤफ़߹۞͚೯ĄDelphi ົҋજ఍நڱ੓ֽ۞͞ ၗᐼхېІдనࢍॡഇ۞Җࠎͽ̈́тң૟̮І̮טTComponent ೩ֻ˘ֱଠ y Ξྶˢ̈́ᐼхιࣇώ֗Ą y Ξጾѣ̈́გந׎ι̮ІĄ y Ξ΍னд̮Іሹ˯Ă˵Ξдܑಏనࢍ̍׍˯ፆүĄ Іϖᜈਕ˧Ăٙͽ׍౯˭ЕপᕇĈ ۏІౌߏ̮ІĂଋΞͽдܑಏనࢍ̍׍˯ፆүιࣇĄιࣇ˵ጾѣۏ̶͚̚۞ ΃۞ᙷҾĄѩޢ TComponent ̶͚Βӣଂ TComponent ᚶٚҭ̙ߏ TControl TComponent ̶͚ ᄃ඀ёనࢍ͘Ίܝ3-10 ˢ ĂҭιࣇีטဦԛଠזᙷҾ TGraphicControlĄᔵ൒ֹϡ۰ΞͽдેҖॡഇ࠻ ĂЯࠎιࣇౌߏᚶٚҋ TControl ۞̄ีטTControl ̶͚۞ᙷҾϺჍࠎဦԛଠ Іពϯ΍ֽĄ̮ีטଠ۞ีט̮ІᛳّΞឰΒӣ׎ιଠ ૟ Color ᛳّ̳ฟĎЯࠎι۞ᗞҒߏϤιពϯ۞ဦԛՙؠĄ TControl ̚۞ͭ Іᑭෛጡ̰ĄּтĎTImage ϏۏѣдΞүϡॡιࣇ̖ົజ̳ฟĂ̖ົ΍னд HelpContext ٕ HelpKeywordĄᔵ൒఺ֱᛳّߏଂ TControl ᚶٚ˭ֽĎΪ ෛᛇ̼ᛳّĂт Captionă ColorăFont۞ีטTControl Βӣ̂ొЊଠ ΒӣᙯܼĄ۞ีטёĂᇾ໤ְІͽ̈́ଠבΒ߁ᘱဦ ಶည TComponent ؠཌྷٙѣ̮І۞ҖࠎĂTControl ؠཌྷٙѣΞෛ̮І۞ҖࠎĂ ତќᔣሹᏮˢĄڱTControl ̶͚̮І൑ ІĂּтҜཉĂ͛фഫᇾĂᘱဦĂொજ̮Іͽ̈́аᑕ໣ဂજүඈඈĄְ̈́ڱ͞ ጾѣᄃពϯਕ˧࠹ᙯ۞ᛳّĂౌีטͽ̈́ፆү۞Ξෛ̮ІĄٙѣ۞ଠזͽ࠻ Іౌߏд඀ёેҖॡĂֹϡ۰Ξۏ΃۞ᙷҾĄѩ̶͚̚۞ޢ(TWidgetControl TControl ̶͚ΒӣٙѣᚶٚҌ TControl ҭ̙ߏ TWinControl (д CLX ̚ߏ TControl ̶͚ ந̮ІķĄ ᄃ఍நְІ۞ྎ௟ྤੈĂኛણዦௐ 6 ౢĶ఍ڱΨ͞ײтңనؠ̮Іᛳّăٺᙯ ៍ĂΪ೩ֻᑕϡ඀ёٙᅮ۞Αਕ̈́ྻүĄ д̮Іሹ˯Ăҭߏ՟ѣ೩ֻЇңેҖॡഇෛᛇ˯۞γٸٚĄ఺჌̮І˵Ξͽ ࣎ည TTimer ఺ᇹΪ೩ֻΑਕ۞̮ІĂଋಶΞͽۡତଂ TComponent ᙷҾᚶ ̙ᅮࢋෛᛇ̼γ៍۞̮І఼૱ۡତᚶٚҋ TComponent ᙷҾĄּтࢋᄦү˘ ĂΞϡ۞໣ဂ޽ᇾͽ̈́фݭඈඈĄޘژĂ൪ࢬ۞͎̇̈́ྋีטϡ̚ଠ y TScreenĂგநϫ݈ᑕϡ඀ёٙጾѣ۞ܑॾ̈́ྤफ़ሀ௡Ăүϡܑ̚ॾĂү ೩ֻ૱֍۞၆ྖ஼Ą y TOpenDialogĂTSaveDialogĂTFontDialogĂTFindDialogĂTColorDialogĂ y TMainMenuĂ೩ֻΑਕܑ̈́˭ٛёᏴಏ۞ᙷҾĄ ֹϡ̮І඀ёऱ 3-11 TCustomControl ׍ѣ Canvas ᛳّΞҋҖᘱᄦγ៍Ą ᚶٚҋ TCustomControl ᙷҾĂีטӔனώ֗γ៍۞ਕ˧ĂЯѩྍଠ Ăт TstringGridăTDBNavigator ඈĂιࣇυื׍౯ีטӮ̙࠹Т̝ҋᄦଠ widget ٕีטTComboBoxĂ TPageControl ඈඈ)ͽ̈́ᄃЇңಏ˘ Windows ଠ т TEdit Ă TListBox Ă )ีט఺̶͚࣎۞̮ІΒ߁үຽր௚೩ֻ۞ଠ ᖂ۞ window ٕ widgetĄૄפy ጾѣ handle ٕপঅ۞ᙊҾфͽх Ąีטy ΞͽΒӣ׎ιଠ Ϊਕаᑕ໣ဂពϯྤफ़Ąีטညဦԛଠ ଀ᔣሹᏮˢ൏ᕇĄ˵ಶߏᄲΞͽତќֹϡ۰ᔣሹᏮˢ۞޽΄Ă̙פy ਕૉ পᇈт˭Ĉ۞ีטWidget ଠ ̈́ีטෛ඄ଠ TControl ۞̄ᙷҾĄ ۞ۍ˫ߏྭπέ ᖂᙷҾĂ҃ TWidgetControlૄ۞ีטTWidgetControl ߏٙѣ widget-based ଠ TControl ۞̄ᙷҾĄ ۞ۍ ΃ᙷҾĂ҃ TwinControl ˫ߏ Windows ͭ۞ีטιࣇጾѣҋ̎۞ෛ඄ٕ widgetĄTWinControl ߏٙѣ windowed ଠ ٺТ̝఍д̙ีטᄃဦԛଠีט఺׌̶͚̂Ăώ̶͚ଠٺᛳีט̂ొЊ۞ଠ TWinControl/TWidgetControl ̶͚ ķĄีט௟༼Ăኛણዦௐ 7 ౢĶ఍நଠ̝ีט୬ᒢྋдેҖॡഇтңୁજଠ TControlĂߛၹд Qt widget ඀ёऱ˯Ą ۞ۍ݋ᚶٚҋྭπέีטଠ TControlĂͽࣧϠ̝ Windows API ેҖĄ҃ྭπέ̝ ۞ۍ ᚶٚҋ Windows ีטώĂWindows ૞ϡ۞ଠۍѣ׌჌˵ีט඀ё(ྭπέ)Ąٙͽ̂ొЊ۞ଠ VCL ᑕϡ඀ё(Windows ૞ϡ)ٕߏ CLX ᑕϡ ٺώĂϡۍTControl ѣ׌჌ ˘༼Ą ķีטTControl ̶͚۞ྎ௟ྤੈĂኛણዦௐ 10 ౢ̚Ķဦԛଠ ٺֽ଀ԣĄᙯ ۞ր௚ྤ໚Ă҃ͷᘱᄦဦԛ̮Іົͧᘱᄦ windowed(ٕ widget-based)̮І Ąҭ˵Яࠎဦԛ̮І՟ѣҋ̎۞ෛ඄(ٕ widget)Ăٙͽιࣇֹϡྵ͌ีטଠ ଀ᔣሹᏮˢ൏ᕇĂ˵̙ਕΒӣ׎ιפڱ՟ѣҋ̎۞ෛ඄(ٕ widget)ĂЯѩ൑ ᄃ඀ёనࢍ͘Ίܝ3-12 ˢ ჌ᙷķĄีט ୬ᒢྋ TwinControl/TwidgetControl Հк۞࠹ᙯྤੈĂኛણዦௐ 10 ౢ۞Ķଠ Іሀݭ 4-1ۏֹϡ ॡĂ˵ΒӣᙷҾĄ ІۏזĂ༊ԧࣇ೩˭ڶІ۞̶Ҿ՟ѣ఺ᆃࢦࢋॡĄд఺჌ଐۏ׎ߏᙷҾͽ̈́ ІٕᙷҾ۞ϡᄬ֭Ϗүᚑॾ۞ડ̶Ă͍ۏϒᆊࣃĄҭߏ఼૱д३ࢬ͛І̚Ă ІಶߏᙷҾ۞ᇹּĂ˵ಶߏᙷҾ۞ৌۏү(Αਕ)జ༊ү࣎Ҿ۞̮৵఍நĄ҃ ᙷҾߏ૟ྤफ़׶඀ёቅΒᄤд˘੓۞ྤफ़ݭၗĄϏଳৼ OOP ॡĂྤफ़ᄃፆ Іߏ̦ᆃۏ ϲໄኢķĄޙ̮Іሹ۰Ăኛણዦ̮Іᇤᆷࣶ͘Ίௐ 1 ౢ̝Ķ̮І ІጱШ඀ёనࢍ̝௟༼Ă֭ᇤᆷາ̮І૟ιࣇΐˢ Delphiۏࡶߏຐࢋᒢྋ ĂهІጱШ۞ᖎಏໄۏώౢ૟ࠎࣣ඾ֹ͘ϡ Delphi ᄬ֏̝඀ёనࢍरĂ̬௜ ய˧Ą ІĂ఺ᇹಶΞͽ಼̂ᒺഴฟ൴ॡมĂࠎଋ׶׎΁ˠᆧΐϠۏֹ̰ϡ఺࠹Т۞ ІĂଋ׶׎΁඀ёనࢍरಶΞͽд׎΁ᑕϡ඀ёۏΪࢋആᑕϡ඀ёயϠ˘࣎ ྅д˘੓Ąދёనࢍ۞ҋ൒ؼҩĄOOP ૻአ඀ёቅГӀϡͽ̈́૟ྤफ़׶Αਕ ІጱШ඀ёనࢍ(OOP)ߏඕၹ̼඀ۏІጱШؼҩ۞ PascalĄۏDelphi ᄬ֏ߏ Іሀݭۏϡֹ ᄃ඀ёనࢍ͘Ίܝ4-2 ˢ ѩඕՁ }ٺӘކ end; { ܑॾ۞ݭၗ { Public declaration } public { Private declaration } private ӘϤѩฟؕ }ކ TForm1 = class(TForm) { ܑॾ۞ݭၗ type Dialogs; uses Windows, Massages, SysUtils, Variants, Classes, Graphics, Controls, Forms, interface unit Unit1; ٙ̚யϠ۞඀ёቅт˭Ĉ ІĂ֭யϠ၆ᑕ۞඀ёቅĄWindows ᑕϡ඀ёۏӘ఺ܑ࣎ॾ۞ᙷҾ̈́ކಏ̮ ϲາ۞૞९ॡĂDelphi ົ೩ֻາ۞ܑॾឰҰ࣒ԼĄ඀ёቅበᏭጡҋજயϠޙ Іۏ ᑭෛ Delphi ΨĄײ ᛳّ̬ࢬĂ׎఼૱Ξ̢࠹̈́ڱϯ̙ТᙷҾࢉϠҋ࠹Тͭ΃ᙷҾͽ͚೯࠹Т͞ ଂ׎΁ᙷҾ(Ⴭࠎ ancestors)ࢉϠ׎ΑਕćᙷҾΞՀԼ׎ᚶٚ۞ҖࠎĄкݭܑ ඀ёనࢍͽᚶٚ(inheritance)̈́кݭ(polymorphism)ࠎপҒĄᚶܑٚϯᙷҾ ྅ĂᙷҾጱШދ˞྅(encapsulation)Ąੵދ૟ྤफ़̈́Αਕ௡ЪҌ˘࣎ಏ̮Ⴭࠎ ඀ёቅĄ۞͌ޝ९ᅮՐĄࡶߏдેҖॡഇࢋԼតᛳّ۞ࣃĂΪᅮᇤᆷ ͽдనࢍॡഇԼតᛳّࣃĂ఺ᇹ̙ᅮᇤᆷ඀ёቅಶΞ࣒ԼᙷҾͽ௑ЪҰ۞૞ І̝ᛳّΞۏ к DelphiޝІ̝̚ྤफ़̮৵Ξ౅࿅ᛳّ(properties)ֽ఍நĄۏ method)Ą)ڱёΨઇ͞בүϡд఺ᙷҾ᛼ҜٙΒӣ۞ྤफ़˯Ą఺ֱ඀Ԕ׶ ё۞඀ёቅĂιࣇົבІᔘѣ඀Ԕ׶ۏҋ̎۞ྤफ़ᙷҾĄ׶੃ᐂ̙Т۞ߏĂ І˵ߏྤफ़̮৵۞ะЪĄಶ׶੃ᐂ˘ᇹĂιࣇ˵ѣ᛼ҜĂՏ࣎᛼Ҝ˵ౌѣۏ फ़̮৵Ą ౌѣιҋ̎۞ྤफ़ᙷҾĄ੃ᐂΞͽᅅᗫ۞ͽಏ˘࣎វ޽Ⴭ˘ཏ࠹ᙯ۞តજྤ फ़۞᛼Ҝ(field)ٙ௡јĂ҃఺ֱ᛼Ҝྤٸ੃ᐂ(ᙷҬ C ۞ struct ඕၹ)ߏϤх Ϊࢋᒢྋ Pascal ۞੃ᐂ(record)ĂಶΞฟؕᒢྋ Delphi ඀ёᄬ֏۞ᙷҾĄ Іሀݭ 4-3ۏֹϡ ᖎಏĂ҃ͷົৌϒ఍ந˘ְֱଐĄ˭ࢬߏ఺ᑕϡ඀ё۞ܑॾĈ ёົдֹϡ۰޷˭޷ตॡԼតܑॾ۞ᗞҒĄ֤ᆃ఺ᑕϡ඀ёᔘߏ఺ᆃ۞ב఺ Ăڱ̙࿅Ă઄నҰдܑॾΐˢ޷ต̮ІĂ֭ആ఺޷ตΐ˯ OnClick ְІ఍ந͞ ĄڱϏΒӣ఍ந׎΁̍үٙᅮࢋ۞ྤफ़᛼Ҝٕ͞إҾ Delphi ᑕϡ඀ёĂΞͽበᛌ֭ેҖĄιΪயϠ˘࣎۩ϨܑॾĂЯࠎ఺ܑॾᙷ ϏΐˢЇң̮ІٕᇤᆷЇң඀ёቅĂҭߏ̏གྷጾѣ˘࣎Ԇፋ۞إᔵ൒Ұ फ़Ă҃Т˘ᙷҾٙѣ۞ᇹּౌֹϡТᇹ۞඀ёቅĄ Әк࣎ᇹּĄՏ࣎ᇹּдҋ̎۞హវइІ̰ᛸ૲ҋ̎۞ྤކҰΞͽ၆ᙷҾ ϲֹϡ۰̬ࢬĄޙ˯ࢬΐ˯̮ІಶΞ Form1 Ⴭү TForm1 ᙷҾ۞ᇹּ(instance)ĄForm1 តᇴ΃ܑܑॾώ֗Ăд఺ Form1: TForm1; var Ә˞˘࣎Ψઇ Form1 ۞តᇴĂιߏາ۞ᙷҾ TForm1Ąކ఺࣎តᇴ Ąڱ҃ TForm1 ۞ቁΒӣٙᚶ̝ٚ᛼Ҝ׶͞ ఺ֱྤੈĂזӘ̚࠻̙ކĄӈֹҰдᙷҾ(ڱາᙷҾ۞͞)ڱЇңְІ఍ந͞ ĂЯࠎᔘ՟ѣд఺ܑॾΐˢЇң̮І(າᙷҾ۞᛼Ҝ)Ă˵ᔘ՟ѣயϠڱٕ͞ ϫ݈ࠎͤĂTForm1 ᙷҾҬͼ֭՟ѣΒӣ᛼ҜזቅߏүϡдᙷҾ۞ྤफ़˯Ą Ă఺ֱ඀ёڱည੃ᐂĂЯࠎιࣇౌΒӣྤफ़᛼ҜĂҭߏᙷҾᔘΒӣ͞ޝᙷҾ າ۞ᙷҾߏ TForm1ĂߏϤᙷҾ TForm ᚶٚ˭ֽĂι˵ߏ࣎ᙷҾĄ end. { implementation ొЊ׶ಏ̮ඕՁ } {$R *.DFM} implementation { implementation ొЊฟؕ } Form1: TForm1; var ᄃ඀ёనࢍ͘Ίܝ4-4 ˢ implementation Form1: TForm1; var end; { Public declaration } public { Private declaration } private Ә }ކڱ procedure Button1Click(Sender: TObject); { າ۞͞ Button1: TButton; { າ۞ྤफ़᛼Ҝ } TForm1 = class(TForm) type Dialogs; uses Windows, Massages, SysUtils, Variants, Classes, Graphics, Controls, Forms, interface unit Unit1; ۞඀ёቅĈ т˭זϲͽ˯఺࣎ᑕϡ඀ёĂҰ૟ົ࠻ޙӘಶົΐˢ˘࣎᛼ҜĄҰކ۞ᙷҾ ̮࣎ІĂܑॾ˘ٸІĄՏ༊Ұдܑॾ˯ཉۏӘ̚Βӣ׎ιކІΞͽдᙷҾۏ ;end Form1.Color := clGreen; begin procedure TForm1.Button1Click(Sender: TObject); ඀ёቅĈ۞ڱ͞ ༊ֹϡ۰޷˭޷ตĂܑॾ۞ᗞҒົតјქҒĄ఺ߏ޷ต۞ OnClick ְІ఍ந ဦ4.1 ˘࣎ᖎಏ۞ܑॾ Іሀݭ 4-5ۏֹϡ implementation ColorBox: TColorBox; { ଂ Form1 តࠎ ColorWindow } var end; { Public declaration } public { Private declaration } private procedure Button1Click(Sender: TObject); Button1: TButton; TColorBox = class(TForm) { ଂ TForm1 តࠎ TColorWindow } type uses Windows, Classes, Graphics, Forms, Controls, Dialogs; interface unit Unit1; ቅ̚: Ă఺࣎າЩჍົͅᑕдܑॾᑫ९(.DFM ٕ.XFM)ͽ̈́ IDE ҋજயϠ۞඀ёޢ ІᑭෛጡԼјາ۞ЩჍۏࣃ Form1 Լࠎྵѣຍཌྷ۞ ColorWindowĄ༊Ұ౅࿅ ІᑭෛጡĄּтĂҰΞਕຐ૟ܑॾЩჍଂ࿰నۏԼត̮І۞ЩჍᑕྍࢋӀϡ Լត̮І۞ЩჍ ৌϒ඀ёቅߏ΍னд඀ёಏ̮۞ implementation ొЊĄ۞ڱ͞ ӘొЊ̰ĄButton1ClickކӘдTForm1ᙷҾ۞ކĈButton1Click඀ԔĂιົڱ͞ Ąனд TForm1 ᙷҾົΒӣ˘࣎າ۞ڱӘ˘࣎͞ކĂдܑॾᙷҾ̚ಶົڱ͞ ĄՏ༊யϠ˘ְ࣎І఍நڱІ۞͞ۏߏܑॾౌڱд IDE ٙ̚ѣ۞ְІ఍ந͞ ІĄۏตĄTButton ߏ࣎ᙷҾĂٙͽ Button1 ߏ˘࣎ ఺࣎າ۞ TForm1 ᙷҾனдົѣ࣎ Button1 ᛼ҜĂ఺ಶߏҰдܑॾΐˢ۞޷ end. end; Form1.Color := clGreen; begin ඀ёቅ }۞ڱprocedure TForm1.Button1Click(Sender: TObject); { າ͞ R *.DFM}$} ᄃ඀ёనࢍ͘Ίܝ4-6 ˢ ᙷҾĄ ЧีᛳّඈĄ˘࣎ᙷҾΪਕѣ˘࣎ۡତ۞ͭᙷҾĂҭߏΞͽѣк࣎ۡତ۞̄ ЕĂΒ߁ TForm ଂι۞ͭᙷҾٙᚶٚ۞ܑ۞ڱι۞ᛳّăְІ׶͞זΞͽ࠻ ͛Іߤྙ TFormĂځઇ̄ᙷҾĂιଂ̝ࢉϠ۞ᙷҾΨઇͭᙷҾĄࡶߏдቢ˯ᄲ ĄࢉϠ۞ᙷҾΨڱࢉϠ۞ᙷҾଂιࢉϠ۞ᙷҾᚶٚٙѣ۞ᛳّăְІă׶͞ TForm1 = class(TForm) ଂ TForm ࢉϠາ۞ܑॾĈ ĄАଂனх۞ࢉϠ΍າ۞ᙷҾĂд૞९̰ΐˢາܑॾॡĂIDE ົҋજڱந͞ TForm ᙷҾฟؕᆧࢎ˘࣎າᙷҾĂΐˢ˘ֱ̮ІĂԼតᛳّࣃĂᇤᆷְІ఍ Ą༊Ұд૞९̰ΐˢາ۞ܑॾॡĂҰߏଂڱ̮І Tform ٙѣ۞ᛳّ׶͞ Document Interface)ᑕϡ඀ё۞˘ొЊĄΞͽԆј఺ְֱߏЯࠎ఺ܑॾᚶٚ ̂̈ĂΐˢٕӁੵ౵̼̈׶౵̼̂޷ตĂٕߏనؠ఺ܑॾјࠎ MDI(Multiple Button1ClickĂ҃՟ѣЇңᛳّĄҭߏҰΞͽԼតܑॾ۞ ڱButton1â࣎͞ ᖎಏĄTForm1 ΪΒӣ˘࣎᛼Ҝޝ݈ࢬೡࢗ۞ TForm1 ᙷҾ˵ధ࠻੓ֽ ଂᙷҾᚶٚྤफ़׶඀ёቅ end; ColorBox.Color := clGreen; begin procedure TColorBox.Button1Click(Sender: TObject); ёቅԼј఺ᇹĈ በᛌĄည఺ଐԛࢋ૟඀ڱ၆఺ܑॾ۞ણ҂ĄࡶߏҰ՟ѣ࣒ϒĂ఺඀ёቅಶ൑ ߏҰᇤᆷ۞඀ёቅĂЯѩдҰԼតܑॾ۞ЩჍॡĂυืҋ̎Հາ࣒֭ϒЇң ඀ёቅ֭՟ѣԼតĄЯࠎ఺۞ڱຍҰആ޷ตᇤᆷ۞ OnClick ְІ఍ந͞ڦኛ end. end; Form1.Color := clGreen; { Form1 ۞ણ҂ϏԼតĊ } begin procedure TColorBox.Button1Click(Sender: TObject); R *.DFM}$} Іሀݭ 4-7ۏֹϡ Form1 ׶ Form2 ۞඀ёಏ̶̮Ҿߏ Unit1 ׶ Unit2)۞ uses ̄ή̰ΐ˯ Unit2Ą ׶ְІĂᅮࢋд Unit1(઄నڱForm2 ۞ᛳّă͞ פࢋឰ Form1 ۞඀ёቅх Form2.Edit1.Clear; ĄּтĂڱΩ˘ܑॾ۞̮І͞פĂ˵Ξͽхڱͽ࠹Т۞͞ Form2.Edit1.Color := clLime; ߙܑ࣎ॾ۞̮ІĂᅮࢋࢨؠ̮І۞ЩჍĂּт఺ᇹēפᑫх IDE ົആՏܑ࣎ॾயϠ፾ϲ۞඀ёಏ̮(඀ёቅ)ĄࡶߏࢋଂΩ˘ܑॾ۞ಏ̮ Әٙд۞ܑॾ)ĂЯѩιᅮࢋΐ˯ࢨؠෟĄކڱІ఍ந͞ TEdit ᙷҾ۞ Color ᛳّ(̙ߏְ זҜ݈ࢬౌΞͽ࠷ரࢨؠෟĄௐ˟Җ޽΄ϡ ׶᛼ڱTForm1 ᙷҾ۞ቑಛ̰ĄΪࢋߏдᙷҾ۞ቑಛ̰Ă఺ᙷҾ۞ᛳّă͞ ߏдڱ͞ ҭߏд Color ᛳّ݈ࢬΐ˯ Form1 ߏ̙υࢋ۞ĂЯࠎ Button1Click Form1.Color := clFuchsia ௐ˘Җ޽΄Լតܑॾ۞ᗞҒĄҰΞਕົԯιᆷј఺ᇹĈ end; Edit1.Color := clLime; Color := clFuchsia; begin procedure TForm1.Button1Click(Sender: TObject); Ĉڱ͞ ޷ต׶በᏭ͞๴ĂΞͽആ޷ต۞ OnClick ְІᇤᆷ఺ְ࣎І఍ந˯ٸ۞ܑॾ ІЩჍĄּтĂࡶߏдາۏٕ᛼ҜĂ̙֭ᅮࢋд఺ֱᙊҾф݈ࢬΐ˯ᙷҾ۞ ăڱᙷҾώ֗۞ᛳّă͞זᇤᆷ඀ёቅĂֹϡ̰ڱ༊ҰдᙷҾ۞ְІ఍ந͞ ӘડાĄކӘдᙷҾ۞ކ̰ĂЯࠎιࣇ ᔘߏдᙷҾ۞ቑಛڱёቅߏд඀ёಏ̮۞ implementation ొЊĂ఺ֱ͞ ඀۞ڱĄᔵ൒͞פӘ۞ٙѣјࣶΞϤᙷҾώ֗׶ι۞ࢉϠᙷҾхކӘડ̰ކ ĄдᙷҾّפΞϡّ׶Ξх۞ڱቑಛ(Scope)ՙؠᙷҾ۞ྤफ़᛼Ҝăᛳّă͞ ቑಛ׶ࢨؠෟ ᄃ඀ёనࢍ͘Ίܝ4-8 ˢ Іᑭෛጡ̰Ąۏॡഇ΍னд ϲેҖॡഇᙷҾྤੈĄpublished јࣶົдనࢍޙጡົആ published јࣶ published ᛳّᄃְІĄјࣶ׶ public јࣶѣ࠹Т۞Ξ֍ّĂҭߏበᛌ ӘΞͽдనࢍॡഇކᚶٚҋ TPersistent ۞ᙷҾĂpublished ᆸ৺̚ٺy ၆ ᛳّĄٕڱ͞(۞ published Ąprivate ј఼ࣶ૱ߏϡֽ၁ү׎΁(public ٕڱ఺ֱ᛼Ҝ̈́͞פΞх ĄΪѣᙷҾώ̖֗ڱ౵ᚑࡳ۞᛼Ҝ̈́͞טࢨפӘ۞ߏхކy private ડ߱̚ ΃ᙷҾ۞ಏ̮ĄޢĂ̙ኢ׎ڱ఺ֱ᛼Ҝ̈́͞פ΃ᙷҾ̖Ξхޢ֗̈́׎ ĄΪѣᙷҾώڱ᛼Ҝ̈́͞۞טࢨפӘ۞ߏΐ˯ొ̶хކy protected ડ߱̚ ĄפӘ۞ᙷҾٕߏֹϡ఺ಏ̮۞Їңಏ̮ౌΞхކಶߏᄲĂଂ˵—פ Ąpublic јࣶΞͽଂЇ˘யϠ۞ᙷҾхڱ఺ֱјࣶᄃ͞פगᙷҾӮΞх Іٕ̄ۏĂЇңڱ᛼Ҝ̈́͞۞טࢨפӘ۞ߏ՟ѣЇңхކy public ડ߱̚ end; {private methods} {private fields} private {protected methods} {protected fields} protected {public methods} {public fields} public TClassName = Class(TObject) Type ΞਕΒӣˬҌα჌Ξෛᆸ৺۞ડ߱ē(ڱӘ(т᛼Ҝٕ͞ކᙷҾ۞јࣶ Әކ privateĂprotectedĂpublic ׶ published ኛણ҂ĶDelphi ඀ёᄬ֏͘ΊķĄڱІቑಛăᚶٚᄃ uses ̄ή۞ᄬۏٺᙯ (override)ࣧѣ۞јࣶĄ ӘјࣶΞਕᔳትٕᖬྶކĄࢦኑڱӘ̏ѣ۞᛼ҜĂᛳّ̈́͞ކᙷҾ̚ࢦາ ΃ޢІĄ൒҃ҰᔘߏΞͽдۏ΃ᙷҾ̈́ޢІ۞ቑಛΞؼणҌྍᙷҾ۞ٙѣۏ Іሀݭ 4-9ۏֹϡ జ޽ؠගົีט޽ؠ۞඀ёቅĂ൴Ϡ఺ְ࣎І۞̮ІٕଠזҰ՟ѣ࠻ Яࠎ Sender ߏ TObject ᙷҾĂٙͽЇң׎΁ᙷҾౌΞͽ޽ؠග SenderĄᔵ൒ end; begin procedure TForm1.Button1Click(Sender: TObject); ѣ TObject ᙷҾ۞ Sender ણᇴĈౌڱĄՏְ࣎І఍ந͞ڱOnClick ְІ఍ந͞ ΨײĄ༊޷ตజ޷˭ॡĂಶົڱ઄నԧࣇࢋᇤᆷ޷ต۞ OnClick ְІ఍ந͞ AForm := SimpleForm; Ĉ۞ڱߏ TForm ۞ࢉϠᙷҾĂ఺ᇹ۞޽ؠߏЪ AForm ߏ TFormᙷҾĂSimpleForm ݋ߏ TSimpleFormᙷ ҾĄЯ ࠎ TSimpleForm SimpleForm: TSimpleForm; AForm: TForm; var end; Ә }ކ { public public Ә }ކ { ռϡ private Edit1: TEdit; Button1: TButton; TSimpleForm = class(TForm) type Ә׌࣎តᇴĂAForm ׶ SimpleĈކӘડ̰ކдតᇴ ӘĂކгซҖ޽ࠁĄּтĂͽ˭ߏ TSimpleForm ۞ᙷҾڱͭ΃ᙷҾĂ˵ΞͽЪ Іតᇴតᇴ۞ۏІតᇴߏࢋజ޽ࠁ۞ۏΞ࠹ट۞޽ؠĄѩγĂࡶҰࢋ޽ؠ۞ ІតᇴĂΪࢋ఺ֱតᇴߏ࠹Т۞ᙷҾĂٕߏۏІតᇴࠎΩ˘࣎ۏҰΞͽ޽ؠ Іតᇴۏֹϡ Ξ֍ّ۞ྤੈĂኛણ֍ĶDelphi ඀ёᄬ֏͘ΊķĄٺՀкᙯ ٕߏ published ᙯᔣф޽ؠјࣶ۞Ξ֍ّĄ ॡĂາјࣶΞ౅࿅ privateăprotectedăpublicăڱӘ᛼Ҝăᛳّăٕ͞ކд ᄃ඀ёనࢍ͘Ίܝ4-10 ˢ Employee := TEmployee.Create; oyee: TEmployee; begin Empl var TObject ᚶٚ۞ Create ͽயϠ Temployee ᇹּ: ΨଂײޢӘĂ൒ކĄΞͽдಏ̮۞ interface ٕ implementation ొ̶఺ᇹڱ ͞۞ ĂTEmployee ˵ᚶٚٙѣ TObjectڱੵ˞Ұ̏གྷؠཌྷ۞᛼Ҝăᛳّă׶͞ end; function CalculatePay: Double; property HourlyPayRate: Double read FHourlyPayRate write FHourlyPayRate; property Title: string read FTitle write FTitle; property Name: string read FName write FName; public rlyPayRate: Double; FHou FTitle: string; FName: string; private TEmployee = class(TObject) type Әົߏ఺ᇹĈކІۏ TEmployee HourlyPayRate ᛼Ҝ۞ྤफ़ࢍზߙ߱ഇม̰ᅮࢋග;۞ᓟྤĄ Ăϡڱ͞ ІĄ౵рᔘΒ߁ CalculatePayۏ HourlyPayRate ᛼Ҝ۞ TEmployee ѣॡ࣏ҰົຐࢋயϠҋ̎۞ᙷҾĄּтâ࣎Βӣ Name ă Title ׶ ϡĄ ׶ Data Source ̮ІĂдેҖॡഇౌ̙ົ΍னĂҭߏιࣇΞͽឰᑕϡ඀ёֹ ІĂҭߏдેҖॡഇ݋ົ΍னĄᔘѣ׎΁̮ІĂּтࢍॡጡ̮۞זॡഇ࠻̙ ІĂּт޷ต̈́በᏭ͞๴Ąѣ˘ֱ̮ІĂּт఼ϡ၆ྖ͞๴Ăߏдనࢍ̮۞ זІౌߏΞͽдనࢍॡഇ׶ેҖॡഇ࠻଀ۏ̂ొЊдܑಏనࢍ̍׍ֹ̰ϡ۞ ІۏϲĂயϠᇹּĂ׶ঐໝޙ ; DoSomethingElse else DoSomething if Sender is TEdit then ᙷҾĄּтĂ۞ีטis ീྏ Sender ͽՙؠ̮Іٕଠ ĄΞͽϡܲ঻фีטSenderĄ఺΃ܑ Sender ۞ࣃົͅᑕ൴ϠְІ۞̮Іٕଠ Іሀݭ 4-11ۏֹϡ Ăኬᄃາ۞ਕ˧ĄڱĂᖬྶࣧѣ۞͞ڱӘາ۞͞ކ̚ Ąଋ˵ΞͽдາᙷҾڱ࠰Ξ൑୧Іᒔ଀׎ͭᙷҾ̈́য়АᙷҾ۞ٙѣ᛼Ҝ̈́͞ ϲᙷҾ۞р఍ߏĂଋΞͽϤனх۞ߙ࣎ᙷҾࢉϠι۞̄ᙷҾĄՏ࣎̄ᙷҾޙ ΃ᙷҾ(ۡତٕมତ)Ąޢ۞ ϲ۞ᙷҾ˘ؠߏ TObjectޙϲᙷҾĄଋٙޙࢋҋҖ ІጱШ඀ёॡĂᔘߏໂΞਕᅮۏᔵ൒ Delphi ۞̏ΒӣధкᙷҾĂҭଋдᇤᆷ ؠཌྷາᙷҾ ఺ᙷҾĄٸTCollection ᙷҾ(ӈֹιాඕ˯ߙܑ࣎ॾ)ĂҰυื࢑యᛖ TComponent ׶ι۞̄गĄࡶߏயϠည TStringList ٕ ٺጾѣᝋΪүϡ Ąٸົజᛖ ٙጾѣĄЯѩ༊ᑕϡ඀ёඕՁĂٙѣ۞ܑॾ׶дιࣇ˯ࢬ۞̮І۞੃ጸវౌ Ăܑॾጾѣٙѣдι˯ࢬ۞̮ІĂܑॾ݋Ϥᑕϡ඀ё˭ڶણᇴՙؠĄ࿰నଐ ۞ڱၹ͞ޙĄ̮І۞ጾѣ۰—Ϥ Owner ᛳّ۞ࣃ—ߏϤயϠ఺̮Іॡ็ˢٸ ॡజጾѣ۰۞̮І۞੃ጸវົҋજజᛖٸ۰Ą༊ጾѣ۰۞੃ጸវజᛖޢጾѣ Ҿ۞̮ІĄԧࣇົჍ݈۰ٸΞͽឰ̮І࢑యᛖט੃ጸវგந፟ޙ̰۞ Delphi ̮І׶ጾѣᝋ ࠎι੨ཉ۞੃ጸវĄٸІ֭ᛖۏ ົঐໝ Employee Employee.Free; Іߏӎ̪хдĄּтĂۏΨ Destroy ̝݈Аᑭߤ఺ײᚶٚ˭ֽ)ĂЯ ࠎ Free ົд ߏଂ TObject˵)ڱ͞ Ψ FreeײІĂᑕྍۏĄҭߏࢋঐໝߙ(ڱჍࠎྋၹ͞)ڱ͞ Іౌଂ TObject ᚶٚ DestroyۏІᇹּĂҰಶυื࢑య୻ੵιࣇĄՏ࣎ۏயϠ Ұᇤᆷҋ̎۞඀ёቅֽڍϲ׶ঐໝܑॾ˯ࢬ۞̮ІĄҭߏтޙDelphi ົҋજ І۞ણ໰ҜӬĄۏа఺ Іᇹּ֭็ۏconstructor)Ąιົ੨ཉ੃ጸវගາ۞)ڱၹ͞ޙჍࠎڱ͞ Create end; ᄃ඀ёనࢍ͘Ίܝ4-12 ˢ property Size: Integer; type TMyButton = class(TButton) ּтĈ TMyClass = class(TParentClass); { ଂ TParent ᙷҾᚶٚ } ࡶଋԓ୕າᙷҾᚶٚҌߙ˘পؠᙷҾĂυืдᙷҾؠཌྷ̚޽ؠē M M ΃ᙷҾ }ޢ published { ࡶѩᙷҾߏ TPersistent M M private M M public TMyClass = Class; { ఺ܑϯѩᙷҾϤ TObject ᚶٚ } ІĄְ̈́ڱ͞ ӘĄଋυืдѩΐˢᙷҾٙѣ۞តᇴăᛳّăކ3 д type ડ߱̚ĂᇤᆷᙷҾ 2 д඀ёಏ̮۞ interface ડ߱ΐˢЪዋ۞ uses clause ̈́ type ડ߱Ą ӘᙷҾ۞඀ёಏ̮Ąކϲଋຐࢋޙ ֽ File | New | Unit פᏴޢϲ˘࣎૞९Ă൒ޙ1 дፋЪᒖဩ̚ĂАฟୁٕ ࡶࢋؠཌྷ˘࣎າᙷҾē Ąڱၹ̈́ྋၹ͞ޙĂΒ߁౵ૄᖂ۞ڱώ۞͞ૄޝֱ˘ ˞ࡶ՟ѣ޽ؠͭᙷҾЩჍĂ֤ᆃѩᙷҾ૟Ϥ TObject ᙷҾᚶٚĄTObject ೩ֻ end; {private methods} {private fields} private {protected methods} {protected fields} protected {public methods} {public fields} public TClassName = Class(TParentClass) Type Ә͞ёт˭ēކᚶٚາᙷҾ۞׏ݭ Іሀݭ 4-13ۏֹϡ end; end; DoSomething; FSize := Value; begin if FSize <> Value then begin procedure TMyButton.SetSize(const Value: Integer); end; Beep; begin procedure TMyButton.DoSomething; { TMyButton } ॡ൴΍ᓏᜩĂኛԯ Beep ඀Ԕΐд begin ׶ end ܲ঻ф̝มĄڱ ͞ Ψ DoSomethingײ၁ү඀ёቅĄּтĂଋΞͽឰѩ޷ตд۞ڱ5 Ԇј͞ end; FSize := Value; begin procedure TMyButton.SetSize(const Value: Integer); end; begin procedure TMyButton.DoSomething; { TMyButton } ѩಏ̮۞ implementation ડ߱̚ĄזТॡ˵ົ૟˭ࢗ۞඀ёቅΐ procedure SetSize(const Value: Integer); FSize: Integer; private procedure DoSomething; property Size: Integer read FSize write SetSize; type TMyButton = class(TButton) Әēކ۞ SetSize ڱSize ᛳّΐ˯᛼Ҝͽ̈́ᛳّᆷˢ͞ ӘࠎּĂࡶଋֹϡ class completion ΑਕĂDelphi ૟ࠎކͽ˯ᐝ۞ᙷҾ ӘĄކ۞ڱ͞ ώ̙͚೯ѩΑਕĂଋΪр͘જԆј఺ֱᛳّ̈́ۍ Ąࡶଋ۞ Delphiڱٕ͞ ӘԆБ۞ᛳّކϏإCursor ีϫ)ĄDelphi ૟ҋજࠎଋԆјٙѣѩᙷҾ Complete Class at פ޷˭ Ctrl+Shift+C ሤᔣ(ٕ޷໣ဂΠᔣĂᏴޢӘ̚Ă൒ ކᙷҾٺώ͚೯ class completion Αਕ:ኛ૟͛фഫᇾཉۍ 4 ࡶଋ۞ Delphi end; procedure DoSomething; ᄃ඀ёనࢍ͘Ίܝ4-14 ˢ procedure Cut; procedure Copy; TEditor = class(TInterfacedObject, IEdit) Ĉڱ̬ࢬٙѣ͞ Әд׎ͭ΃୻ಏ۞̬ࢬĂ޽΍׎૟၁үކࠎ˞၁үᙷҾĂଋυᅮؠཌྷᙷҾͽ ଀ιĄפᙷҾ тТ٩෪ᙷҾĂ̬ࢬώ֗ϖᅈ̙Ξజ၁វ̼Ąࠎ˞ֹϡ̬ࢬĂଋᅮࢋଂ၁ү end; function Undo: Boolean; procedure Paste; procedure Cut; procedure Copy; IEdit = interface type Ә̬ࢬ۞ᖎಏቑּĈކពϯ˞˘࣎˭غ ;end procedure MyProcedure; IMyObject = interface т˭ĈڱӘ۞ᄬކٕᑫ९̚Ą̬ࢬ ᐼхડાăҚ߹(stream)זၗېІۏࣧݭ(prototypes)ֽྶˢᄃᐼхڱҾ۞͞ ࢬĂՏ˘࣎ᙷҾౌؠཌྷপ̬غТᇹгĂIPersist ̬ࢬ૟үࠎࢉϠᙷҾ۞˘ਠૄ ׻ЩĂ֭ͷ݄˯˘࣎̂ᆷ IĄּ т IMalloc ̬ࢬ૟ົ੨ཉăᛖ΍֭გந੃ጸវĄ ទᏭ҃֏ߏϡֽ޽΍̬ࢬ۞ϡ౉Ą఼૱̬ࢬౌົॲፂιࣇ۞ྻү͞ёٕ҃ڱ ಶᄬڱؠཌྷΒӣ˞ણᇴ۞࣎ᇴ׶ݭၗă็аݭၗ׶࿰ഇ۞ྻү͞ёĄ̬ࢬ͞ ڱቁΑਕؠཌྷ۞ᙷҾĄᚑॾֽᄲĂ̬ࢬ͞ځ׶ڱ̬ࢬಶည˘࣎ΪΒӣ٩෪͞ Ąט۞፟ ఺ᇹזĂΪѣ̬ࢬਕ྿ڱଋຐࢋឰາᙷҾТॡ׍ѣ̙ТᙷҾ̝ᛳّᄃ͞ڍт Delphi ߏଳϡಏ˘ᚶٚ۞ᄬ֏Ă˵ಶߏᄲЇңᙷҾΪѣ˘࣎ۡତ۞ͭᙷҾĄ ֹϡ̬ࢬ Ăᄬ֏ؠཌྷ̈́ఢ݋ĂኛણዦĶDelphi ඀ёᄬ֏͘ΊķĄڱӘᄬކᙷҾ۞ٺᙯ Լត޷ต͎̇ॡĂ޷ต˵ົ൴΍ᓏᜩĄֽڱ͞ Ψ SetSizeײኛ঻ຍ༊ଋ Іሀݭ 4-15ۏֹϡ end; Painter.Paint; Painter := TCircle.Create; Painter.Paint; Painter := TSquare.Create; begin Painter: IPaint; var ٙϯĈ˭غ۞޽ؠĂт ̙გ఺׌࣎ᙷҾߏӎВϡТ˘࣎ͭ΃ᙷҾĂιࣇౌߏᄃ IPaint ݭၗតᇴ࠹ट end; procedure Paint; TCircle = class(TCustomShape, IPaint) end; procedure Paint; TSquare = class(TPolygonObject, IPaint) ఺׌࣎ᙷҾĂ˭غͽ̈́ end; procedure Paint; IPaint = interface тଋΞͽ҂ณ˭Е̬ࢬĈ ĄּڱΨТ˘࣎͞ײІĂΪࢋιࣇ၁ү࠹Т۞̬ࢬĂಶΞͽֹϡкݭֽۏ۞ ᙷҾĄӈֹߏ̙࠹̒غҾΞͽВϡ࠹Т۞̬ࢬĂ֭ͷ̙ᅮࢋࢉϠҋТ˘࣎ૄ ̬ࢬ۞ֹϡ೩ֻ˞˘࣎૟ᙷҾ۞ֹϡ׶ᙷҾ۞၁ү̶ฟ۞నࢍ͞ШĄ׌࣎ᙷ дᙷҾ̝มВϡ̬ࢬ Ăᄬ֏ؠཌྷ̈́ఢ݋ĂኛણዦĶDelphi ඀ёᄬ֏͘ΊķĄڱӘᄬކࢬ۞̬ٺᙯ Їңι۞၁үౌߏ˘ᇹ۞Ąٺ׶ֹϡ̬ࢬ၆פݭ(polymorphic)Ă˵ಶߏᄲх (implementation)͞ёĄΪࢋᙷҾ۞၁үᏲೈ̬ࢬ۞ؠཌྷĂ̬ࢬಶԆБߏк үᄃֹϡ͞ёĂιࣇ֭՟ѣؠཌྷ၁үྻ۞ڱ͞˞ᔵ൒̬ࢬؠཌྷ end; function Undo: Boolean; procedure Paste; ᄃ඀ёనࢍ͘Ίܝ4-16 ˢ end; Rotaters[I].Rotate(Degrees); for I := Low(Rotaters) to High(Rotaters) do begin I: Integer; var procedure RotateObjects(Degrees: Integer; Rotaters: array of IRotate); end; Painters[I].Paint; for I := Low(Painters) to High(Painters) do begin I: Integer; var procedure PaintObjects(Painters: array of IPaint); ᙷҾ̚ࢉϠ΍ֽĄ౅࿅˯ࢗ۞ IPaint ׶ IRotate ̬ࢬĂଋΞͽበᆷ˭Е඀ԔĂ غІଂপҾ۞ૄۏІĂ̙҃ϡࢋՐۏ̬ࢬ˵Ξឰଋበᆷ˘ਠّ۞඀Ԕֽ఍ந д඀Ԕֹ̚ϡ̬ࢬ І۞੃ጸវგநķ̈༼Ąۏ۞Ķ၁ү IInterfaceķ׶дௐ4-21ࢱ۞Ķ̬ࢬ ĄࡶᅮࢋՀྎ௟۞ྤੈĂኛણዦдௐ4-17ࢱڱ̝͞ ̬ࢬВТͭᙷҾ IInterface ᙷҾٕͭ΃ᙷҾ̏གྷ၁ү˞ૄώغૄ (ො ఺ֱּ̄ౌ઄న˞ۡր (immediate ႕๪ԛ̰ొ۞ဦᇹĂ̙҃ᅮࢋ୊ᖼᖎಏ۞๪ԛĄ ୊ᖼϡֽ๱ܮϲ˘࣎ TFilledCircle ᙷҾֽ၁ү IRotate ̬ࢬĂͽޙଋΞͽޢൾ end; procedure Paint; TCircle = class(TCustomShape, IPaint) end; procedure Rotate(Degrees: Integer); procedure Paint; TSquare = class(TRectangularObject, IPaint, IRotate) ๪ԛĂЯѩᙷҾ૟т˭ٙϯĈٺ৏ԛĂ̙҃ዋϡٺιዋϡ end; procedure Rotate(Degrees: Integer); IRotate = interface ΃Ą̙࿅ኛ҂ณ˭ࢬ఺̬࣎ࢬĈפົజ TFigure ٙ Ąͽ˯۞ IPaintڱ͞ PaintĄTCircle ׶ TSquare ౌົᖬᄏ Paint ڱ࣎෍ᑢ͞ ఺ΞͽᖣϤឰ TCircle ׶ TSquare ࢉϠҋ TFigure ҃྿јĂTFigure ၁ү˞˘ Іሀݭ 4-17ۏֹϡ TInterfacedObject = class(TObject, IInterface) type System ಏ̮̚Ăт˭ٙϯĈ ٺӘކĄTInterfacedObject ᙷҾڱ͞۞ ĂЯࠎι၁ү˞ IInterfaceغૄ۞ܮ ຐࢋؠཌྷ˘͚࣎೯˘ีٕкี̬ࢬ̝ᙷҾĂTInterfacedObject Ξүࠎ˘࣎͞ TInterfacedObject ĄڱቁߏȈ̶ѣϡ۞͞ Ă఺۞טঐ̬ࢬ۞ણ҂ࢍᇴ፟פඈඈĄࡶຐࢋטঐણ҂ࢍᇴ፟פٕטგந፟ І೩ֻΩ˘჌̙Т۞Ϡ׻ฉഇۏ၁үĂଋΞͽࠎ۞ڱᖣϤҋҖ೩ֻ఺ˬ࣎͞ ၁үĄڱӘ̬ࢬ۞͞ކҾٙ̚ Ą̙࿅ଋ˵ΞͽᚶٚᙷڱӘ۞ٙѣ͞ކĂ׶̬ࢬώ֗ٙڱӘ۞ٙѣ͞ކࢬٙ Ăͽ̈́׎΁ͭ΃ᙷҾ̬ڱ͞ Տ࣎၁ү̬ࢬ۞ᙷҾౌυื၁ү఺ˬ࣎ IInterface ІĄۏ۞ ˭غՙؠӁੵҋ̎ߏӎщБĄ༊ણ҂ࢍᇴតј࿬ॡĂ̬ࢬ၁ү૟ᛖ΍ι І੠ᖸιҋ̎۞Ϡ׻ഇมĂ֭ۏឰܮy _Release ૟׶_AddRef ˘੓ֹϡĂͽ Іౌυืхд੃ጸវ̚ĄۏྍࢍᇴĄΪࢋણ҂ࢍᇴ̙ߏ࿬Ă Ψ QueryInterface јΑॡౌົᆧΐײĂՏѨڱy _AddRef ߏ˘࣎ણ҂ࢍᇴ͞ ଀̬ࢬણ໰Ąפ͚೯۞̬ࢬ ІۏІĂ֭ആۏĂឰଋજၗгߤྙගؠ۞ڱy QueryInterface ೩ֻ˞˘࣎͞ ϲ੓ֽ۞Ĉޙڱ͞ Ϡ׻׹ഇგநĄ఺ֱΑਕߏϤˬ࣎ IInterface IInterface ̬ࢬĄ఺̬࣎ࢬ೩ֻ˞̬ࢬ۞ૄώΑਕĂ˵ಶߏજၗߤྙ׶ ٺ໚ҋ ІӮۡତٕมତᚶٚҋ TObjectĂٙѣ۞̬ࢬౌߏۡତٕมତۏಶтТٙѣ۞ ၁ү IInterface Ąھᇃ Іϡ౉ՀۏΞឰ఺ֱڱІۢ྽тң୊ᖼĄͧ੓Ϊ఍ந TFigure ᙷҾĂ˯ࢗᆷ ۏІۢ྽тңҋҖᘱဦĂ҃ PaintObjects ˵̙ࢋՐۏRotateObjects ̙֭ࢋՐ ᄃ඀ёనࢍ͘Ίܝ4-18 ˢ Ă૟ P ޽ؠڶ(resolves) ј IPaint ણ໰ĂٕߏயϠ˘ּ࣎γĄ̙გߏࣹ჌ଐ Әݭၗ଀ۢ P ۞ᇹּߏӎ͚೯ IPaintĄдેҖഇมĂP Ξਕົྻზᖼ̼ކ۞ ଂ PڱĂЯࠎበᛌ඀ё൑ڱ͞ Ψ P ۞ IInterface ̬ࢬ۞ QueryInterfaceײቅֽ ఺࣎޽ؠĂበᛌ඀ё૟யϠ඀ёٺણ໰Ąજၗᘭඕឰ఺࣎޽ؠјࠎΞਕĄ၆ ݭၗࠎ TInterfacedObject ۞តᇴ P Ξͽ޽ؠගតᇴ XĂιߏ˘࣎ IPaint ̬ࢬ end; { āࢗ } X := P as IPaint; begin X: IPaint; var procedure PaintObjects(P: TInterfacedObject) ၁ү̬ࢬ۞ᙷҾΞֹϡ as ྻზ̄үࠎ̬ࢬ̰۞જၗᘭඕĄд˭Е۞ቑּ̚Ĉ ֹϡ as ྻზ̄ ᙷҾĄ۞טTInterfacedObject ۞ણ҂ࢍᇴ፟ ۞੃ጸវგநķĂι˵ົିଋтңҋҖበᆷΞ၁ү̬ࢬăҭ̙Ᏺೈᚶٚҋ ІۏІ۞੃ጸវგநĄࡶᅮࢋซ˘Վ۞ྤੈĂኛણዦдௐ4-21ࢱ۞Ķ̬ࢬۏ ĂTInterfacedObject ົҋજ఍நણ҂ࢍᇴ׶̬ࢬڱ͞ Яࠎι၁ү˞ IInterface end; M TDerived = class(TInterfacedObject, IPaint) type TInterfacedObject ۞ۡତࢉϠᙷҾĂ֭၁ү˘࣎઄నّ۞ IPaint ̬ࢬĄ Ә̚ĂTDerived ߏކۡତࢉϠҋ TInterfacedObject ࠹༊ۡᛇĄд˭Е۞ቑּ end; property RefCount: Integer read FRefCount; class function NewInstance: TObject; override Procedure BeforeDestruction; override; Procedure AfterConstruction; override; public function _Release: Integer; stdcall; function _AddRef: Integer; stdcall; function QueryInterface(const IID: TGUID; out Obj): Integer; stdcall; FRefCount: Integer; protected Іሀݭ 4-19ۏֹϡ ι۞ͭ΃ᙷҾ୻ಏ̚ĄٺΒӣ Ә̬ࢬ͚೯ĄΒӣྍᛳّ۞ᙷҾυื૟̬ࢬކ၁үĂι̙֭ᅮࢋ۞ڱ೩ֻ͞ Іٕ̬ࢬણ໰Ą؎ЇΪᅮࢋۏᛳّᇹּ۞ٺ޽ؠ؎Їගᛳڱֽ૟ྍ̬ࢬ۞͞ ᙷҾݭၗ)ĂଋΞͽֹϡᙯᔣф implements۞ڱࢬݭၗ(ٕ၁ү̬ࢬ̬͞ٺ ᛳّߏᛳڍІĂଋ˵Ξͽֹϡ̬ࢬүࠎᛳّݭၗĄтۏкᙷҾ۞ᛳّߏ̄ޝ ֹϡ implements ֽ؎Ї Іֹϡ֭ពϯ̬ࢬĄۏІ۞̬ࢬ၁ү่Ξ೩ֻගγᆸۏ ჸЪ(aggregation)ߏ౅࿅Βӣᄃ؎Їࢦϡ඀ёቅ۞Ω˘჌͞ёĂჸЪ̰̚ᆸ ІĄۏ඀ёቅֽ૟ٙѣٕొ̶۞̬ࢬ၁ү؎Ї(delegate)Ҍ˘࣎̄ ̬࣎ࢬనࢍĂDelphi ೩ֻ˞˘࣎ᙯᔣф implementsĂιΞឰଋᅅᗫгበᆷ ၗ۞ᛳّүࠎΒӣ(containment)ͽ̈́඀ёቅࢦϡ(reuse)۞͞ёĄࠎ˞͚೯఺ ІݭۏІĄֹϡۏΩ˘࣎ٺІΒӣٕΒӣۏ̬ࢬ඀ёቅࢦϡ۞͞ё̝˘ߏឰ ඀ёቅࢦϡ׶؎Ї GUIDĂኛֹϡ Ctrl+Shift+G ԣిᔣĄ ϲາ۞ޙֹϡ˞ as ྻზ̄Ăιυืѣ˘࣎ IIDĄࡶࢋдࣧؕ඀ёቅ̚ ଋ੫၆̬ࢬڍᙊҾфĄϡֽᙊҾ̬ࢬ۞ GUID Ⴭࠎ̬ࢬᙊҾф(IID)Ąт y ֹϡ IIDĈ̬ࢬΞͽֹϡॲፂ GUID (globally unique identifier).யϠ۞ Ә IInterfaceĄކቁгځ Ә۞̬ࢬ˵ߏ˘ᇹĄᙷҾυืдι۞ͭ΃ᙷҾ୻ಏ̚ކቁځ˞ι˵၁ү ߏ̙ૉ۞Ąӈֹڱ͞ ଋຐࢋֹϡ as ྻү̄ĂЍឰᙷҾ၁ү IInterfaceڍ Ә IInterfaceĈᔵ൒ٙѣ۞̬ࢬౌߏଂ IInterface ࢉϠ΍ֽ۞Ăтކቁгځ y ༊ଋֹϡ as ྻზ̄үࠎ̬ࢬ۞જၗᘭඕĂଋᑕྍᒢྋ˭ЕᅮՐĈ ۞ᙷҾݭၗĄ P ߏ˘࣎՟ѣ၁ү IInterface ٺග X ౌ̙ົயϠበᛌॡഇ᏾ᄱĂЯࠎ఺࠹༊ ᄃ඀ёనࢍ͘Ίܝ4-20 ˢ end. end; Result := RGB(RGB8Intf.Red, RGB8Intf.Green, RGB8Intf.Blue); else Result := PaletteRGB(RGB8Intf.Red, RGB8Intf.Green, RGB8Intf.Blue) if FPalRelative then begin function TRGB8ColorRefAdapter.Color: Integer; end; FRGB8bit := rgb; begin constructor TRGB8ColorRefAdapter.Create(rgb: IRGB8bit); implementation end; function Color: Integer; property PalRelative: Boolean read FPalRelative write FPalRelative; property RGB8Intf: IRGB8bit read FRGB8bit implements IRGB8bit; constructor Create(rgb: IRGB8bit); public FPalRelative: Boolean; FRGB8bit: IRGB8bit; private TRGB8ColorRefAdapter = class(TInterfacedObject, IRGB8bit, IColorRef) { TRGB8ColorRefAdapter ૟ IRGB8bit ၆ᑕҌ IColorRef } end; function Color: Integer; ['{1d76360b-f4f5-11d1-87d4-00c04fb17199}'] IColorRef = interface end; function Blue: Byte; function Green: Byte; function Red: Byte; ['{1d76360a-f4f5-11d1-87d4-00c04fb17199}'] IRGB8bit = interface type Ҝ̮۞ RGB Ғ૾ࣃᖼೱј Color ણ໰Ĉ І۞నࢍ˯ĂιΞ૟ 8ۏቑּ૟ implements ᙯᔣфϡдҒ૾ᖼೱጡ۞˭غ ᖬᄏ఺࣎࿰నྻү͞ё۞͞ёĄ ĂͽүࠎڱӘ͞ކྋՙ̄ήٕڱᙷҾֹ̚ϡ͞۞ڱΞͽдଋ၁ү˘ֱ̬ࢬ͞ Ą̙࿅ଋ˵ڱၗ˭Ăֹϡᙯᔣф implements ૟ົ؎Їٙѣ۞̬ࢬ͞ې࿰న Іሀݭ 4-21ۏֹϡ ᙷҾĄغֹϡ TComObject үࠎૄ ଋϒдበᆷ COM ᑕϡ඀ёĂ˵Ξͽۡତڍ͚࣎೯ะЪវ۞ COM ᙷҾĄт ҾॡĂ˵Ξͽણ҂ TComObject ̚۞ IUnknown ၁ү௟༼ĄTComObject ߏ˘ Ąдበᆷଋҋ̎۞ะЪវᙷځϲะЪវ۞ఢ݋Ăኛણዦ MS ۞ቢ˯ᄲޙѣᙯ UnknownķĄ טІĄγᆸ۞ IInterface ૟ჍࠎĶଠۏΨගγᆸ۞ײ ׶ Release І̚۞̬ࢬĄௐ˟࣎ IInterface ૟ົ؎Ї QueryInterfaceďAddRefۏγᆸ І˵ົആι၁ү۞ٙѣ̬ࢬ၁үௐ˟࣎ IInterfaceĄ఺ֱߏ΍னдۏy ̰ᆸ ϲ੓ֽĄޙϲॡĂΪѣݭၗࠎ IInterface ۞ࢋՐ̬ࢬ̖ਕјΑгޙІజۏ Іݭၗ۞ۏІ۞ᙯܼĄּт༊̰ᆸۏIInterface ۞၁ү૟੠ᖸγᆸ׶̰ᆸ І۞ણ໰ࢍᇴĄۏᆸ̰˞טĂιଠڱ͞ Іώ֗υื၁ү IInterfaceۏy ̰ᆸ Ąڱ͞ υื၁ү׌Ѩ IInterface Іۏቁ۞ఢ݋ֽ၁үֹϡ؎Ї۞ IInterfaceĄ̰ᆸځ˞ะЪវ۞၁үሀёؠཌྷ ֹϡι۞ᙷҾВϡĄ ІᙷҾ۞඀ёቅ˵Ξͽజ׎΁ຐࢋۏ၁үТ˘̬࣎ࢬ۞ᙷҾĄТᇹгĂ̰ᆸ ІᙷҾݭၗϹೱЇңۏІᙷҾΞͽ׶̰ᆸۏĄЯѩγᆸ۞ځ۞၁үԆБߏ౅ ĂιࣇפІ̬ࢬ۞хۏІ೩ֻ˞̰ᆸۏІĂ҃γᆸۏϡ͗ბԆБ̙ۢ྽̰ᆸ І၁ү۞̬ࢬĄۏι၁ү۞̬ࢬĂͽ̈́ٙΒӣ ІΞពϯ̬ࢬĂ఺Βӣ˞ۏІΞͽ၁ү˘ٕ࣎к̬࣎ࢬĂ̙࿅Ϊѣγᆸۏ۞ І૟၁ү˘ٕ࣎к̬࣎ࢬĂ઱˘۞ᅮՐߏιυื၁ү IInterfaceĄ̰ᆸۏᆸ۞ ၁ү۞௟༼ĄдะЪវ̚ĂγזІ࠻̙ۏĂ̙࿅఺ົឰ۞זІઇۏΑਕ۞̄ ІۏჸЪ(Aggregation)೩ֻ˞඀ёቅГϡ۞ሀ௡̼͞ёĂιߏ౅࿅ؠཌྷΒӣ ჸЪ ዦĶDelphi ඀ёᄬ֏͘ΊķĄ ă၁ү௟༼ͽ̈́ implements ᙯᔣфᄬ֏ఢ݋۞ྎ௟ྤੈĂኛણڱࡶᅮࢋᄬ ᄃ඀ёనࢍ͘Ίܝ4-22 ˢ ёົᆧΐણ҂ࢍᇴבΨဤᓏײ // ;( beep(x as ITest ІࢍᇴۏϏ၆఺إ // ; x := TTest.Create begin x: TTest; var function test_func() Ĉڶ඀ёቅٙणϯ۞ଐ˭غ ІΞਕົຍγгঐεĂтТۏଋ՟ѣᏲೈ఺ีఢ݋Ăଋ۞ڍ૟ҋજ఍நĄт ଋֹϡ TInterfacedObject ۞ྖĂιڍ఺ߏ౵ᖎሒщБ۞੃ጸវგந͞ёćт end; І۞ણ҂ࢍᇴ̪൒ߏ˘ۏ y.something; // д఺྆ аॡഴ˘ܔёבдޢ // ൒ ёົᆧΐણ҂ࢍᇴבΨဤᓏײ // ;( beep(y y := TTest.Create; // Яࠎ y ߏ Itest ݭၗĂણ҂ࢍᇴߏ˘ begin y: ITest; var function test_func() procedure beep(x: ITest); ણᇴࢍᇴ۞˘࡭ّĄּтĈ Іүࠎ̬ࢬણ໰Ă֭ͷܲ޺ۏଋՙؠֹϡણ҂ࢍᇴĂኛ੃଀ΪͽྍڍҾĄт ҋ఺ֱᙷҾ۞ણ҂ࢍᇴĄTInterfacedObject ߏ˘࣎೩ֻ఺჌ྻү͞ё۞ᙷ Іᄃι۞̬ࢬВх˸۞ྖĂଋΞͽᅅᗫгֹϡֽۏߙ࣎ڍጸវგநĄЯѩт Delphi ౅࿅̬ࢬߤྙ׶ણ҂ࢍᇴ۞၁үആଋ೩ֻ˞̂кᇴ۞ IInterface ੃ ֹϡણ҂ࢍᇴ І۞ّኳĂՙؠтңֹϡણ҂ࢍᇴĄۏॲፂ ଋΪߏ૟̬ࢬྻϡд̰ొᑕϡ඀ё̚ĂଋಶΞͽڍᏲчણ҂ࢍᇴఢ݋Ăҭт Windows ᒖဩ)Ăಶυืᚑॾ ٺІ(ࢨۏ ϲ COMޙଋࠎ̶೸ёᑕϡ඀ёڍт ІĄۏ۞ણ҂ࢍᇴĂ֭ͷдણ҂ࢍᇴតј࿬ॡঐໝྍ Іۏߏд̬ࢬણ໰็ගϡ͗ბॡᆧΐڱІ۞Ϡ׻ഇมĂүۏёົ΄ιࣇ੠ᖸ ೩ֻ˞˘࣎၁ү఺ีΑਕ۞͞ёĄιࣇ۞ྻү͞ڱ͞ ۞_AddRef ׶_Release І̝Ϡ׻ഇมგநĄIInterfaceۏߏቁܲ၁ү̬ࢬ۞˘̝ه៍۞ޢనࢍ̬ࢬࡦ І۞੃ጸវგநۏࢬ̬ Іሀݭ 4-23ۏϡֹ ٺĄְ၁˯Ă၆ڱ͞ Іᔖฟ IInterface _AddRef ׶_Releaseۏ҂ࢍᇴĂឰγᆸ І၁үણۏІߏ̮ІĂιΞ؎Ї (delegating) ̰ᆸۏĂ࣐ࡶγᆸڱΩ˘჌͞ Ξ੫၆̮І۞̬ࢬֹϡ as ྻზ̄Ą༊൒ଋ˵ΞͽֹϡჸЪүࠎ੃ጸវგந۞ ϲ˘̬࣎ࢬᙊҾф(IID)Ă̪ޙຍЯࠎଋ၁ү˞ QueryInterfaceĂΪࢋଋڦኛ І۞જၗߤྙĄۏଋ̪ᅮࢋֶ໰˘ਠ͞ёֽ၁ү QueryInterfaceĂͽ೩ֻ end; Result := -1; begin function TMyObject._Release: Integer; end; Result := -1; begin function TMyObject._AddRef: Integer; ĈטёĂͽྯ࿅ણ҂ࢍᇴ፟ב۞۩Ăүࠎڱ ͞ ϲ˘͚࣎೯̬ࢬ۞̮ІĂΞͽ၁ү IInterface _AddRef ׶_Releaseޙଋຐࢋ ڍĄтޘ஄д˘੓Ă၁үॡѣ࠹༊۞ӧᙱטϠ׻ഇมგந͞ё׶ણ҂ࢍᇴ፟ Іۏ૟̮І۞ڍTComponent ࠎૄᖂ۞̙Т੃ጸវგநր௚̚۞˘ొЊĄт ІಶߏͽۏĂ఺ᇹଋ۞ีטІߏజ׎΁̮Іٙጾѣ۞̮Іٕଠۏଋ۞ڍт ֹ̙ϡણ҂ࢍᇴ Ąטࢬ۞ଠ̬זצІ۞Ϡ׻ഇม֭՟ѣۏਕֹϡણ҂ࢍᇴĂЯࠎ Ăଋ̪Ξֹϡ̬ࢬĂ̙࿅̙˭ڶజ˘࡭ّгइϡĄд఺჌ଐڱᇴĂЯࠎι൑ ϡણ҂ࢍֹڱĂଋಶ൑ีטІߏ˘̮࣎Іٕ׎΁̮Іٙጾѣ۞ଠۏଋ۞ڍт ӘயϠྵ̈ăྵԣ۞඀ёቅĄކ݋̙ົĄ఺ֱ procedure beep(var x: ITest); ٕߏ procedure beep(const x: ITest); ӘĈކ۞˭غ_AddRef)Ă҃ Ψײ)ӘĂ૟ົᆧΐણᇴ۞ણ҂ࢍᇴކො ͽ˯ቑּ̚۞ beep ඀ԔĂॲፂι۞ end; І̙֍˞ۏ x.something; // មతĂ аॡഴ˘ܔёבдޢ൒ // ᄃ඀ёనࢍ͘Ίܝ4-24 ˢ ԫఙტᜓķĄ Їңϡ͗ბ඀ёቅĄࡶᅮࢋ COM ̬ࢬ۞ซ˘ՎྤੈĂኛણዦௐ 40 ౢĶ COM ൴ण۰ΞͽЯࠎЇң̰ొ۞நϤԼត၁үͽԼචᒻड़Ă̙҃ᇆᜩֶያ̬ࢬ۞ ᄃણᇴ݋ჯ޺̙ត)Ąд COM ᑕϡ඀ё̚Ăڱ҃͞)ࠎ̬ࢬ۞၁үߏᔳᖟ۞ І૟ԆБ׶னѣ۞ϡ͗ბ඀ёቅ࠹टćଋ̙ᅮࢋࢦາበᛌĂЯۏϡĄТॡĂ ІΑਕĂΞͽϲӈֻາ۞ϡ͗ბֹۏώͽ̈́Їңາ۞̬ࢬٕۍᖞ̬ࢬ۞າ ਕĄ І۞ϫ݈ΑۏΨֽߤྙײహវሀёՀາॡĂQueryInterface ΞдેҖഇมజ ώΑਕĂЯѩ༊ۍ۞ ᙷҾჍࠎ CoClassesĄCoClasses Ξֹϡ QueryInterface CLSID Ξϡֽ൳ᐂ֭გந COM ᙷҾĄጾѣᙷҾᄦౄጡ׶ᙷҾᙊҾф۞ COM ϲᙷҾᇹּĄޙֽ ᙊҾф(CLSIDs)۞ΑਕĄᙷҾᄦౄጡ࢑య౅࿅ CLSID ̬ࢬึᑕ COM ۞ؠཌྷĄCOM ᙷҾົΐˢֹϡᙷҾᄦౄጡ(factories)׶ᙷҾ ൑̙ТĂֹϡ IUnknown Ϊߏឰ Delphi֭˯ڱIUnknown ᄃ IIinterface дᄬ ֹϡ COM ॡĂᙷҾᄃ̬ࢬ఼૱ͽ IUnknown ̙҃ߏ IInterface ֽؠཌྷĂ Ąڱ̬ࢬΑਕĂ˵ಶߏΪ၁ү IInterface ̬ࢬ͞ ̮৵ĄDelphi ೩ֻ˞఺ֱԫఙ۞ૄώᙷҾĂΞᕖ· TInterfacedObject ۞ૄώ Іሀё۞ૄώۏVCL ᑕϡ඀ё̚Ă̬ࢬߏ COMăSOAP ׶ CORBA ̶೸ё д̶೸ёᑕϡ඀ёֹ̚ϡ̬ࢬ Unknownķ͹ᗟĄ טĶଠ۞ځ4-21ࢱ۞ĶჸЪķ(aggregation)̈́ Microsoft Windows ቢ˯ᄲ Ітң၁ү IUnknown ᄃ IInterfaceĂኛણዦۏІᄃγᆸۏ̚Ą୬̶Ᏸ̰ᆸ COM-based ᑕϡ඀ё(Windows ᒖဩ) ٺ˯࠹ᙷҬĂΪߏ IUnknown ֹϡ ІĄIUnknown ᄃ IInterface ૄώۏІણ҂ࢍᇴ (reference count) ̝̰ᆸۏ І၁үͽ̈́ϡͽჯ᜕ፋ࣎ۏො Ķcontrolling Unknownķߏ޽ IUnknown ̝γᆸ ᙷҾĄغІ̝ૄۏЪវ̰̚ᆸ ІĂଋ࠰Ξ૟ TInterfacedObject үࠎჸۏೈ̬ࢬϠ׻ฉഇሀё۞γᆸֶڱ൑ Іሀݭ 4-25ۏֹϡ ӣҋ̎۞ݭၗྤੈ)Ą ឰιࣇΒܮΨ̬ࢬ)ֽ૟ٙѣ۞ણᇴᖼೱјপঅតᇴ(ͽײInterface(DIIĂજၗ ਖ਼Ąᑕϡ඀ёυืֹϡૄᖂٕ੻ߛᙷҾĂٕଳϡ Dynamic Invocation Ψ۞௟༼ĂЯѩણᇴࣃ׶็аࣃΞͽϒቁг็ײҾ఍ந˞ marshaling ̬ࢬ ጡ۞ skeleton ᙷҾՙؠ۞ĄStub ׶ skeleton ᙷڇߏϤϡ͗ბ stub ᙷҾ׶Ҩ Ω˘̶࣎೸ёᑕϡ඀ёԫఙߏ CORBAĄCORBA ᑕϡ඀ё۞̬ࢬֹϡ͞ё ᙯੈिĄ Web Service ᑕϡ඀ёͽăSOAP ̈́ invokable ̬ࢬ۞࠹ ٺ଀ᙯפServicesķ ᄃ IInterface ԆБ࠹ТĂΪमдι૲ѣݭҾྤੈĄኛણ҂ 38 ౢĶֹϡ Web ߏឰଋ۞̬ࢬᚶٚҋ IInvokableĄIInvokableڱؠཌྷ invokable ̬ࢬ౵ᖎಏ۞͞ ඀ёֹϡĄ ბ͗މజڱ૲ѣ RTTI ྤੈĂٙͽ൑̙֭ڱ͞۞ֽ˭non-invokable ̬ࢬᚶٚ ĄଂڱӘ۞͞ކ΃̬ࢬٙޢΨ invokable ̬ࢬ̈́׎ײბ඀ёᔘߏΪਕ͗ މࢬĄ൒҃Ăࡶ˘࣎ invokable ̬ࢬᚶٚҋΩ˘̙࣎ߏ invokable ۞̬ࢬĂ ΃̬ࢬ˵ౌߏ invokable ̬ޢჍࠎ invokable ̬ࢬĄЇң invokable ̬ࢬ۞ ੈ(RTTI)ĄበᛌጡΪົԯ RTTI ΐˢ{$M+}በᛌ޽ϯΒಛ۞̬ࢬĄ఺ᇹ۞̬ࢬ ༊ᇤᆷ SOAP ̶೸ёᑕϡ඀ёॡĂ̬ࢬυื૲ѣιࣇҋ̎۞ેҖॡഇݭҾྤ 4-26 ˢܝᄃ඀ёనࢍ͘Ί ֹϡ BaseCLX 5-1 y ಏҜೱზ y ЕО Ѣ۩มٳϲޙ y y ఍நфҚ y ఍நфҚ lists y ఍ந lists y ఍ந .ini ᑫ९ y ఍நᑫ९ y ֹϡҚ߹ Ąڱώౢ૟੅ኢ˭ЕЧีၹј BaseCLX ̝ᙷҾᄃ඀ԔĂ֭ᖣ̬௜ֹϡ͞ ֹϡĂϺΞֻଋֹϡдᑕϡ඀ёٕᙷҾᇤᆷ˯Ą ۡତពனд̮Іሹ̚۞̮ІĂҭߏιٙ೩ֻ̝ᙷҾᄃ඀ԔΞֻ̮Іሹ̮̚І ᙷҾĂ҃ԧࣇ૟݈ࢗಏ̮௚Ⴭࠎ BaseCLXĄᔵ൒ BaseCLX ̙֭̚ΒӣЇң ԔĂ΃ܑҚ߹ᄃ List ΑਕᙷҾĂͽ̈́ TObjectăTPersistent ᄃ TComponet ඈ ̮І඀ёऱ̚ѣధкಏ̮೩ֻૄώ͚೯ĂΒ߁ၹјેҖॡഇ඀ёऱ̝Бા඀ ϡ BaseCLXֹ ᄃ඀ёనࢍ͘Ίܝ5-2 ˢ Function Write (const Buffer; Count: Longint): Longint; PositionĂWrite ۞ࣧԛࠎĈ ૟ Buffer ̚۞ྤफ़ॲፂ Count ۞Ҝ̮௡࣎ᇴᆷซҚ߹ϫ݈۞ڱ͞ Write ᇴϫĄ Count ٺᑫ९۞ඕՁᇾ੃ĂΞਕົ̈˞ז೩ѝ༥ڍҜ̮௡࣎ᇴĂт۞זפ၁᝝ ĂЯࠎιົа็ቁڱ͞פ༊ଋ̙ۢ྽ᑫ९̚Ҝ̮௡࣎ᇴॡĂread ߏໂָ۞᝝ Function Read (var Buffer; Count: Longint): Longint; Ҝ̮௡࣎ᇴĄRead ۞ࣧݭࠎĈ Buffer ̝̚ĄRead ତ඾ົ૟ᑫ९۞ϫ݈Ҝཉ݈ซ၁ᅫ็ਖ਼۞ זĂ֭᝝פؕ᝝ পؠ۞Ҝ̮௡࣎ᇴĂଂϫ݈۞ Position ฟפߏ˘࣎Ξଂᑫ९Қ߹᝝ڱ͞ Read ڱҚ߹̚ᏮˢᄃᏮ΍ྤफ़۞͞ y ߏӎд᏾ᄱॡயϠּγĄ y ߏӎࢋՐ࿰Аۢ྽Ҝ̮௡࣎ᇴĄ ᆷˢ۞Ҝ̮௡࣎ᇴĄٕפy ߏӎ็а᝝ ׶ᆷˢᑫ९Ăιࣇ۞ડҾт˭Ĉפٙѣ۞Қ߹ᙷҾѣ˘ֱ̙Т۞͞ёֽ᝝ ֹϡҚ߹ᏮˢٕᏮ΍ྤफ़ ᑫ९Ąפхٺ੃ጸវᇆညྤफ़Ă҃ TFileStream ϡפхٺTMemoryStream ϡ ࣎Қ߹ᙷҾӮࢉϠҋ Tstream ҭЧҋ΃ܑপҾ۞ಫវݭၗĂт Тಫវ۞ྤफ़Ăּт੃ጸវĂфҚҚЕĂsocket ٕྤफ़ऱ̚ BLOB ᛼ҜĄՏ ̙פҚ߹ߏ఍நྤफ़ᏮˢᏮ΍۞ᙷҾĂҚ߹೩ֻ˘࣎٩෪Ă௚˘۞̬ࢬֽх ֹϡҚ߹ DateUtils ಏ̮)Ăͽ̈́఍ந Variant ࣃ̝඀Ԕ(ؠཌྷд Variants ಏ̮)Ą ᇴጯΑਕ(ؠཌྷд Math ಏ̮)Ă఍ந͟ഇᄃॡม۞඀Ԕ(ؠཌྷд SysUtils ᄃ BaseCLX ٙѣ۞ΑਕĂѣధкΑਕ֭Ϗдѩౢ೩̈́Ăт͹ࢋ۞ ܧො! ѩ఍ٙЕ֭ y ؠཌྷҋࢎ variants ֹϡ BaseCLX 5-3 фҚ̰ф̮۞޽ᇾĄЯѩͅזфҚΒӣ˘࣎̂̈ă˘࣎ણ҂ࢍᇴ׶޽ܜࣃĄ үࠎ Buffer ϒቁ۞ણᇴڱфҚ൑ܜфҚĄ൒҃ܜ఍நфҚॡ౵૱ϡ۞ݭၗࠎ ۞ણᇴĂЯѩ඀ԔΞଳϡ็ˢ۞តᇴгӬઇࠎιࣇ۞ݭၗĄ ˢ඀Ԕ۞ Buffer ણᇴݭၗ̶Ҿࠎ var ׶ const ݭၗĄ఺ֱߏ̙׍ݭၗ(untyped) ׶ᆷפĄ᝝ڱёĂኛચυֹϡϒቁ۞ᄬבᆷˢٕפଋϒд૟фҚ็ග᝝ڍт ᏮˢᄃᏮ΍фҚ TWriterăᄃ TComponent ᙷҾ۞ྤੈĄ ѣᙯ TStreamăTFilerăTReaderăځ̮ІҚ߹ր௚۞ྤੈĂኛણዦቢ˯ᄲ ՀкٺІᆷˢჃჄĄᙯۏІٕ૟ۏᑫ९̚۞פTReaderăTWriter ЪүĂΞ᝝ ᑫ९Ă༊̮І߹΍ٕ߹Шܑॾᑫ९ॡĂҚ߹ᙷҾᄃ׎΁ᙷҾт TFileră ૟̮ІᏮˢٕᏮ΍ܑॾڱ͞ IDE ̚Ӏϡ ReadComponent ᄃ WriteComponent ІᛳّĄ ͽᐼх̮Іᄃ̮ڱϲٕᖼೱ̮ІॡĂΞֹϡ఺׌჌͞ޙĂ༊ଋдેҖॡഇڱ ReadComponent ᄃ WriteComponent ߏ TStream ࠎᏮˢᄃᏮ΍̮Іٙؠཌྷ۞͞ ᏮˢᄃᏮ΍̮І ᄃᆷˢĄפҖ၁ᅫ۞᝝ેֽڱ͞ Ψ Read ׶ Writeײົڱ఺ֱ͞ procedure WriteBuffer (const Buffer; Count: Longint); procedure ReadBuffer (var Buffer; Count: Longint); ݋̙ົĄReadBuffer ᄃ WriteBuffer ۞ࣧԛт˭Ĉڱ ͞ WriteBuffer ݋ົயϠּγ(EreadError ᄃ EwriteError )Ă҃ Read ׶ Write ၁ᅫ۞Ҝ̮ᇴϫ׶ࢋՐ۞ Count ᇴϫ̙ߏԆБӚЪॡĂReadBuffer ᄃڍ ඕၹॡ(structure)ĄтפĂּтд᝝ڶྻϡдҜ̮௡࣎ᇴٕ̏ۢజࢋՐ۞ଐ ᆷˢ۞Ҝ̮௡࣎ᇴĂЯѩྍ඀Ԕ౵рٕפιࣇ̙ົа็ቁ၁᝝ٺТ̝఍д̙ ڱ͞ ࠹၆ᑕ۞˘௡඀Ԕߏ ReadBuffer ᄃ WriteBufferĂιࣇᄃ Read ׶ Write Count ᇴϫĄ ٺҜ̮௡Ăົ̈ к۞͉צତڱቤ኏ડ۞ඕՁҜཉٕߏҚ߹൑ז೩ѝ༥ڍˢ۞Ҝ̮௡࣎ᇴĂт ĂPosition ົॲፂᏮ΍Ҝ̮௡࣎ᇴШ݈ொજĂ֭а็ቁ၁ᆷޢڱ͞ ϡ Writeֹ ᄃ඀ёనࢍ͘Ίܝ5-4 ˢ फ़ٕᆷˢྤफ़Ąྤפ۞̂̈ĄଋΞͽଂ seek ٙ޽ؠ۞পؠҜཉ᝝ ឰଋആҚ߹ؠҜٕតՀҚ߹ڱ͞ γĂҚ߹Ϻ೩ֻ seekڱੵ˞ᏮˢᄃᏮ΍۞͞ Қ߹Ҝཉ׶̂̈ stream1.Free; end; finally stream2.Free; .CopyFrom(Stream1, Stream1.Size); finally stream2 try stream2 := TFileStream.Creat(To.Text fmOpenCreate or fmShareDenyWrite); try am1 := TFileStream.Creat(To.Text fmOpenCreate or fmShareDenyWrite); stre m1, stream2:TStream; begin strea var Procedure TForm1.CopyFileClick(Sender: TObject); ۞޷ตĄ From ᄃ To)ᄃ˘࣎ኑᄦᑫ९(Copy File))ีטྍᑕϡ඀ё̚Βӣ׌࣎በᏭଠ ણ҂˭ࢬ۞ּ̄Ą ăᆷˢăᛖ΍ቤ኏ડ۞ᅮՐĂኛפϲă᝝ޙΪࢋֹϡ CopyFrom Ξឰଋ࠷ݒ Ăڱăᆷˢඈ͞פΩ˘࣎Қ߹Ă൑ืֹϡ᝝זଋࢋଂ˘࣎Қ߹૟ྤफ़ኑᄦڍт Ω˘࣎Қ߹ז૟ྤफ़ଂ˘࣎Қ߹ኑᄦ end; ڱ fs.Write(PChar(s)^, Length(s));// ఺ߏϒቁ۞͞ fs.Write(s, Length(s));// ఺ົගଋ׾Ӱ fs := TFileStream.Create('temp.txt', fmCreate or fmOpenWrite); begin s: string = 'Hello'; fs: TFileStream; var procedure caststring; ૟ιͅણ໰ĄޢҚᖼݭј Pointer ٕ PCharĂ൒ фҚ̙֭ົயϠ޽ᇾ̮ІĄଋᅮࢋү۞ߏА૟фܜણ໰(dereferencing)˘࣎ ֹϡ BaseCLX 5-5 ᄃᆷˢྤफ़۞඀Ԕ̰ొĄפҋҚ߹᝝ٺSize ఼૱ϡ property Size: Int64; Әт˭Ĉކ۞ ۞ᇾ໤ĄSize ᑫ९ٕၟᕝᑫ९פSize ᛳّ΃ܑҚ߹۞̂̈ĂͽҜ̮௡ࠎಏҜĄιΞઇࠎ᝝ property Position: Int64; Әт˭Ĉކ۞ फ़۞ฟᐝზ੓)ĄPosition Қ߹۞ϫ݈ҜொĂͽҜ̮௡ࠎಏҜ(ଂҚ߹ྤٺPosition ᛳّΞϡֽ޽ؠ࠹၆ Ąڱ׶ᆷˢ͞פ Seekă᝝ ٺٙѣ۞Қ߹Ӯ೩ֻ˞ΒӣҚ߹ϫ݈Ҝཉ׶̂̈۞ᛳّĂιࣇ૟ϡ ֹϡҜཉ׶̂̈۞ᛳّ Position ᛳّ۞າᇴࣃĂ˵ಶߏྤ໚̰າ۞ϫ݈ҜཉĄ Seek ົࢦనϫ݈۞Қ߹ PositionĂॲፂ޽ؠ۞ҜொֽொજιĄSeek ົ็а ՁҜཉ݈۞Ҝ̮௡࣎ᇴĄ soFromEnd Offsetߏଂྤ໚۞ඕՁҜཉზ੓ĄOffsetυื<= 0ͽ޽ؠдᑫ९ඕ Position + OffsetĄזsoFromCurrent Offsetߏଂྤ໚۞ϫ݈Ҝཉზ੓ĄSeekົொ >= 0Ą OffsetҜཉĄOffsetυืזsoFromBeginning Offsetߏଂྤ໚۞ฟؕზ੓ĄSeekົொ ᇴࣃ ຍཌྷ ܑ5.1 Originણᇴࣃ Origin ણᇴ޽ؠ˞тңྋᛖ Offset ણᇴĄOrigin ᑕࠎ˭Еᇴࣃ̝˘Ĉ (position)ᄃҜொ(offsets)ĂΩ˘ֹ࣎ϡ 64-bit ፋᇴ҃̏Ą ώ˯ߏ࠹Т۞ĂΪ̙࿅˘ֹ࣎ϡ 32-bit ፋᇴ΃ܑனдҜཉૄڱ׌჌͞ function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; function Seek(Offset: Longint; Origin: Word): Longint; ĈڱĄ೩ֻ׌჌ Seek ۞ᖬྶ͞ڱ͞ পؠҜཉĂ౵૱ֹϡ SeekזдҚ߹̚ொજ ವԱপؠҜཉ ᄃ඀ёనࢍ͘Ίܝ5-6 ˢ ଀פ଀ handleĄ˘όפϲᑫ९ֽޙёฟୁٕב Ψ FileOpen ٕ FileCreate ײ೩ֻ࠹၆ᑕ̝඀ԔĂٙͽᑕϡдྭπέ඀ё̚඗൑યᗟĄଋΞͽᖣϤ ࢬĄ੫၆ LinuxĂBaseCLX Ϻ̬̝ܮAPI ҃֏ߏໂ͞ ٺᇴࣃĂ߇ιࣇ၆ ͷѣॡΞົ೩ֻ࿰నણڱਕ̚Ą҃ BaseCLX ΑਕีЯࠎֹϡ Delphi ᄬ ᅮࢋᑫ९ handle ̖ਕүϡĄд WindowsĂ఺ֱ඀Ԕ఼૱Βᄤд API Α ր௚ົ೩ֻᑫ९ handleĄϤ SysUtils ಏ̮೩ֻĄѣధкᑫ९఍ந඀Ԕ࠰ ϲᑫ९ॡĂүຽޙͽ఍நᑫ९Ă༊ଋฟୁٕڱ͞ y ٕߏֹϡ handle-based ࠹̢੨ЪĄԧࣇົд˭˘༼੅ኢ TFileStream ௟༼Ą ڱ଀ᑫ९ handleĂᄃ˭˘჌͞פTFileStream ׍ѣ Handle ᛳّĂΞឰଋ ІĄᑫ९Қ߹ߏ఍நᑫ९Ꮾˢ/Ꮾ΍۞Ξᛸё੼ล͞ёĄۏ TFileStream ჃჄᑫ९ྤੈ۞פߏֹϡᑫ९Қ߹Ăᑫ९Қ߹ߏϡֽхڱᛉֹϡ۞͞ޙ y ଋણ҂ֹϡĈֻڱᄃᏮˢᑫ९ॡĂѣ˭Еೀ჌͞פ༊ଋ᝝ ڱᑫ९Ꮾˢ/Ꮾ΍͞ ҭ Linux үຽր௚ᚑॾડ̶Ąٙͽд఍நᑫЩॡኛॾё͕̈Ą ຍᔵ൒ Delphi ᄬ֏ώ֗ߏ̙ડ̶̂̈ᆷ۞Ăڦො дᇤᆷྭπέᑕϡ඀ёॡĂኛ ϡᑫ९̰टĄֹܧ۞Ķ఍நᑫ९ķ˘߱̚Ăົ̬௜тңፆүᑫ९ώ֗҃ ੵ˞ᑫ९Ꮾˢ/Ꮾ΍ፆүĂଋ˘ؠ˵ຐᒢྋтң఍நჃჄ̚۞ᑫ९Ăд5-9ࢱ ׶ᆷˢᑫ९Ąפётң᝝בॡ̬௜ᑫ९Қ߹ᄃБા ķ̚ົТڱёϺΞ఍நᑫ९Ꮾˢ/Ꮾ΍Ąдௐ5-6ࢱ۞Ķᑫ९Ꮾˢ/Ꮾ΍͞ב (̝Қ߹ᏮˢٕᏮ΍ᑫ९Ă׎၁ੵѩ̝γĂેҖॡഇ඀ёऱ(runtime library Ą݈˘༼Ķֹϡᑫ९Қ߹ķ̬௜ֹϡপؠڱBaseCLX ͚೯ధк఍நᑫ९۞͞ ఍நᑫ९ Լត઱᝝ᑫ९Қ߹۞ Size ૟ົயϠּγĄ ԼតĂ૟ົயϠ˘ּ࣎γĄּтࡶࢋڱᑫ९۞ Size ൑ڍՁĂ̷ֽᕝᑫ९Ąт నؠ Size ᛳّΞԼតᑫ९۞̂̈Ąּтдᑫ९Қ߹̚ͽιઇࠎᑫ९ᇾ੃۞ඕ ֹϡ BaseCLX 5-7 хд۞ྖĂ૟ᑫ९ฟୁјᆷˢሀёĄ ޽ؠЩჍ۞ᑫ९ڍfmCreate ૟޽ؠЩჍ۞ᑫ९ү TFileStream ఍நĄт ᇴࣃ ຍཌྷ ܑ5.2 ᑫ९ฟୁሀё ੓ֽĄฟୁሀёυืࠎ˭Еᇴࣃ̝˘Ĉ׀ฟୁሀё׶ВֳሀёĂͽ or ͞ёЪ ϲᑫ९Қ߹ॡ۞ᑫ९ฟୁ͞ёĄMode ણᇴΒӣ˞˘࣎ޙMode ણᇴ޽ؠ˞д constructor Create(const filename: string; Mode: Word); ฟୁĂTFileStream ૟யϠ˘ּ࣎γĄ ڱᑫ९൑ڍĄтڱᆷˢᑫ९۞ٕ͞פϲ׍Щ۞ᑫ९Ă֭೩ֻ᝝ޙ఺૟ฟୁٕ ᑫ९۞ᙊҾ̄ĂΪࢋୁϡ TFileStream ӈΞĂפϲٕฟୁᑫ९Ă֭хޙࡶࢋ ϲ̈́ฟୁᑫ९ޙ ϡĄֹ׀˘handle ̖ਕүϡ۞඀Ԕ ᑫ९ handleĂٙͽଋΞͽ੨Ъᅮࢋᑫ९פੵѩ̝γĂЯࠎᑫ९Қ߹Ξͽх ༼̏ྎ௟̬௜ᚶٚҋҚ߹ᙷҾ̝ЧีΑਕĄ ᄃ׎΁Қ߹ᙷҾ࠹̢ኑᄦྤफ़Ăٕߏ᝝ᆷ̮ІࣃĄд5-2ࢱ۞ĶֹϡҚ߹ķ˘ Ą̙ҭΞ᝝ᆷᑫ९Ă֭ΞڱᙷҾ۞ࢉϠᙷҾĂЯѩᚶٚ˞˘ਠҚ߹۞ٙѣ͞ TFileStream ߏҚ߹ ٺTFileStream ᙷҾឰᑕϡ඀ёΞ᝝ᆷჃჄ̚۞ᑫ९ĂϤ ֹϡᑫ९Қ߹ நᖞᇹё۞ᑫ९ݭၗĂኛણዦ Delphi ඀ёᄬ֏͘ΊĄ ଋᅮࢋ఍ڍWindows ᑫ९ handles ̙֭࠹टĂٙͽϫ݈̙̏ГֹϡĄт ώ҃хдĂιࣇᄃۍwriteln ົֹϡιࣇĄ఺ֱᑫ९តᇴΪࠎ˞͚೯ᖞ кᑫ९఍ந඀ԔĂּт AssignPrn ׶ޝ(text)׶̙׍ݭၗ(untyped)Ăѣ Text:ķٕĶF: FileķĄᑫ९តᇴ఼૱ѣˬ჌ᙷҾĈ׍ѣݭၗ(typed)ă͛ф y System ಏ̮೩ֻᑫ९Ꮾˢ/Ꮾ΍̝఍ந඀ԔĂ఼૱ιࣇ۞ॾёࠎĶF: ଀͛фඈඈ)Ąפ९̰ट(ᆷˢ˘Җ͛фĂ Ψֱ֤ᅮࢋᑫ९ handle ̖ਕүϡ۞඀ԔֽՀԼᑫײĂಶΞͽޢ handle ᄃ඀ёనࢍ͘Ίܝ5-8 ˢ ІĄۏϲາ۞ᑫ९Қ߹ޙଋຐࢋԼតᑫ९ Handle ۞ᛳّĂυืАڍ Ăι޽΍˞ᑫ९۞ฟୁሀёĄтפ̚ಶߏ Linux ᑫ९ HandleĄHandle ֻ่᝝ ᛳّ̰ĄWindows ᒖဩ̚ĂHandle ޽۞ߏ Windows ᑫ९ HandleĂ҃ д CLX Handle ٺᑫ९ handleĄᑫ९ handle Βӣפ༊ଋୁϡ TFileStream ॡĂӈΞх ֹϡᑫ९ handle SysUtils ಏ̮̰Ą ٺᑫ९ฟୁ׶Вֳሀё૱ᇴҜ fmOpenReadWrite Ξϡ Ξϡ Ξϡ Ξϡ Ξϡ fmOpenWrite Ξϡ Ξϡ ̙Ξϡ Ξϡ Ξϡ fmOpenRead ̙Ξϡ ̙Ξϡ Ξϡ ̙Ξϡ Ξϡ ฟୁሀё fmShareCompat fmShareExclusive fmShareDenyWrite fmShareDenyRead fmShareDenyNone ܑ5.4 Ч࣎ᑫ९ฟୁሀё˭Ξϡ۞ᑫ९Вֳሀё ࣎ฟୁሀё̚Ξϡ۞ВֳሀёĄ ຍଋٙਕֹϡ۞Вֳሀёॲፂϫֹ݈ϡ۞ฟୁሀё҃ؠĄ˭ܑЕ΍дЧڦኛ ᆷˢᑫ९ĄٕפfmShareDenyNone ׎΁ᑕϡ඀ёΞͽᐌຍг᝝ फ़ĄྤפfmShareDenyRead ׎΁ᑕϡ඀ёΞฟୁᑫ९ֽᆷˢྤफ़ĂΞߏ̙ਕ᝝ फ़ĂΞߏ̙ਕᆷˢྤफ़ĄྤפfmShareDenyWrite ׎΁ᑕϡ඀ёΞฟୁᑫ९ֽ᝝ ฟୁᑫ९ĄڱfmShareExclusive ̙გߏ̦ᆃநϤĂ׎΁ᑕϡ඀ёౌ൑ fmShareCompat ВֳሀёΞᄃFCBs۞ฟୁ͞ё࠹टĄ(่VCLᑕϡ඀ё) ᇴࣃ ຍཌྷ ܑ5.3 ᑫ९Вֳሀё Вֳሀёυืࠎ˭Еᇴࣃ̝˘Ĉ ΃ιࣇĄפܧfmOpenReadWrite ฟୁᑫ९ͽ࣒Լϫ݈۞̰टĂ҃ ΃ϫ݈۞̰टĄפfmOpenWrite ૟ᑫ९ฟୁјֻ่ᆷˢĄᆷˢᑫ९૟ԆБ fmOpenRead ૟ᑫ९ฟୁј઱᝝Ą ᇴࣃ ຍཌྷ ֹϡ BaseCLX 5-9 Әт˭Ĉކ۞ FindFirst ٕ FindNext ٙຩವ۞ᑫ९ྤੈĄTSearchRec ఺ˬ࣎ವԱᑫ९۞඀Ԕ૟ଳϡ TSearchRec үࠎણᇴ̝˘ĄTSearchRec ؠཌྷ˞ ᑫ९хд૟็а TrueĂ̙хд݋็а FalseĄڍёĂтב хдĂΞֹϡ FileExists ଋຐࢋۢ྽ߙ࣎ᑫ९ߏӎڍFindFirst/FindNext ԔЕͽᔖҺ੃ጸវ߹εĄт ᛖ΍ FindFirst ٙ੨ཉ۞੃ጸវĄଋυืֹϡ FindClose ֽඕՁ Ψ FindFirst ॡ޽ؠ۞ЩჍ׶ᛳّ็а˭˘࣎௑Ъ۞ีϫĄFindClose ૟ײѨ Ξд޽ؠ۞ϫᐂ̚ॲፂ˘௡ᛳّຩವௐ˘࣎΍ன۞ᑫЩĄFindNext ૟ॲፂ˯ ѣˬ࣎඀ԔΞϡֽವԱᑫ९ĈFindFirstăFindNext ׶ FindCloseĄFindFirst ವԱᑫ९ ଂჃჄ̚ӁੵĄ тࡶᑫ९̙хдĂٕιߏ઱᝝ᑫ९)ĄDeleteFile ົ૟ᑫЩࠎ FileName ۞ᑫ९ ՟ѣӁੵ݋็аFalse(ּڍDeleteFileјΑ૟ᑫ९ӁੵĂιົ็аTrueĂтڍт DeleteFile(FileName); ёĈב ߏӎӁੵᑫ९ĄࡶࢋӁੵᑫ९Ăኛ૟ᑫ९۞ЩჍ็ග DeleteFile ᑕ۞ፆүΞ૟Ӂੵ۞ᑫ९ᔘࣧĂЯѩ˘ਠֽᄲᑕϡ඀ёౌᑕྍឰֹϡ۰ቁᄮ Ӂੵᑫ९ົ૟ჃჄ̚۞ᑫ९ӁੵĂ֭ொੵჃჄϫᐂ̚۞ีϫĄЯࠎ֭՟ѣ၆ Ӂੵᑫ९ ͽд఍நᑫЩॡኛॾё͕̈Ą ຍ ᔵ൒ Delphi ᄬ֏ώ֗ߏ̙ડ̶̂̈ᆷ۞Ăҭ Linux үຽր௚ᚑॾડ̶Ąٙڦ ĂଋΞͽԼϡᑫ९ handleĄ˭ڶېΨυࢋ۞үຽր௚Ąдߙֱײଋ кᇴ۞඀Ԕ҃֏Ăଋᅮࢋ޽ؠᑫ९ЩჍĂ҃඀Ԕ݋ആ̂ٺ੼۞ᆸ৺Ą၆ྵٺ ёྻүבϡ۞ᑫ९ፆүĂ఍நᑫ९۞඀Ԕ׶૱ֱ˘˞ޙેҖॡഇ඀ёऱ̰̚ ఍நᑫ९ Іజঐໝ̝݈ᙯౕᑫ९ handleĄۏ߹ᄃ handle Қ߹̙Т̝఍Ăᑫ९Қ߹ົд ຍᑫ९ҚڦĂଋౌΞͽֹϡ Handle ᛳّĄኛڶᑫ९ handle ۞ଐזᅮࢋֹϡ Ăٙѣޢѣֱᑫ९఍ந඀Ԕົͽᑫ९ handle үࠎણᇴĂ༊ଋֹϡᑫ९Қ߹ ᄃ඀ёనࢍ͘Ίܝ5-10 ˢ ࣎Щࠎ Search ۞޷ตă˘࣎Щࠎ Again ۞޷ตĄֹϡ۰޷˘˭ Search ޷ต૟ Ă׎ֹ̚ϡ˞ܑॾ̚۞˘࣎ᇾចă˘ڱ ώቑּ̬̚௜ˬ჌ᑫ९ವԱ඀Ԕ̝ϡ (faReadOnly or faHidden) ઱᝝׶ᔳᖟᑫ९Ăᑕ૟˭Е૱ᇴүࠎ Attr ણᇴĄ Ąּтࡶੵ˞˘ਠᑫ९̝γĂᔘࢋຩವ׀ᛳّ˵Ξͽ૟૱ᇴٕᇴࣃͽ or ֽЪ (SearchRec.Attr and faHidden > 0) ૟ࠎ TrueĈڍᔳᖟᑫ९Ă˭Еྻზё۞ඕ ᑫ९ߏ˘࣎۞ז0ĄּтࡶԱ ٺ૟ົ̂ڍᑫ९׍ѣྍᛳّĂඕڍّ૱ᇴĄт Attr ᛼Ҝ۞ᇴࣃ׶ᛳ ׀ࡶࢋീྏߏӎ׍ѣߙ࣎ᛳّĂΞֹϡ and ྻზֽ̄Ъ faAnyFile $0000003F Їңᑫ९ faArchive $00000020 ܲхᑫ९ faDirectory $00000010 ϫᐂᑫ९ Ί(Volume) IDᑫ९ס faVolumeID $00000008 faSysFile $00000004 ր௚ᑫ९ faHidden $00000002 ᔳᖟᑫ९ faReadOnly $00000001 ઱᝝ᑫ९ ૱ᇴ ᇴࣃ ೡࢗ ܑ5.5 ᛳّ૱ᇴ׶ᇴࣃ ॲፂ˭Еᛳّ૱ᇴٕᇴࣃֽീྏ AttrĂͽՙؠᑫ९ߏӎ׍ѣ޽ؠ۞ᛳّĈ ᑫ९࣒҃ԼĄଋΞͽ۞זᑫ९ĂTSearchRec ݭၗણᇴ۞᛼ҜົᐌԱזԱڍт end; ᑫЩ׶ൺᑫЩܜॡมĂפх۞ޢ //ᑫ९யϠॡมĂ౵ FindData: TWin32FindData;//FindData ѣֱᗝγྤੈĂညߏ FindHandle: THandle; ExcludeAttr: Integer; Name: TFileName;//Name Β߁ᑫ९ЩჍᄃઘᑫЩ Attr: Integer;//Attr ΃ܑᑫ९ᛳّ Size: Integer;//Size ߏᑫ९۞̂̈ĂͽҜ̮௡ࢍზ Time: Integer;//Time ߏᑫ९۞ॡม TSearchRec = record TFileName = string; type ֹϡ BaseCLX 5-11 ჃჄ፟ྻүĄྭڱ(wrapper)ĂЯѩ MoveFile Ϻ൑ ё۞Β྅۰ב ො дેҖॡഇ඀ёऱ̚ĂRenameFile ࠎ Windows API MoveFile ГӁੵᖞ۞ᑫ९Ąޢ९Ă൒ ׎΁ჃჄ፟ĄଋᅮࢋАኑᄦᑫ (זວ) זଋ̙ਕֹϡ RenameFile ֽ૟ᑫ९Լ ErrorMsg('Error renaming file!'); if not RenameFile('OLDNAME.TXT','NEWNAME.TXT') then ࡶ NewFileName ఺࣎ЩჍ۞ᑫ९̏གྷхдĂಶົ็а FalseĄּтĈ Լតᑫ९۞ЩჍĂּтڱι൑ڍ࣎ፆүјΑ˞ĂRenameFile ૟็а TrueĄт ఺ڍ఺ົ૟ OldFileName ٙ޽ؠ۞ᑫЩԼј NewFileName ٙ޽ؠ۞ЩჍĄт function RenameFile(const OldFileName, NewFileName: string): Boolean; ёӈΞĈב ࡶࢋԼតᑫЩĂΪࢋֹϡ RenameFile Լតᑫ९ЩჍ Variables ࢱࢬనؠ)ֽ΃ആĄ ֹٕϡᒖဩតᇴ(ଋΞͽд ToolsĖEnvironment Options ۞ Environment ො дྭπέᑕϡ඀ё̚Ăଋᑕྍ૟Їңᆷд඀ёቅ̚۞ྮशĂԼࠎϒቁ۞ྮश end; FindClose(SearchRec); else Label1.Caption := SearchRec.Name + ' is ' + IntToStr(SearchRec.Size) + ' bytes in size'; if (FindNext(SearchRec) = 0) then begin procedure TForm1.AgainClick(Sender: TObject); end; Label1.Caption := SearchRec.Name + ' is ' + IntToStr(SearchRec.Size) + ' bytes in size'; FindFirst('c:\Program Files\MyProgram\bin\*.*, faAnyFile, SearchRec); begin procedure TForm1.SearchClick(Sender: TObject); SearchRec: TSearchRec; var ច̰Ĉ ᇾᗟ̚ĄՏѨֹϡ۰޷ Again ޷ตॡĂ˭࣎௑Ъ۞ᑫЩ׶̂̈˫ົពϯдᇾ ޽ؠྮश̚۞ௐ˘࣎ᑫ९Ă҃ᑫ९۞ЩჍ׶Ҝ̮௡࣎ᇴ૟΍னдᇾច۞זԱ ᄃ඀ёనࢍ͘Ίܝ5-12 ˢ ྤੈĂኛણዦд5-13ࢱ۞Ķֹϡ TIniFile ᄃ TMemIniFileķ˘༼Ą ᄃበᏭĂѩࠎ ini ᑫ९૱జଳϡ̝ࣧЯĄซ˘Վ࠹ᙯפ᝝ٽट૱ܧ˫నࢍĂ πέ඀ёྭٺTMemIniFile ׌჌ᙷҾֽ఍ந ini ᑫ९ĄЯࠎ ini ᑫ९̙ҭΞϡ кᑕϡ඀ёӀϡ ini ᑫ९ֽᐼхనؠྤੈĂBaseCLX ೩ֻ TIniFil ᄃޝ ఍ந INI ᑫᄃր௚൳ᐂ Ąځኛણዦ Microsoft Windows ቢ˯ᄲ ͽፖྭჃჄ፟۞͞ёֽ૟ᑫ९ԼЩٕວொĄࡶᅮࢋซ˘Վ۞ྤੈĂڱёౌ൑ ב ёٕߏ Windows API MoveFileב ׎΁ჃჄ፟ĂЯࠎ̙ኢߏ RenameFileז າ۞ᑫ९̚ĂΞߏщБᛳّݒ̙ົኑᄦ࿅ΝĄCopyFile ˵Ξϡֽ૟ᑫ९ວז ຍனѣᑫ९۞ᛳّ૟ኑᄦڦᑫ९ handleĄдኑᄦᑫ९ॡĂኛܧүࠎણᇴĂ҃ ኑᄦᑫ९Ąಶ׶̂кᇴ۞ેҖഇม඀ёऱᑫ९඀Ԕ˘ᇹĂCopyFile ૟ͽᑫЩ ёֽב Ψ Windows API CopyFileײWindows-only ̝ᑕϡ඀ёॡĂΞͽۡତ ેҖഇม඀ёऱ֭՟ѣ೩ֻЇң඀Ԕឰଋኑᄦᑫ९Ą̙࿅ଋࡶߏᇤᆷ ኑᄦᑫ९ ણ҂ௐ 5-6ࢱ۞Ķֹϡᑫ९Қ߹ķ̈༼Ą ϲٕฟୁᑫ९Ă֭Ӏϡι۞ Handle ᛳّĄኛޙy ౅࿅ TFileStream ᙷҾͽ ྍᑫ९۞ handleĄפё֭Ξ็аϡֽх בϲາᑫ९ٕฟୁߊхᑫ९Ą׌ีޙёͽב y ֹϡ FileOpen ٕ FileCreatW ଀ handleĂଋΞͽĈפFileSetDate ݋ֹϡ Handle ݭၗүࠎણᇴĄࡶࢋ ಶ׶̂кᇴ۞ᑫ९఍ந඀Ԕ˘ᇹĂFileAge ֹϡᑫЩĂ ҃ FileGetDate ׶ ड़۞ྖĂ݋็а–1Ą ᑫ९ handle(handle)൑ڍቅĄFileGetDate ૟็а޽ؠᑫ९۞͟ഇ׶ॡมĂт Ξనؠٙ޽ؠᑫ९۞͟ഇ׶ॡมĂјΑ۞ྖ૟็а࿬Ăεୀ۞ྖ݋็а᏾ᄱ ᑫ९̙хдĂ݋็а–1ĄFileSetDateڍFileAge ૟็аᑫ९۞͟ഇ׶ॡมĂт FileAgeăFileGetDate ׶ FileSetDate ඀Ԕౌଳϡ˞үຽր௚۞͟ഇॡมࣃĄ ᑫ९͟ഇॡม඀Ԕ ֹϡ BaseCLX 5-13 ֽᆷˢనؠࣃĄ ડ߱ĄТᇹгĂҰ˵ΞͽֹϡWriteBoolăWriteIntegerăWriteDateٕ WriteString ፋ࣎פѨ᝝˘ֽڱ͞ Ψ ReadSectionײనؠࣃĄ˵Ξͽפٕ ReadInteger ֽ᝝ Ψ ReadStringăReadDateײϲ˘࣎ĄҰΞҋϤгޙᇴĄࡶᑫ९̙хдĂιົҋજ ၹё̚үࠎણޙІॡĂυื૟ ini ᑫЩ็ˢۏ ϲ TIniFile ٕ TMemIniFileleޙ ჄĄ ᆷˢჃົ̖ڱ͞ Ψ UpdateFileײଋזᑫ९ٙѣ̰टតՀᇶхд੃ጸវ̚Ăۡ ᒖဩ̚ĂTIniFile Ξͽۡତ఍நჃჄ˯۞ ini ᑫ९Ă҃ TMemIniFilele ݋૟ ini Linux ᒖဩ̚ TIniFile ᄃ TMemIniFilele ۞ፆү͞ёԆБ࠹ТĂ҃д Windows Ąٽᆷˢ ini ᑫ९Հࠎᖎ̈́פֹ଀᝝ ѣϡĄBaseCLX ೩ֻ TIniFile ᄃ TMemIniFilele ׌჌ᙷҾĂ૱ܧπέᑕϡ඀ё ԆБֶᏥր௚൳ᐂᑫᐼхనؠྤੈॡĂini ᑫ९ॾё၆ྭڱϡ఺჌ॾёĄ༊൑ ini ᑫ९ॾё̪൒Ȉ̶߹ҖĂధкనؠᑫĞּт DSK ॸࢬనؠᑫ९ğಶߏֹ ֹϡ TIniFile ᄃ TMemInFile ͽ੅ኢĄ ൳ᐂᑫ۞ඕၹ࠹ᙷҬĄTRegistry ົд5-15ࢱ۞Ķֹϡ TRegistryķ˘༼̚ΐ Яࠎ൑ᅮᄃ఍ந ini ᑫ९۞ᙷҾ࠹टĂЯѩιࣇ۞ЩჍᄃր௚ڱ۞ᛳّᄃ͞ πέᑕϡ඀ёĂଋΞֹϡ TRegistry ᙷҾፆү൳ᐂᑫĂTRegistry ̚ྭܧٺ၆ TRegistryIniFile ົд5-15ࢱ۞Ķֹϡ TRegistryIniFileķ˘༼̚ΐͽ੅ኢĄ ׌჌ᑕϡ඀ё̚ĄٺĂಶ଀ͽᇅّྻϡڱ͞۞̚ ((TCustomIniFile ଋ۞ᑕϡ඀ёֹ่ϡ˞ͭᙷҾڍᚶٚҋТ˘࣎ͭᙷҾ(TCustomIniFile)Ąт ѣϡĂЯࠎιᄃ఍ந ini ᑫ९۞ᙷҾ૱ܧTRegistryIniFile ၆ྭπέᑕϡ඀ё ҾĂЯࠎιࣇᄃ఍ந ini ᑫ९ѣளѡТ̝̍఍Ą д Windows), ԧࣇдѩᔘߏ੅ኢ˘˭ TRegistryIniFile ᄃ TRegistry ׌ีᙷ BaseCLX (Яࠎιࣇ่ਕֹϡ ٺІ఍நր௚൳ᐂᑫĂᔵ൒நኢ˯ιࣇ̙֭ᛳ ۏ଀నؠྤੈ̝ลᆸྤफ़ऱĄVCL ೩ֻפր௚൳ᐂᑫߏᑕϡ඀ёะ̚ᐼх׶ ΃ ini ᑫ९Ăפ (кᇴ۞ Windows ᑕϡ඀ёͽր௚൳ᐂᑫ ( system registry ᄃ඀ёనࢍ͘Ίܝ5-14 ˢ InitMax=0 Caption=Default Caption Left=100 Top=100 [Form] ࠻੓ֽညߏ఺ᇹĈ ϲ ini ᑫ९Ăֹ଀̰टޙϲĄ˭Е඀ёቅ૟ޙё૟ົҋજב̙хдॡĂᆷˢ ௐˬ࣎ࠎٕડٕ߱৶͔̙хдॡĂ૟็а۞࿰నࣃĄТᇹгĂࡶડٕ߱৶͔ ini ۞ડ߱Ăௐ˟࣎޽ؠ৶͔Ă ځёౌᅮࢋˬ࣎ણᇴĄௐ˘࣎޽בפٙѣ۞᝝ end; end; TIniFile.Free; finally iteBool ('Form', 'InitMax', windowState = wsMaximized); Ini.Wr Ini.WriteString ('Form', 'Caption', Caption); Ini.WriteInterger ('Form', 'Left', Top); Ini.WriteInterger ('Form', 'Top', Top); := TIniFile.Create (ChangeFileExt(Application.ExeName, '.INI')); try Ini begin Ini: TIniFile var procedure TForm1.FormClose(Sender: TObject; var Action TCloseAction) end; end; TIniFile.Free; finally tate = wsNormal; WindowS else WindowState = wsMaximized if Ini.ReadBool ('Form', 'InitMax', false) then Caption := Ini.ReadString ('Form', 'Caption', 'New Form'); Left := Ini.ReadInterger ('Form', 'Left', 100); Top := Ini.ReadInterger ('Form', 'Top', 100); try Ini := TIniFile.Create (ChangeFileExt(Application.ExeName, '.INI')); TIniFile begin Ini: var procedure TForm1.FormCreate(Sender: TObject) ̚૟ྤੈᆷˢĈ ёבini ᑫ९Ă֭д OnClose ְІ఍ந פϲॡ᝝ޙ(Е඀ёቅ૟дܑॾ(form˭ ֹϡ BaseCLX 5-15 πέ඀ёనࢍĄྭٺො TRegistry ̙ਕᑕϡ ᆸ৺ĄפĂϺΞឰଋপؠхڱౕăᐼхăວொăኑᄦٕӁੵ൳ᐂᔣ۞͞ Іੵ˞೩ֻฟୁăᙯۏ న HKEY_CURRENT_USER үࠎॲᔣࣃĄTRegistry ࡭Ąּтֹϡ TRegistry ΞҋҖՙؠॲᔣࣃᄃ̄ᔣĂ҃ TRegistryIniFile ݋࿰ ᄃր௚൳ᐂ۞ඕၹ࠹༊˘ڱІ̚۞ᛳّᄃ͞ۏ ĂTRegistryڱТ۞ᛳّᄃ͞ ini ᑫ९̮Іֹϡ˞࠹ פTregistryIniFile ᄃх ٺዋЪֹϡ TRegistryĄѣҾ ଋᇤᆷ่д Windows ેҖ̝ᑕϡ඀ё֭௫ၚ˞ր௚൳ᐂ̝ඕၹĂଋྵڍт ֹϡ TRegistry ΃ TRegistry ̮ІĄפ TRegistryIniFile ֹଋ̙ຐொങனѣ۞඀ёቅٕᇤᆷྭπέᑕϡ඀ёĂ˵ᑕྍͽ ٙ̚ѣડٕ߱ࣃౌјࠎ̄ᔣĄTRegistryIniFile ̏̂̂ᖎ̼൳ᐂᑫ۞ፆүĂӈ ൳ᐂᑫޢTMemIniFile ۞ᑫ९ЩჍ)૟ົјࠎ൳ᐂᑫ̚ user key ۞ॲᔣࣃĂ̝ ၹё̚۞ણᇴ(TIniFile ٕޙІॡĂଋٙ็ˢۏ ϲ TRegistryIniFileޙ ᄃᆷˢ)Ąפ᝝)ڱ̏Βӣ TIniFile ᄃ TMemIniFile ̚۞ٙѣ͞ ညĂιޝTRegistryIniFile ឰր௚൳ᐂ̰۞ีϫ̈́ፆү͞ё࠻੓ֽᄃ ini ᑫ९ TCustomIniFile ֹϡӈΞĄ І޽ගᑕϡ඀ё̚ۏ૟ޢІ(Linux)Ă̝ۏ (Windows)ٕߏ TMemIniFile Іۏ ϲ TRegistryIniFileޙĂГՙؠޢݭၗĂӀϡ୧І඀ёቅҿҾүຽր௚ І TCustomIniFileۏјϫ۞ĄΪࢋଋᑕϡ඀ё̂̚ొ̶۞඀ёቅౌࢉϠҋͭ ӄଋ྿םֹ̚ϡր௚൳ᐂĂ҃д Linux ֹ̚ϡ ini ᑫĂTRegistryIniFile ݋Ξ TRegistryIniFile ૟Ȉ̶ЪዋĄ࣐ࡶߏ˘ྭπέᑕϡ඀ёĂଋຐд Windows ր௚൳ᐂĂ֤ᆃٺ̏௫ၚֹϡ ini ᑫ९Ăҭࢍထឰᑕϡ඀ёྤੈԼཉ ĄࡶҰѝטࢨ̝˯ޘܜࠎր௚൳ᐂࠎลᆸёĂՀࠎᘦઉĂ֭ͷ൑ ini ᑫਠѣ ini ᑫĄЯ ܧր௚൳ᐂĂ҃ٺ̂ొ̶۞ 32bit ෛ඄ᑕϡ඀ё૟ιࣇ۞ྤੈᐼх ֹϡ TRegistryIniFile ᆷаĄ ॾᙯౕॡܑٺϲॡ᝝΍Ă֭ޙॾܑٺᑕϡ඀ёՏѨેҖॡĂini ᑫ९۞̰टົ ᄃ඀ёనࢍ͘Ίܝ5-16 ˢ ซА΍۞޽ᇾҚЕޢ TStack TQueue АซА΍۞޽ᇾҚЕ TInterfaceList ̬ࢬ޽ᇾҚЕ TClassList ᙷҾݭҾ۞ҚЕ Ҿ۞ᇹּ) TComponentList ੃ጸវგந۞̮ІҚЕ(˵ಶߏᄲĂଂTComponentᚶٚ˭ֽ۞ᙷ І၁វҚЕۏTObjectList ੃ጸវგந۞ І၁វҚЕۏ(TObjectBucketList ᗔര(hashed TBucketList ᗔര(Hashed)޽ᇾҚЕ TThreadList щБેҖჰ޽ᇾҚЕ TList ޽ᇾҚЕ І ჯ᜕ۏ ܑ5.6 გநҚЕ۞ᙷҾ ˭Еܑॾ̚Е΍̙Т۞ҚЕᙷҾᄃЧҋΒӣ۞ีϫݭၗĈ ݭၗă͚೯۞үຽր௚ᄃߏӎ׍౯ϖᜈֽّડ̶Ą BaseCLX ̚ѣధк΃ܑҚЕٕะЪ(collection)̝ᙷҾĂιࣇֶ໰Βӣีϫ۞ ፆүҚЕ end; end; Registry.Free; finally := Registry.ReadString(‘VALUE!’); Result Registry.OpenKey(KeyName, Flase); ϲޙॲᔣࣃ̙хдĂ̙ᅮࢋڍ // ᏾ᄱĂт Registry.RootKey = HKEY_LOCAL_MACHINE; try Registry := TRegistry.Create(KEY_READ); stry: TRegistry; begin Regi var function GetRegistryValue(KeyName: string): string; ࣃפଂ൳ᐂᑫ̚ځЕቑּᄲ˭ ֹϡ BaseCLX 5-17 ΃ആ Add ֽ૟ีϫΐˢϒቁ۞ҜཉĄڱ͞ (queue)Ăιࣇϡ Push ߏѣԔҚЕ(ordered lists)тુᝑ(stack)ٕҞЕ۞ڱ͞ ଘ˘՟ѣ Add hash algorithm)ՙؠีϫҜཉĄ)ڱҚЕߏϤᗔരႊზ ĂЯࠎ Bucketڱ͞ Їຍ೧ˢีϫĂ˵̙Ξͽд Bucket ҚЕֹ̚ϡ Insertڱ͞ ϫ۞ҜཉߏְАՙؠ۞Ă̙ΞͽдଵԔ࿅۞ҚЕֹ̚ϡ InsertีܧĂੵڱ͞ Ϥણᇴপؠ୬ΐˢีϫдҚЕ̚۞ҜཉĄӈֹᙷҾ̚Тॡ׍ѣ Add ᄃ Insert ᙷҬĂΪߏଋΞᖣڱ͞ ᄃ AddڱĂ׎၁ྍ͞ڱ͞ ߙֱҚЕᙷҾϺ೩ֻ Insert ϲ˘࣎າีϫĂଋΞࠎѩາีϫ޽ؠᛳّࣃĄޙңણᇴĂҭߏιົ ݋̙ᅮࢋЇڱ͞ ᐌ۞ᇴፂүࠎણᇴĄะЪ(Collection)۞ AddܢᔘΒ߁ีϫ ಶ̙Ϊᅮࢋ୬ΐˢ۞ีϫĂڱ͞ TBucketList ᄃ TObjectBucketList) ۞ Add а็ΐˢีϫдҚЕ̚۞ҜཉĄBucket ҚЕ(тޢˢ۞ีϫүࠎણᇴĂ൒ ૟୬ΐົڱ͞ ٕߏдҚЕ(གྷ࿅ଵԔ)̚ዋ༊۞ҜཉΐˢีϫĄ˘ਠ҃֏ Add ĂឰଋдҚЕ(ϏགྷଵԔ)౵ϐბΐˢีϫڱ͞ ̂ొЊ۞ҚЕᙷҾౌົѣ Add ᆧΐҚЕีϫ ĄڱҚЕีϫ̝ВТ͞פొ̶ҚЕ̶ֳ˘௡ᆧΐăӁੵᄃх ᔵ൒̙Т۞ҚЕᙷҾΒӣ̙Т۞ีϫ(item)ĂϺᚶٚҋ̙Т۞ͭᙷҾĂҭ̂ ҚЕ۞˘ਠፆү THashedStringList ԛёࠎName=Value۞фҚҚЕĂͽᗔര͞ё೩੼ड़ਕ TStringList фҚҚЕĄ TCollection পҾؠཌྷ۞ีϫ۞৶͔ะЪĄ TCollection পҾؠཌྷ۞ีϫ۞৶͔ะЪ ІҚЕۏซА΍۞ޢTObjectStack ჯ᜕ ІҚЕۏTObjectQueue АซА΍۞ І ჯ᜕ۏ ᄃ඀ёనࢍ͘Ίܝ5-18 ˢ THashedStringListĂιࣇপҾ͚೯ Name=Value ԛё۞фҚĂٙͽଋΞӀϡ фҚҚЕϒт׎Щ̰ӣфҚĂѣ׌̂ᙷҾΒ߁ TStringList ᄃ ߏфҚҚЕᄃะЪĄ ˢ੃ጸវĄ ϖᜈҚЕѣ׌̂͹ࢋݭၗಶྶ׀˘఺ֱีϫॡĂົᄃ̮ІזІϡ ྍҚЕΐˢีϫĂдેҖॡഇ༊̮ٺ۞ published ᛳّĄଋΞͽдనࢍॡഇ ϖᜈҚЕ(Persistent List)Ξజᐼхдܑॾᑫ९̚ĂЯѩιࣇ఼૱జүࠎ̮І ϖᜈҚЕ ĄځᙷҾણዦቢ˯ᄲ ĂΞॲፂଋֹٙϡ۞ڱЧҚЕᙷҾ̚׍౯˞ֱࣹ͞ٺଵԔҚЕ̚۞ีϫĄҌ ឰଋڱ͞ ΞឰีϫொҌপؠҜཉĂٕߏ Sortڱ͞ ̚׌ีϫ̢ೱҜཉĂMove ΞឰҚЕڱ͞ ឰଋࢦາщଵҚЕีϫĂт ExchangeڱߙֱҚЕᙷҾ೩ֻ͞ ࢦາщଵҚЕีϫ ϫĄีפІֽхۏ ٙа็ TList ڱ͞ ϫĂυืАᗆҝ(lock)ҚЕĂ౅࿅ LockListีפຐࢋд TThreadList ̚х ϫĄี۞פҚЕჍࠎ DataĄ౅࿅఺ֱ৶ّ͔ኳ۞ᛳّĂଋΞপؠຐࢋх ߙ˘ีϫ۞ᛳّĂ఼૱ྍᛳّЩჍࠎ ItemsĂдфҚҚЕ݋Ⴭࠎ StringsĂbucket ҚЕ̚פٙѣ۞ҚЕᙷҾ(ੵ˞ TThreadList ᄃѣԔҚЕ)Ăౌ׍౯Ξͽឰଋх ҚЕีϫפх ѣԔҚЕĄ ٺхд̙ڱĂҭྍ͞ڱ͞ Ψ ClearײଋᅮࢋӁੵҚЕٙ̚ѣ۞ีϫĂΞڍт ݋̙ᅮගણᇴĂЯࠎΪѣ౤ბ۞ีϫົజӁੵĄڱ͞ ĂPopڱ͞ ѣԔҚЕᄃ׎΁ҚЕ̪൒ѣ̙ٙТĂιࣇࢋଂҚЕ̚Ӂੵีϫυืֹϡ Pop ĂѣֱᙷҾ݋׌۰࠰ѣĄڱֱᙷҾΪѣ Delete ٕ Remove ˘჌͞ ݋ͽ୬Ӂੵีϫ۞ણ҂ࣃүࠎણᇴĄѣڱ჌͞˘ޢੵีϫ۞৶͔үࠎણᇴĂ ͽ୬ӁڱĂ݈ี͞ڱ͞ ࢋӁੵҚЕ̚ಏ˘ีϫĂΞͽֹϡ Delete ٕ Remove ӁੵҚЕีϫ ֹϡ BaseCLX 5-19 y ఍நҚЕ̰۞фҚĄ y யϠາ۞фҚҚЕĄ y ྶˢ׶ᐼхфҚҚЕĄ ΞͽдેҖॡഇӀϡфҚҚЕેҖ఺ֱ̍үĈ TString ӈΞणฟфҚҚЕበᏭጡĂଋΞበᏭăᆧΐٕӁੵҚЕĄ TString ۞᛼ҜĂᗕᑝ ٺфҚҚЕ۞ᛳّࣃពϯזІᑭෛጡ̚ଋΞ࠻ۏд TStrings ۞̄ᙷҾ)Ą ϡ఺ҚЕ༊үЕϯ͞๴۞ีϫҚЕ(˵ߏޢфҚҚЕ(TStrings ۞̄ᙷҾ)Ă൒ ѩϹೱ۞—˵ಶߏᄲĂଋΞͽበᏭ Memo ̮І۞كІߏΞۏѩγĂ఺ֱҚЕ фҚҚЕ̰ट۞ԼតĄٺy аᑕ၆ ଵԔ۞фҚҚЕ,֨ͤфҚࢦᖬĄ̏ٺy ၆ y ଵԔфҚҚЕĄ Іēְ̈́ڱĂ֭ͷ೩ֻͽ˭Αਕٙᅮ۞ᛳّĂ͞ڱ͞ ၆ЇңݭҾҚЕ۞఼ϡ̬ࢬĄTStringList ᙷҾ၁ү TStrings ᙷҾ۞ٙѣ٩෪ І೩ֻۏ ҖЕีϫඈඈĄBaseCLX ౅࿅ TStrings ׶ι۞̄ᙷҾ TStringList ϫĂMemo ̮І۞͛фĂЕ΍щ྅дր௚˯۞фݭĂٕߏᇾϯ StringGrid ۞ ౵૱ֹϡҚЕᙷҾಶߏф̮фҚҚЕĂּтĂЕϯ͞๴ٕߏ௡Ъ͞๴̰۞ี ፆүфҚҚЕ ีϫĄ ॡĂдనࢍॡഇΞֹϡ collection editor ֽᆧΐăொੵᄃࢦາщଵะЪ̰۞ ᛳّߏะЪڍІ̚፾ϲүϡĄтۏpublished ᛳّĂ҃ͷ̂к̙ਕд၁ү۞ Ąٙѣ۞ะЪౌజనࢍࠎڱ̝পؠᙷҾĂιࣇΞֹϡ̂ొЊҚЕ۞ፆү͞ ะЪ(collection)ᚶٚҋ TCollectionĂะЪ͹ࢋߏΝგநᚶٚҋ TCollctionItem ̚ྎࢗĄ ІĄфҚҚЕົд5-19ࢱ۞ĶፆүфҚҚЕķ˘༼ۏ˘фҚౌΞឰଋΝాඕ Values ᛳّߤྙ၆ᑕ۞ࣃֽຩವфҚĄੵѩ̝γĂ̂ొЊфҚҚЕ̚۞Տ˘ ᄃ඀ёనࢍ͘Ίܝ5-20 ˢ ࢦࢋ۞ߏࢋϡ try..finally ડ๴᜕ܲ఺੨ޝആҋ̎׶ι۞фҚ੨ཉ੃ጸវĂ ІົۏфҚҚЕٺĄϤڱІ۞౵щБ͞ۏιă֭ঐໝιĄ఺ߏֹϡфҚҚЕ ࡶߏΪᅮࢋдಏ˘඀Ԕֹ̰ϡ۞фҚҚЕĂΞͽдТ˘࣎г͞யϠιăֹϡ ൺഇфҚҚЕ ఺ҚЕĄٸёࠎңĂ੃଀Ұౌυื࢑యдֹϡԆலॡᛖ ഇҚЕ(дඕՁ඀ё݈ౌхд)҃ؠĄ̙გயϠ۞͞ܜٕ(யϠăֹϡ֭ঐໝ۞ ܑ۞ܑॾĄயϠ׶გநфҚҚЕ۞͞ёߏॲፂҚЕߏൺഇҚЕ(дಏ˘඀Ԕ̰ ా̮І۞፾ϲфҚҚЕĄּтĂଋ۞ᑕϡ඀ёΞਕᅮࢋჯ᜕фҚҚЕүࠎߤ ఼૱ĂфҚҚЕົ༊ү̮І۞˘ొЊֽ఍நĄҭߏĂଋ˵ߏΞͽயϠ՟ѣ࠹ ϲາ۞фҚҚЕޙ ;end end; SaveToFile(ChangeFileExt(FileName, '.bak'));{ ᐼх౯Њᑫ } LoadFromFile(FileName);{ ྶˢᑫ९ } begin with Form1.Memo1.Lines do FileName := 'C:\Program Files\MyProgram\MyFile.ini';{ నؠᑫЩ } begin FileName: string;{ ᑫЩᐼхડ } var procedure EditWinIni; MyFile.bak ۞౯ЊᑫĈ memo ᛼ҜĂ֭ᄦү˘ЊΨઇ ז఺ּ̄૟ MyFile.ini ᑫ९ྶˢ˘Њ ૟ีϫҚЕᐼхдЕϯ͞๴ٕߏԆፋ۞ outline ̰Ąט࠹Т۞፟ ϲᖎಏ۞͛фበᏭጡĄΞͽӀϡޙĂΞͽ૟ᑫ९ྶˢ Memo ̮ІĂԣి۞ڱ ଂ͛фᑫ᝝ˢфҚܑЕĄ͛фᑫ۞Տ˘Җ၆ᑕҚЕ̚۞Տ࣎фҚĄϡ఺ֱ͞ ૟фҚҚЕхˢ͛фᑫ׶ڱ͞ І೩ֻ SaveToFile ׶ LoadFromFileۏфҚҚЕ ྶˢ׶ᐼхфҚҚЕ ІాඕфҚҚЕĄۏy ૟ ֹϡ BaseCLX 5-21 interface unit Unit1; ᑫ९̰Ąז݈૟ҚЕᐼх дՏѨֹϡ۰޷˭໣ဂ޷ᔣॡΐˢ˘࣎фҚĂᑕϡ඀ёົдঐໝ఺ҚЕ̝ ఺ቑּពϯ˘࣎Ψઇ ClickList ۞фҚҚЕĄ͹ܑॾ۞ click ְІ఍ந඀Ԕົ ྍфҚҚЕĄٸ0 ആ͹ܑॾ۞ OnClose ְІயϠ఍ந඀Ԕͽᛖ Ә۞᛼ҜĄކௐ˘Վូٙ ၹфҚҚЕ֭૟ι޽ගଋдޙந඀Ԕົдܑॾ΍னдᏈ၌̝݈ಶેҖĂ ёĄдેҖॡഇ఺࣎ create ְІ఍ב0 ആ͹ܑॾ۞ OnCreate ְІயϠ఍ந ҜĂኬ̟ιଋࢋֹϡ۞ЩჍĄ Іΐˢ TStrings ݭҾ۞᛼ۏ0 д඀ёಏ̮۞ᇾᐝᑫĂдᑕϡ඀ё۞͹ܑॾ дᑕϡ඀ёඕՁ݈ঐໝιĄޢၹ఺ҚЕĂ൒ޙ ࡶߏфҚҚЕдᑕϡ඀ёેҖॡౌυืхдĂυืдᑕϡ඀ёฟؕેҖॡ ഇфҚҚЕܜ ;end end; І }ۏ TempList.Free;{ ၨ໑ҚЕ finally { ֹϡфҚҚЕ } try І }ۏ TempList := TStringList.Create;{ யϠҚЕ begin ӘЕϯ }ކ }; TempList: TStrings var procedure TForm1.Button1Click(Sender: TObject); ιĄٸ ᛖޢၹфҚҚЕĂֹϡιĂ൒ޙ˭ࢬ۞ְІ఍ந඀Ԕົдаᑕ޷ต۞޷ᔣॡ ІĄۏфҚҚЕٸ0 д finally ొЊĂᛖ 0 д try..finally ડ๴۞ try ొЊĂֹϡфҚҚЕĄ ІĄۏၹфҚҚЕޙ 0 ൺഇфҚҚЕĂଋᅮ ι۞੃ጸវĄૄώ˯Ăࢋ၁үٸІᔘߏົᛖۏཉĂͽቁܲӈֹּγ൴Ϡॡ఺ ᄃ඀ёనࢍ͘Ίܝ5-22 ˢ ߙ࣎фҚĄפy х y ࢍზҚЕ̰۞фҚĄ ఺ֱΞਕߏଋᅮࢋેҖ۞˘ਠፆүĈ ఍நҚЕ̰۞фҚ end. end; ClickList.Add(Format('Click at (%d, %d)', [X, Y]));{ ΐˢфҚҌҚЕ } begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; end; І }ۏ ClickList.Free;{ ၨ໑ҚЕ ClickList.SaveToFile(ChangeFileExt(Application.ExeName, '.LOG'));{ ᐼхҚЕ } begin procedure TForm1.FormDestroy(Sender: TObject); end; ClickList := TStringList.Create;{ யϠҚЕ } begin procedure TForm1.FormCreate(Sender: TObject); {$R *.DFM} implementation Form1: TForm1; var end; Ә᛼Ҝ }ކ }; ClickList: TStrings Ә }ކ { public public Ә }ކ { private private Shift: TShiftState; X, Y: Integer); procedure FormMouseDown(Sender: TObject; Button: TMouseButton; procedure FormDestroy(Sender: TObject); procedure FormCreate(Sender: TObject); TForm1 = class(TForm) type {For CLX: uses SysUtils, Variants, Classes, QGraphics, QControls, QForms, Qialogs;} uses Windows, Message, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs; ֹϡ BaseCLX 5-23 ... if FileListBox1.Items.IndexOf('solitaire.so') > -1 ̰Ĉ ఺ֹּ̄ϡ IndexOf ՙؠගؠ۞ᑫЩߏӎ΍னдᑫ९Еϯ͞๴۞ᑫ९ҚЕ Ԕ఍ந఺ҚЕ֭ͧྵ఺ֱфҚĄ ಶ็а -1ĄIndexOf Ϊ၆ԆፋфҚѣड़Ă ࡶߏΪࢋొ̶࠹ТĂଋυืҋֶ̎ фҚүࠎι۞ણᇴĂ็аҚЕ̰࠹௑۞фҚ۞৶͔ĂࡶߏҚЕ̰՟ѣ఺фҚ ĄIndexOf ົͽڱ͞ ࡶࢋԱ΍фҚдҚЕ̰۞ҜཉĂֹϡфҚҚЕ۞ IndexOf Ր଀фҚдҚЕ̰۞Ҝཉ StringList1[0] := 'This is the first string.'; ٺ࠹༊ StringList1.Strings[0] := 'This is the first string.'; Strings ᙊҾфĂ૟фҚҚЕώ֗༊үߏ࣎ѣ৶͔۞фҚੱЕĄЯѩ ĂStrings ߏҚЕ۞࿰నᛳّĂЯѩΞͽ࠷ர̶ొ۞פߏфҚҚЕ౵૱х фҚੱЕĄּтĂдҚЕ۞ௐ˘࣎фҚߏ String[0]ĄҭߏЯࠎ Strings ᛳّ ϡ౉ౌΞͽԯι༊ү۞̶ొ̂ٺфҚҚЕѣ࣎Ψઇ Strings ۞৶͔ᛳّĂ၆ ߙ࣎фҚפх ࣎фҚ۞৶͔к˘Ą˘ޢͽ࿬ࠎฟᐝĂCount ົͧҚЕ۞౵ Count ᛳّߏ࣎઱᝝ᛳّĂ΃ܑҚЕ̰۞фҚᇴϫĄЯࠎфҚҚЕ۞৶͔ߏ ࢍზҚЕ̰۞фҚ y ኑᄦፋ࣎фҚҚЕĄ y ӁੵҚЕ̰۞фҚĄ y ொજҚЕ̰۞фҚĄ y дҚЕ̰ΐˢфҚĄ ҚЕ̰۞фҚĄפy ֶԔх y Ր଀фҚдҚЕ̰۞ҜཉĄ ᄃ඀ёనࢍ͘Ίܝ5-24 ˢ ఺ቑֹּϡ IndexOf ׶ Delete ֽವԱ׶ӁੵфҚĄ Ąڱ͞ ӁੵфҚҚЕ۞ٙѣфҚĂֹϡ Clear ಶΞ଀ۢĄࢋڱ͞ ৶͔ࣃĄࡶߏ̙ۢ྽ࢋӁੵ۞фҚ৶͔ࣃĂֹϡ IndexOf Ă็ˢࢋӁੵ۞фҚڱ͞ ΨфҚҚЕ۞ DeleteײࢋଂфҚҚЕ̚ӁੵфҚĂ ଂҚЕ̚ӁੵфҚ Move(2, 4) ΨĈײҜཉ˯Ă ௐ̣࣎ז৶͔ࣃĄּтĂࢋԯҚЕ۞ௐˬ࣎фҚொ۞זࣃ׶ଋࢋ૟఺ีϫொ Ă็ˢ׌࣎ણᇴĈ఺ีϫ۞ϫ݈৶͔ڱ͞ Ψ MoveײࢋдҚЕ̰ொજфҚĂ дҚЕ̰ொજфҚ ࢬ}ޢ StringList1 זStringList1.AddStrings(StringList2); { ૟фҚଂ StringList2 ΐ Ψ AddStringsēײࢬĂޢΩ˘ҚЕזΐܢࢋ૟фҚଂ˘ҚЕ Insert(2, 'Three'); ĶThree」តјҚЕ۞ௐˬ࣎фҚĂֹϡ˭ࢬ۞඀ёቅĈ ็ˢ׌࣎ણᇴĈଋࢋ೧ˢ۞фҚ΍ன۞৶͔Ҝཉ׶఺фҚĄּтĂࢋឰ Ăڱ͞ Ψ Insertײ࣎фҚĄࢋдҚЕ̚೧ˢфҚâޢфҚົតјҚЕ۞౵ Ă૟າфҚүࠎણᇴ็ˢĄΐˢ۞ڱ͞ Ψ AddײࢬΐˢфҚĂኛޢࢋдҚЕ дҚЕ̰ΐˢфҚ end; ListBox1.Items[Index] := UpperCase(ListBox1.Items[Index]); for Index := 0 to ListBox1.Items.Count - 1 do begin Index: Integer; var procedure TForm1.Button1Click(Sender: TObject); ̂ᆷфϓĈ ఺ቑּ۞ਫ਼઻ົд޷˭໣ဂॡֶԔ఍நЕϯ͞๴۞фҚ֭૟Տ࣎фҚᖼೱࠎ ҚЕфҚᇴഴ˘(Count - 1)Ąזྍଂ࿬ฟؕેҖ ࢋֶԔ఍நҚЕ̚۞Տ࣎фҚĂֹϡѣፋᇴݭҾ৶͔۞ for ਫ਼઻Ą఺ਫ਼઻ᑕ Ԕ఍நҚЕ̚۞фҚֶ ֹϡ BaseCLX 5-25 ІĄۏϏΐˢ၆ᑕ۞фҚಶࢋΐˢإ̙ਕ Objects ᛳّĄ זІͽ࠹Т۞৶͔ࣃ޽ؠۏІᙯాߙ࣎хд۞фҚĂ૟ۏࢋ૟ І)ĄۏІ(ࡶѣ࠹ా۞ۏᑕ۞ ІćּтĂӁੵфҚົொੵ၆ۏфҚ׶ٺߏ DeleteăClear ׶ Move ౌΞүϡ І࠹ా۞ௐ˘࣎фҚ۞৶͔ࣃĄညۏIndexOfObject ົ็адҚЕ̰׶޽ؠ۞ ІĄۏΪᅮಏ˘ՎូಶΞΐˢфҚ׶࠹ా۞ڱ͞ ϡ AddObject ׶ InsertObject ObjectsĄ זϡֹ̚ีטЕĄ఼૱ଋົдҋ౹ဦ͛ଠ хд Objects ᛳّ̰Ą׶ Strings ˘ᇹĂObjects ˵ߏ࣎ͽ࿬үࠎ৶͔ฟؕ۞ੱ ІҚЕĂιߏᐼۏੵ˞ᐼхд Strings ᛳّ۞фҚҚЕĂфҚҚЕ˵Ξͽѣ ІۏдфҚҚЕΐˢ Ąڍ࿰ഇ۞ඕڱІົঐεĂ఼૱ົயϠ൑ۏ⎯ࣧؕ۞фҚҚЕ StringList1 := StringList2; ᇴ޽ؠගΩ˘តᇴ— ĄࡶΪߏ૟фҚҚЕ۞តڱ͞ ࡶߏயϠડા۞фҚҚЕઘώĂֹϡ Assign Memo ̮І̰Ą זΐܢົ૟௡Ъ͞๴ЧҖ ࢬ}ޢזΐфҚܢ};(Meno1.Lines.AddStrings(ComboBox1.Items Memo ̮І(ᖬᄏ Memo ̮І̰ट)Ă҃ זົଂ௡Ъ͞๴ኑᄦЧҖ Meno1.Lines.Assign(ComboBox1.Items); {ᖬᆷࣧؕфҚ} ࢬ̙҃ᖬᄏϫ۞ҚЕĂኛֹϡ AddStringsĄּт:ޢΐдܢࢋ ϫ۞ҚЕĂᖬᄏϫ۞ҚЕ۞̰टĄז૟фҚଂࣧؕҚЕኑᄦົڱ͞ ϡ Assign ኑᄦፋ࣎фҚҚЕ end; Delete(BIndex); if Bindex > -1 then Bindex := IndexOf('bureaucracy'); begin with ListBox1.Items do ᄃ඀ёనࢍ͘Ίܝ5-26 ˢ y WideCharToStrVar y WideCharToString y WideCharLenToStrVar y WideCharLenToString y StringToWideChar фҚม۞ᖼೱĈ ё೩ֻಏ˘Ҝ̮௡ф̮(ٕ MBCS фҚ)ᄃ UnicodeבેҖॡഇ඀ёऱͽ˭Е фҚֽ఍நĄ ̮ಶ˘ؠ΃ܑ˘࣎ф̮۞ᐹᕇĂଋᔘߏົຐࢋ૟ MBCS фҚᖼೱ Unicode ᖼೱ׌჌фҚԛёĂ఺ᇹ̄۞࢑ఈ၁д͉̂˞Ą൒҃Ăѣॡ࣏ЯࠎՏ࣎ᆵф Ψౌࢋᗝγгײڱٕ͞פҚĄдᆵф̮ր௚̈́ MBCS ր௚มĂՏѨ۞ᛳّх ߏͽಏ˘Ҝ̮ٕ MBCS фҚֽពϯфีטк VCL ଠޝֹϡᆵф̮۞৿ᕇߏ Η߱༊јΩ˘࣎ф̮۞ฟᐝĄޢ̷ј˘ΗĂٕ૟ф̮۞ фҚ۞Ҝ̮௡࣎ᇴ׶фҚ۞ф̮࣎ᇴѣۡତ۞ᙯܼĄଋ̙ᅮࢋፉ͕ົ૟ф̮ к઄నĄޝMBCS ր௚۞фҚү ܧֹϡᆵф̮በቅ͞ё۞р఍ߏଋΞͽ੫၆ ᖎ̼фҚ఍ந۞યᗟĂଋົᏴፄֹϡᆵфҚĄ ᆵфҚΞٺυืࢬᓜк჌Ч჌ Locale నؠ۞ᑕϡ඀ё҃֏ĂϤٺݭၗĄ၆ Ăߙֱԫఙᇾ໤т XML ࠤҌͽᆵфҚүࠎૄώф̮ھᆵфҚྻϡгȈ̶ᇃ ᆵф̮඀Ԕ ĄهેҖॡഇ඀ёऱ̚фҚ఍ந඀Ԕ۞ໄ ୬ᒢྋՀྎ௟۞Ч჌фҚݭၗĂኛણ໰ Delphi ඀ёᄬ֏͘ΊĄ҃ͽ˭Ϊ೩ֻ ёĄבᛌ඀ё඀ԔΞ఍ந ShortString ݭၗĂιࣇΒӣ˞ Low ׶ High ඈᇾ໤ በ۞ޙЧҋ۞඀ԔĄᔵ൒֭՟ѣΞ఍ந ShortString ݭၗ۞඀ԔĂ̙࿅ѣֱ̰ фҚ׶ͽ࿬ඕԍ۞фҚ(˵ಶߏ PChars)ౌѣܜ఍ந඀ԔĂ˵ಶߏᄲᆵфҚă фҚ۞ܝк૞ޝ˞ેҖॡഇ඀ёऱ(runtime library)੫၆Տ჌фҚݭၗ೩ֻ ఍நфҚ ֹϡ BaseCLX 5-27 y ͧྵ ાЕ΍఺ֱ඀ԔĈ ॾ૟ॲፂ˭ЕΑਕᅳܑ۞˭غზॡߏӎֹϡপҾ۞໤݋Ąྻٺιࣇ۞मҾд кΑਕᅳાĄд఺ֱᅳા̝̚Ăѣֱϡ౉ߏ˘ᇹ۞Ăޝ˞фҚ఍ந඀Ԕஉ߁ܜ фҚ඀Ԕܜགྷ૱ֹϡ۞ y TrimRight y TrimLeft y Trim y Length y UniqueString ё౅࿅ᖬྶΞ఍நᆵфҚĈבѣֱ y WideUpperCase y WideLowerCase y WodeFormat y WideFmtStr CLX ᑕϡ඀ё) ٺy WideSameCaption (Ϊਕϡ y WideSameText y WideSameStr y WideCompareText y WidecCompareStr ёΞۡତ఍நᆵфҚב˭Е y WideStrToVar y VarToWideStr y WideStringToUCS4String y UCS4StringToWideString ࠹̢ᖼೱĈڱёΞ૟ᆵфҚᄃ׎΁ܑϯ͞בੵѩ̝γĂ˭Е ᄃ඀ёనࢍ͘Ίܝ5-28 ˢ AnsiMatchText ӎ ߏ ߏ AnsiMatchStr ߏ ߏ ߏ AnsiCompareFileName ӎ ߏ ߏ AnsiCompareText ӎ ߏ ߏ AnsiCompareStr ߏ ߏ ߏ ඀Ԕ ̂̈ᆷ࠹ள ֹϡ Localeనؠ ͚೯ MBCS ܑ5.7 фҚͧྵ඀Ԕ ྎ௟ྤੈĂኛણዦௐ 17 ౢĶୁϡᑕϡ඀ёቅķ˘༼Ą ф̮ٕфҚ۞޽ᇾĄѣᙯ MBCS ۞ז࿰АՙؠĄଋΞͽԼ็޽ڱ̮۞̂̈൑ ёٕ඀ԔĂЯࠎфבΗĂ఺ົԯфҚၟј˘ΗĄኛ̙ࢋ૟ф̮༊үણᇴ็ග Ҝ̮௡ĄдֹϡкࢦҜ̮௡۞ф̮ॡĂኛ͕̙̈ࢋ૟ᗕҜ̮௡۞ф̷̮ј˘ ByteType ׶ StrByteType Ξՙؠߙ࣎Ҝ̮௡ߏӎࠎкࢦҜ̮௡ф̮۞ௐ˘࣎ ࣎׶׌࣎Ҝ̮௡۞ф̮Ą˘ژ̶ Ą͚೯ MBCS ۞඀ԔΞϡֽޘܜфҚ۞ٺҜ̮௡࣎ᇴ̙֭˘ؠඈ۞ޘܜ кࢦҜ̮௡ф̮ߏͽ˘࣎׶׌࣎Ҝ̮௡ф̮ቅ۞஄ЪԛёֽܑϯĂЯѩ гડ۞඀ёॡĄڌనࢍᅈٺy ͚೯кࢦҜ̮௡ф̮ะ(MBCS) - MBCS ዋϡ ͅĂASCII ۞̈ᆷф̮ͧ̂ᆷфֽ̮଀̂Ą ౌؠཌྷ̈ᆷф̮ౌͧ၆ᑕ۞̂ᆷфֽ̮଀̈Ą఺ࣣр׶ ASCII ۞ึԔ࠹ ଋ۞ᑕϡ඀ё̚ĂপҾߏ੫၆ֲ߷۞ᄬ֏ᒖဩĄ̂кᇴ LocaleזΑਕΐ y ֹϡ locale నؠ – ୁϡ locale నؠΞឰଋ੫၆পҾ۞ locales ૟ᗝγ۞ ᆷф̮Ą̈̂׀ᇋ̂̈ᆷĂ૟ॲፂ࿰న͞ёទᏭّгЪ ඀Ԕ̙҂ڍ֭՟ѣֹϡ locale నؠĂ݋૟ॲፂф̮۞ԔᇴࣃֽՙؠĄт ඀Ԕڍϡ locale నؠĂιົՙؠ̂̈ᆷ۞ؠཌྷĄтֹڍy ̂̈ᆷ࠹ள – т ĂЕܑ˵ົ೩ֻྤੈ޽΍඀Ԕߏӎ͚೯˘ٕ࣎к࣎˭Е໤݋ĈڶႽΞਕ۞ଐ y ̄фҚ y ࣒Լ y ̂̈ᆷᖼೱ ֹϡ BaseCLX 5-29 AnsiQuotedStr NA ߏ AdjustLineBreaks NA ߏ ඀Ԕ ̂̈ᆷ࠹ள ͚೯ MBCS ܑ5.9 фҚ࣒Լ඀Ԕ ЩĂЯࠎᑫЩֹٙϡ۞ locale(ф̮ะ)Ξਕົ׶࿰న۞ֹϡ۰̬ࢬ̙ТĄ AnsiUpperCaseFileName Бౌֹϡ Locale నؠĄଋᑕྍֹϡ౵׍Ξᛸّ۞ᑫ фҚᑫЩ۞඀ԔĈAnsiCompareFileNameăAnsiLowerCaseFileName ׶ٺො ϡ UpperCase ӎ ӎ LowerCase ӎ ӎ AnsiUpperCase ߏ ߏ AnsiUpperCaseFileName ߏ ߏ AnsiLowerCaseFileName ߏ ߏ AnsiLowerCase ߏ ߏ ඀Ԕ ֹϡ Localeనؠ ͚೯ MBCS ܑ5.8 ̂̈ᆷᖼೱ඀Ԕ AnsiResembles Text ӎ ӎ ӎ CompareText ӎ ӎ ӎ CompareStr ߏ ӎ ӎ AnsiIndexText ӎ ߏ ߏ AnsiIndexStr ߏ ߏ ߏ AnsiEndsText ӎ ߏ ߏ AnsiEndsStr ߏ ߏ ߏ AnsiStartsText ӎ ߏ ߏ AnsiStartsStr ߏ ߏ ߏ AnsiContainsText ӎ ߏ ߏ AnsiContainsStr ߏ ߏ ߏ ඀Ԕ ̂̈ᆷ࠹ள ֹϡ Localeనؠ ͚೯ MBCS ᄃ඀ёనࢍ͘Ίܝ5-30 ˢ y ࣒Լ y ̂̈ᆷᖼೱ y ͧྵ ΑਕᅳાЕ΍఺ֱ඀ԔĈ ॾ૟ॲፂ˭Еܑ۞˭غზॡߏӎֹϡপҾ۞໤݋Ąྻٺᇹ۞Ăιࣇ۞मҾд кΑਕᅳાĄд఺ֱᅳા̝̚Ăѣֱϡ౉ߏ˘ޝ˞࿬ඕԍфҚ఍ந඀Ԕஉ߁ གྷ૱ֹϡ۞࿬ඕԍфҚ඀Ԕ QuotedStr ӎ ӎ MidStr NA ӎ RightStr NA ӎ LeftStr NA ӎ LastDelimiter ߏ ߏ IsPathDelimiter ߏ ߏ IsDelimiter ߏ ߏ AnsiPos ߏ ߏ AnsiExtractQuotedStr NA ߏ ඀Ԕ ̂̈ᆷ࠹ள ͚೯ MBCS ܑ5.10 ̄фҚ඀Ԕ WrapText NA ߏ TrimRight NA ߏ TrimLeft NA ߏ Trim NA ߏ StringReplace Ϥၮᇾՙؠ ߏ StringReplacesText ӎ ߏ StringReplacesStr ߏ ߏ ඀Ԕ ̂̈ᆷ࠹ள ͚೯ MBCS ֹϡ BaseCLX 5-31 StrLCat StrCat ඀Ԕ ܑ5.13 ࿬ඕԍфҚ࣒Լ඀Ԕ StrUpper ӎ ӎ StrLower ӎ ӎ AnsiStrUpper ߏ ߏ AnsiStrLower ߏ ߏ ඀Ԕ ֹϡ Localeనؠ ͚೯ MBCS ܑ5.12 ࿬ඕԍфҚ̂̈ᆷᖼೱ඀Ԕ StrLIComp ӎ ӎ ӎ StrLComp ߏ ӎ ӎ StrIComp ӎ ӎ ӎ StrComp ߏ ӎ ӎ AnsiStrLIComp ӎ ߏ ߏ AnsiStrLComp ߏ ߏ ߏ AnsiStrIComp ӎ ߏ ߏ AnsiStrComp ߏ ߏ ߏ ඀Ԕ ̂̈ᆷ࠹ள ֹϡ Localeనؠ ͚೯ MBCS ܑ5.11 ࿬ඕԍфҚͧྵ඀Ԕ ؠٕߏ͚೯кࢦҜ̮௡ф̮ะĈ ຍ̂̈ᆷăֹϡ locale నڦĂЕܑ˵ົ೩ֻྤੈ޽΍඀ԔߏӎڶႽΞਕ۞ଐ y ኑᄦ y ̄фҚ ᄃ඀ёనࢍ͘Ίܝ5-32 ˢ ኏ࡎĈ۞פົயϠх nilĂ఺ פ۩фҚ֭՟ѣѣड़۞ྤफ़ĄЯѩࡶଋആ۩фҚనؠ৶͔૟ԛТх S = ''; ֹٕϡ۩фҚֽүീྏĈ S = EmptyStr; ۩фҚĂଋΞͽֹϡ EmptyStr តᇴĈ фҚ૟ົҋજనј۩фҚĄࡶࢋീྏфҚߏӎࠎܜࣃĄܐ̙֭ᅮࢋనؠι۞ S: string; фҚॡĈܜӘކ༊ଋ ࣃܐӘ׶నؠކфҚ۞ StrPLCopy StrPCopy StrMove StrECopy StrLCopy StrCopy ඀Ԕ ܑ5.15 фҚኑᄦ඀Ԕ StrRScan ߏ ӎ StrScan ߏ ӎ StrPos ߏ ӎ AnsiStrRScan ߏ ߏ AnsiStrScan ߏ ߏ AnsiStrPos ߏ ߏ ඀Ԕ ̂̈ᆷ࠹ள ͚೯ MBCS фҚ඀Ԕ̄ 5.14ܑ ֹϡ BaseCLX 5-33 SetLength(S, n); S: string; Ә˘࣎ݭၗࠎ string ۞តᇴĂֹ֭ϡ SetLength ඀ԔĄކфҚĂኛܜ۞ ࠎ nޘܜӘކфҚĄࡶࢋܜܧࠎ n ۞ൺфҚĂ҃ޘܜӘ˘࣎ކቁгځٺ࠹༊ S: string[n]; string ॡĈ ۞˭غӘކኛ੃଀༊ଋ ёĄב Ăኛֹϡ Lengthޘܜ଀фҚ۞פфҚ۞ણ҂ࢍᇴࠎ 1Ąࡶࢋ ࣎Ҿ۞фҚĂྍזĂS Ξܲᙋણ໰ޢ̝ ΨԆ SetLengthײ۩ม̰ट݋ϏؠཌྷĄ ༊ଋֹϡ SetLength ॡĂфҚ̚னѣ۞ф̮૟ܲ޺̙តĂ̙࿅Їңາ੨ཉ۞ proc(PChar(S));// proc னд̙ᅮࢋ఍ந nil నؠࠎ 100ޘܜSetLength(S, 100);// ૟ S ۞જၗ Ĉ:ޘܜֹٕϡ SetLength ඀Ԕֽనؠι۞ proc(PChar(S));// proc னд̙ᅮࢋ఍ந nil S := 'No longer nil'; ࣃĈܐι̙ਕ఍நĂଋΞͽАనؠфҚ۞ڍт end; // ޽΄ proc(PChar(S));// ቁؠ proc Ξͽ఍ந nil begin S: string; // ۩фҚ var ι˯ࢬ۞඀ԔĂኛቁؠྍ඀ԔΞ఍ந nilĈז̝ᙷ۞ྤफ़็ගᅮࢋ᝝ٕᆷ ଋ૟ PCharڍ૟ߏ nil ޽ᇾĄЯѩтڍ૟۩фҚᖼೱј PCharĂඕڍТᇹĂт end; // ޽΄ ኏ࡎפ S[i];// ఺ົ൴Ϡх begin S: string; var ᄃ඀ёనࢍ͘Ίܝ5-34 ˢ begin procedure my_func(x: string); ᖼೱј PCharĂኛ੃଀ࢋგநٙயϠ PChar ۞Ϡ׻ഇมĄּтĈ ଋυื૟фҚڍ۞ PChar ˵ົঐεĂΞߏ็ˢྍણᇴ۞඀Ԕ̪ົֹϡιĄт ᇴតј࿬ॡĂӈֹ̪ѣᗝγ۞࠹ֶّдι˯ࢬĂфҚ̪ົజঐໝĄᖼೱ΍ֽ Қ۞࠹ֶّ(dependency)ᆧΐ 1ĂΞߏ֭՟ѣ၁ᅫᆧΐણ҂ࢍᇴĄ༊ણ҂ࢍ фҚଳϡ˞ણᇴࢍᇴĂ૟фҚݭၗᖼೱј PChar ົ૟фܜPCharĄ̙࿅Яࠎ זёϡבфҚᖼೱјͽ࿬ඕԍ۞фҚĂּтࡶଋֹϡ۞ܜѣॡ࣏ଋᅮࢋ૟ фҚ࠹ֶّ ώ༼૟ଣ੅Яࠎ఺ֱमளٙౄј۞ႷᙱᗔাĄ Ă҃ PChars ݋Ϊͽ࿬ඕԍĄޘܜфҚ૟ͽ࿬ඕԍĂ֭ΒӣфҚ۞ܜ y ੃ጸវ۞޽ᇾĄזy ޽ؠගфҚ૟ົኑᄦྤफ़Ă҃ PChar Ϊߏ޽ фҚଳϡણ҂ࢍᇴĂΞߏ PChars ̙֭ߏĄܜ y ιࣇΞਕົֹ଀ᖼೱ൴ϠયᗟĄ фҚ̙֭ົҋજᖼј PCharĄ˭Е୻ಏೡࢗ˞фҚ׶ PChars ۞˘ֱमளĂܜ фҚᖼј PChar Qtypes.pas ಏ̮Ą ٺೱĂιࣇౌؠཌྷ ϡֽд Qt фҚݭҾ̈́ Delphi фҚݭҾ̝มᖼܝQStringListToTStringList)૞ ё (CopyQStringListToTstrings Ă CopyTStringsToQStringList Ăב׎ι Ąڱቁؠ఺ߏଋຐࢋ۞ү PAnsiStringăPString ٕ PWideStringĂኛ੃଀఺૟͔ϡΩ˘࣎มତᆸ৺Ąኛ ޽ᇾݭၗĂּт۞ޙଋֹϡߙ̰࣎ڍфҚ̏གྷજၗг੨ཉĄтܜ ॡĂфҚࣃົజၟଫĄܜޘܜӘ۞౵̂ކຍࡶфҚͧൺфҚតᇴٙڦᇴॡĂኛ யϠ඀ёቅֽેҖυࢋ۞фҚݭၗᖼೱĄ̙࿅༊ଋ૟фҚࣃ޽ؠගൺфҚត фҚ׶ᆵфҚд޽ؠ׶ྻზё̚Ξͽ஄ЪֹϡĂበᛌ඀ёົҋજܜൺфҚă ஄Ъ֭ᖼೱфҚݭၗ ֹϡ BaseCLX 5-35 end; // ୃࢗ S := buf; i := FillBuffer(0, @buf, SizeOf(buf));// ૟ @buf ༊үߏ PChar begin S: string; buf: array[0..MAX_SIZE] of char; i: Integer; var // ઄న MAXSIZE ߏְАؠཌྷ۞૱ᇴ end; M begin function FillBuffer(Buf: PChar; Count: Integer): Integer; ёב// ઄న FillBuffer ߏְАؠཌྷ۞ ගфҚĈ ޽ؠྍតᇴޢёĂ൒בϲડાّ۞ array of charĂ֭૟ι็ගྍޙߏ˘̝ڱ ࣃĄ͞ܐёֽనؠב۞ Ψ˘ֹ࣎ϡ PCharײ઄నଋѣ˘࣎ડાфҚតᇴᅮࢋ ૟ડાតᇴ็ј PChar జᛖ΍Ą аॡĂྍྤफ़ಶົܔёב фҚྤफ़۞޽ᇾĂΞߏ༊ titleז఺࣎ቑּົ็а޽ end; Result := PChar(s); // ̙ࢋ఺ᇹઇ s := Format('title - %d', [n]); begin s: string; var function title(n: Integer): PChar; ੃ጸវ۞޽ᇾĂ̙҃ߏфҚ۞ણ҂ࢍᇴኑώĄּтĈ זࣃâ࣎ડાតᇴĄ༊ଋ۞඀ԔඕՁॡĂPChar ૟ົঐεĂЯࠎιΪߏ޽ ࣎ྤफ़ඕၹ̚Ăٕ็ај˘࣎ᇴ˘ז఍ந PChars ˘࣎૱֍۞᏾ᄱಶߏ૟ιх ็а PChar ડાតᇴ end; ёᅮࢋֹϡιב // Ϊࢋ఺࣎ some_proc // ଋனдᅮࢋቁܲфҚᔘхд some_proc(PChar(x)); // ૟фҚݭၗᖼೱࠎ PChar ၆ x үֱ఍ந // ᄃ඀ёనࢍ͘Ίܝ5-36 ˢ Яࠎ఺ߏ˘࣎ۡତ͔ϡĄ በᛌ޽ϯ۞ాඕĂזϲాޙфҚણᇴĄଋΞͽ۞ٸӘฟކфౌΞϡֽ фҚણᇴĄ̙გ$P޽͔۞నؠࠎңĂOpenStringᙊҾ۞ٸιࣇߏฟ ၗ˭Ăې{+Ә۞តᇴણᇴߏ˘ਠ۞តᇴણᇴĂ҃д{$PކфҚᙯᔣф ၗ˭Ăֹϡې{-Ә۞តᇴણᇴ۞ຍཌྷĄд{$Pކၗ˭ֹϡфҚᙯᔣфې {-д{$H˞טώჯ޺࠹टّĄ$PଠۍDelphi׶Borland PascalА݈۞ ၗ˭በᛌ۞඀ёቅѣຍཌྷĂι۞үϡߏᄃې{-{$P+/-} $P በᛌ޽ϯΪ၆ͽ{$H ૟ιԼјShortStringĄ фҚĄଋΞͽֹϡ {$H-} ޽͔ܜၗ{$H+}̝˭Ăstring΃ܑ۞ߏېన фҚĄд࿰ܜ঻фstringٙ΃ܑ۞ߏൺфҚٕܲ˞ט{$H+/-} $H በᛌ޽ϯଠ በᛌ޽ϯ үϡ ܑ5.16 фҚ࠹ᙯ۞በᛌ޽ϯ Е΍˞఍நф̮׶фҚݭၗ۞በᛌ޽ϯ(directive)Ĉ˭غ фҚ࠹ᙯበᛌ޽ϯ end; // ୃࢗ SetLength(S, GetModuleFilename( 0, PChar(S), Length(S) ) ); SetLength(S, 100);// д૟ݭၗᖼೱј PChar, ቁؠфҚ̙ߏ۩۞ begin S: string; var ˘Җ඀ёϒቁгેҖ఺ี̍үĈ ё૟็аኑᄦ۞Ҝ̮௡࣎ᇴĂଋΞͽֹϡבଋֹϡ۞ڍĄтޘфҚ۞၁ᅫᆵ ᑕͅܮĂͽޘܜof char ޽ؠග string ॡҋજܲ޺ϒቁĄଋᑕྍࢦనфҚ۞ ည૟ arrayົ̙֭ޘܜ඀Ԕ̙ᅮࢋ૟ PChar ܲ঻д੃ጸវ̚)Ą̙࿅ĂфҚ۞ ଋቁؠྍڍࡶࢋ࠷ݒኑᄦቤ኏ડ۞ᗝγ࢑ፉĂଋΞͽ૟фҚᖼೱј PChar(т ௡࣎ᇴĄ buf ̰۞Ҝ̮ ז૟ҋજϒቁг޽΍ᆷޘܜаॡĂфҚ۞ܔ GetModuleFilename щБĂЯࠎ array of char ׶ string ̝ม۞ᖼೱߏҋજ۞Ą༊ޝ ˵ᝑ̚Ą఺࣎͞ёુٺѣϡĂЯࠎι૟੨ཉޝĂ఺࣎͞ёಶ̈ޝቤ኏ડڍт ֹϡ BaseCLX 5-37 ˘୧ۡቢē Ăιົଂܑॾ۞ν˯֎ҌΠ˭֎൪ڱቅϯቑ˘࣎޷ต۞ OnClick ְІ఍ந͞ ̈́ᇆညඈඈĂΞֻҰдٙѣ೩ֻ Canvas পّ۞̮І˯ֹϡĄּтĂ˭Е඀ё TCanvas Β྅ధкૄώ۞ᘱဦ඀ԔֻҰֹϡĂΒ߁ᘱᄦቢ୧ĂкᙝԛĂ͛ф ІࠎҰຣؠ Ąۏ І҃໭೗Ăٙͽ఺ֱႲ༤۞௟༼ౌϤ canvasۏሹඈඈ ĂአҒהІĂҰಶ̙ᅮࢋГࠎ੨ཉ൪ඊĂඊۏ О͚೯ķ͹ᗟ)Ąֹϡ canvas І˯ᘱဦ۞ਕ˧(ኛણ҂д5-38ࢱ۞ĶЕۏОܑ፟̈́ีט೩ֻдܑॾĂЧёଠ Іۏ ྅˞ paint device(Qt Painter)ඈᘱဦ྅ཉĄTCanvasދTCanvas ᙷҾ݋ ྅˞ Windows device contextĂд QGraphics unit ̚۞ދTCanvas ᙷҾ ώĄд Graphics unit ̚۞ۍᄃྭπέ඀ё(QGraphics unit)ѣ׌࣎፾ϲ۞ BaseCLXĂιࠎ Windows ᒖဩ(Graphics unit) ٺᚑॾᄲ TCanvas ᙷҾ̙ᛳ ϲ drawing spacesޙ (̮۞WriteăWritelnăValăAssign׶RenameĄ ҚĄ(఺ֱఢ݋Ξឰͽ࿬ࠎૄᖂ۞ੱЕ׶ф̮޽ᇾϡдֽҋSystemಏ (zero-based)̝ф̮ੱЕ۞পঅఢ݋ĂֽឰDelphi͚೯ͽ࿬ඕԍ۞ф PCharݭၗ׶ͽ࿬ࠎૄᖂޙ̰ז{$X+/-} {$X+}በᛌ޽ϯΞᖣ඾ୁϡइϡ end. Test(S); begin end; T := '1234'; begin procedure Test(var T: string); var S: string[3]; ࡭੃ጸវຫ໑ĄּтĈ ຍ఺ΞਕົጱڦТĄኛ̙ޘܜ׶ԛёણᇴ۞౵̂ޘܜӘ۞౵̂ކӈֹ ၗ˭ĂЇңൺфҚݭၗតᇴౌΞүࠎ၁ᅫણᇴĂې(ᇹĄд{$V-}(ᆵᗫ фҚݭၗᑭߤ૟ົેҖĂιົࢋՐԛёᄃ၁ᅫણᇴ۞фҚݭၗυื˘ ၗ˭Ăې{+јតᇴણᇴ۞ൺфҚ۞ݭၗᑭߤĄд{$V็˞ט{$V+/-} $V ޽͔ଠ በᛌ޽ϯ үϡ ᄃ඀ёనࢍ͘Ίܝ5-38 ˢ begin with Printer do begin i: Integer; r: TRect; var procedure TForm1.Button1Click(Sender: TObject); ࡶࢋϒ૱በᛌѩቑּĂҰυื૟ Printers ಏ̮ΐˢ uses clauseĄ Memo ̮І̚۞̰टົజО΍Ăࢱࢬα׹Ч঻Ϩ 200 ည৵Ą Ăޢ˭Еቑּ̚Ăܑॾ˯ѣ˘࣎޷ต̈́˘࣎ Memo ̮ІĂ༊ֹϡ۰޷˭޷ต ซҖОЕĄڱΨEndDoc͞ײГޢΨTextOutֽᏮ΍͛ф)Ă౵ײᘱဦજү(Β߁ Ăତ඾ซҖЇңҰຐࢋ۞ڱ͞ Ψ BeginDocײ൪дОܑ፟˯ĄࡶࢋЕОĂࢵА ІֽซҖᘱဦ̍үĂٙͽٙѣΞͽ൪дܑॾ˯۞ဦԛ˵ౌΞͽۏ ϡ TCanvas І̰ొֹۏ щ྅ٕΞዋϡ۞Оܑ፟୻ಏĂPrinteȑזд Printers ᛳّ̚Ξ࠻ TPrinter ᙷҾ̪Ȉ̶ᙷҬĄ ۞ۍ׎ιЕО޽΄ซҖЕОĄૄώ˯׌ ᘱဦ۞ paint deviceĄιயϠ postscript ͛Іᄬ֏ĂΞͽۡତਖ਼ග lprălp ٕ Оܑ፟˯ٺІߏ˘࣎Ξۏ ྅˞ Windows Оܑ͚፟೯ĂCLX TPrinterދІۏ ώĄVCL ۞ TPrinterۍunit) ᄃ CLX ᑕϡ඀ё(QPrinter unit)Чጾѣ፾ϲ۞ BaseCLXĂVCL ᑕϡ඀ё(Printer ٺтТ TCanvas ᙷҾĂTPrinter ᙷҾϺ̙ᛳ ЕО͚೯ ԆፋЕܑĄ۞ڱTCanvas ͹ᗟֽ଀ۢপّ̈́͞ ۞ځኛણ҂ቢ˯ᄲ ΍᏾ͷՀᖎಏ˞ĄٽІĂιឰᘱဦ̍үត଀щБ̙ۏ ۞ྖĂጐณֹϡ TCanvas ඈඈĄΪࢋҰᅮࢋᘱဦ̍үͷΞਕהᘱဦજү݈Ԟ˞໤౯р DCă൪ඊăඊ ІឰҰᅈᗓ૱֍۞ GDI ᏾ᄱĂּтдۏ д Windows ᑕϡ඀ё̰ĂTCanvas end; Canvas.TextOut( Canvas.PenPos.x, Canvas.PenPos.y,'This is the end of the line'); Canvas.Font.Name := 'Arial'; Canvas.Brush.Color := clBtnFace; Canvas.LineTo( 100, 100 ); Canvas.MoveTo( 10, 10 ); Canvas.Pen.Color := clBlue; begin procedure TForm1.Button1Click(Sender: TObject); ֹϡ BaseCLX 5-39 ăඈඈ)Ąޘ۞ಏҜมેҖೱზ(෼ᗓăࢬ᎕ăॡมă໢ ёд࠹Тᙷݭב ёԯಏҜೱზјΩ˘࣎ಏҜĄConvertב ଋΞͽֹϡ Convert ซҖᖎಏ۞ೱზ Ąڱͽ̈́˘࣎ϡֽેҖኑᗔಏҜᙷݭೱზ۞ᄬڱ ёֽેҖᖎಏ׶ኑᗔ۞ೱზĄιΒ߁˞˘࣎ᖎಏ۞ᄬב ଋΞͽֹϡ Convert ેҖೱზ ĶConvertķొЊĄ۞ځณᙷݭķͽ̈́ણ҂ቢ˯ᄲޘ۞ ᕖ·ೱზ׶ೱზಏҜĂኛણ҂д5-40ࢱ۞ĶΐˢາٺณಏҜĄᙯޘ׶࠹ᙯ۞ ёҋࢎೱზछ୉ב ֹϡ RegisterConversionType ׶ RegisterConversionFamily ณಏҜĄѩγĂଋΞͽޘStdConvs ಏ̮ؠཌྷ˞ధкೱზछ୉ͽ̈́Ч࣎јࣶ ĶConvertķొЊĄ۞ځͽ̈́ણ҂ቢ˯ᅃӄᄲځ۞ᄲ Ăኛણ҂д5-39ࢱ̝ĶેҖೱზķ˘༼ځซҖೱზ۞ྎ௟ᄲٺზछ୉̚Ąᙯ ۞Ķೱზछ୉ķ(Conversion family)̚ĄਕૉซҖೱზ۞ಏҜυืд࠹Т۞ೱ ಏҜ఼૱Ⴭࠎߏд࠹Т۞ۏٕߏд͟׶ฉมೱზྤफ़ĄϡֽᏊณ࠹Тᙷݭְ ۞ಏҜĄଋΞͽϡֽд࠹ट۞ಏҜมೱზྤफ़Ăညߏдࡻӏ׶ࡻЦมઇᖼೱĂ ёĂଋΞͽϡֽೱზ̙Тב Ә˞˘࣎˘ਠϡ౉۞ ConvertކConvUtils ಏ̮ ಏҜೱზ ͛ІĄځІ۞ซ˘ՎྤੈĂኛણ҂ቢ˯ᄲۏ TPrinter ٺ၆ end; end; EndDoc; Canvas.FrameRect(r); Canvas.Brush.Color := clBlack; Memo1.Lines.Strings[i]); Canvas.TextHeight(Memo1.Lines.Strings[i])), Canvas.TextOut(200,200 + (i * for i :=0 to Memo1.Lines.Count do Canvas.Brush.Style :=bsClear; BeginDoc; r := Rect(200,200,(Pagewidth - 200),(PageHeight - 200)); ᄃ඀ёనࢍ͘Ίܝ5-40 ˢ тңซҖ఺ֱજүĄځ૟ᄲּ̄۞˭غೱზछ୉̚Ąזёԯາ۞ಏҜΐב Ψ RegisterConversionTypeײֹϡд StdConvs ಏ̮̚۞Бાតᇴ)ĂଋಶΞͽ ౅࿅൳ᐂາ۞ೱზछ୉ٕߏ)ޢ଀ TConvFamily ۞ࣃפTConvFamily ۞ࣃĄд ଀פё൳ᐂೱზछ୉ֽב Ψ RegisterConversionFamilyײࢵАଋᅮࢋ ҖಏҜม۞ೱზĄ ёಶਕֹϡд TConvType ٙؠཌྷ۞ࣃֽซב ࠹Т۞ೱზछ୉ॡĂConvertז ณಏҜ(TConvType ࣃ)۞າೱზछ୉Ą༊׌࣎ TConvType ࣃ൳ᐂޘϡֽܑϯ ϲޙଋࢋેҖೱზ۞ಏҜ՟ѣд StdConvs ಏ̮̚࿰Аؠཌྷ˞Ăଋᅮࢋڍт ณᙷݭޘΐˢາ۞ ĶConversion family variablesķొЊĄ ۞ځณಏҜ۞୻ಏĂኛણ҂ቢ˯ᅃӄᄲޘณಏҜछ୉ͽ̈́Տ࣎छ୉̝јࣶ ޘ఺ֱ࿰Аؠཌྷ̝ٺStdConvs ಏ̮ؠཌྷ˞ధкࣃࠎ TConvType ۞छ୉Ąᙯ CompatibleConversionType ֽᑭߤ׌࣎ TConvType ۞ࣃߏӎࠎ࠹Тೱზछ୉Ą ΨײಏҜ̙࠹टĂConvert ົயϠ EConversionError ּγĄଋΞͽڍ ซҖೱზ۞ಏҜυืߏ࠹Т۞ೱზछ୉(΁ࣇυืߏϡֽᏊณ࠹Т۞ְ)Ąт nKPL = Convert(StrToFloat(Edit.Text), duMiles, duKilometers, vuGallons, vuLiter); ΨԯՏΐׄࣴᇴೱზјՏ̳̿۞̳֧ᇴēײᇴב۞˭غּтĂ ॡдԯՏ̶ᛗ۞ΐׄᇴೱზјՏ̈ॡ۞̳̿ᇴĄ ॡԯՏ̈ॡ۞ࣴᇴೱზјՏ̶ᛗ۞̳͎ᇴĂٕߏдࢍზ߹ณޘּ̄ညࢍზి ёેҖ׌࣎ಏҜมՀኑᗔ۞ೱზĄᅮࢋ఺ᇹೱზ۞ב ଋ˵Ξͽֹϡ Convert ซҖኑᗔ۞ೱზ TempInKelvin := Convert(StrToFloat(Edit.Text), tuFahrenheit, tuKelvin); Ϥරͩ(Fahrenheit)ᖼೱјฟ(Kelvin)ēޘԯ໢ּ̄۞˭غּтĂ ଋΞͽֹϡ TConvType ᙷݭֽ޽ؠೱზ۞ಏҜĄ ࢋֹϡ ConvertĂଋдೱზॡυื޽ؠࢋೱზ۞ಏҜĂͽ̈́ࢋೱј۞ಏҜĄ ֹϡ BaseCLX 5-41 ॡົҋજ୻ଫĄ ଋٙؠཌྷ۞ಏҜдેҖॡᅮࢋொੵĄιࣇдᑕϡ඀ёඕՁܧछ୉۞൳ᐂĂੵ ঐೱზפᔵ൒˵೩ֻ˞˘࣎ UnregisterConversionFamily ඀ԔĂҭଋ̙֭ᅮࢋ cbLongTime := RegisterConversionFamily('Long Times'); ତ඾Ă൳ᐂ఺࣎ೱზछ୉ē ൳ᐂೱზछ୉ ltMillennia: TConvType; ltCenturies: TConvType; ltDecades: TConvType; ltYears: TConvType; ltMonths: TConvType; cbLongTime: TConvFamily; var छ୉̚Ăͽ̈́छ୉̚۞Ч჌ᏊณಏҜјࣶē ӘϡֽᙊҾ۞តᇴĄ఺࣎ᙊҾфົϡдາ۞ LongTime ೱზކࢵАĂଋᅮࢋ Әតᇴކ ϲ˘࣎Ⴭࠎ cbLongTime ۞າೱზछ୉Ąޙ໤ቁ۞ೱზछ୉Ą఺ּ࣎̄ಶߏࢋ ϲѐ၆ૄ໤ಏҜՀޙЊ۞ᏊณಏҜĂଋಶΞͽ͡ٺඈٕٺଋᅮࢋֹϡ̂ڍт ၆พѐăพࡋ˵ѣ̙Т۞࣒ϒ͞ёඈඈЧ჌Я৵ౌົౄј̙໤ቁĄ ՟ѣ͟၆͡ă͟၆ѐă͟၆׎ιಏҜ۞໤ቁೱზ͞ёĄ͡ѣ̙Т۞͇ᇴćѐ (͡ăѐăȈѐă͵ࡔă˼ѐ)ֽೱზॡಶΞਕົயϠ̙໤ቁ۞г͞ĂЯࠎ֭ ົֹϡૄ໤ಏҜĄЯѩĂٙѣ۞ೱზυืᖼј͟Ąдֹϡ͡Њٕྵ̂۞ಏҜ ĂcbTime छ୉ֹϡ͟ઇࠎૄ໤ಏҜĄдछ୉̚ซҖЧ჌ೱზॡځՀซ˘Վᄲ ઐमॡĄ۞ޘЊೱј͵ࡔ)۞ೱზĂ҃ೱზ࿅඀Ξਕົౄј໤ቁ ॡม(ညߏ͡ܜณಏҜᙷݭ۞ּ̄ߏдેҖྵޘϲາೱზछ୉׶ޙ˘࣎ᅮࢋ ϲᖎಏ۞ೱზछ୉֭ΐˢಏҜޙ (ώ۞ Delphi ౌѣ఺࣎ࣧؕ඀ёቅĄۍٙѣܧຍ֭ ڦՀк۞ּ̄ĂଋΞͽણ҂ᇾ໤ೱზಏ̮(stdconvs.pas)۞ࣧؕ඀ёቅĄ(ኛ ᄃ඀ёనࢍ͘Ίܝ5-42 ˢ ณಏҜ̚Ąޘͽ̈́׎јࣶ۞ ӘϡֽᙊҾ۞តᇴĄ఺ֱᙊҾфົϡд cbTemperature ೱზछ୉ĂކࢵАĂ Әតᇴކ ёֽ׶ૄώಏҜซҖೱზĄבॡ೩ֻ тңд൳ᐂೱზᙷݭځ఺ּ࣎̄Ăߏଂ StdConvs ಏ̮ो΍ֽ۞Ăᄲ۞˭غ Ąڱ͞ёѣ̙Т۞੓ზ͞ ࢍზޘĂЯࠎ̙Т۞໢ޘ΃ֹϡೱზதĄּтĂଋ̙ਕֹϡೱზதֽೱზ໢ ёͽആב޽ؠϡֽેҖೱზ۞ֽڱ༊ೱზՀࠎኑᗔॡĂଋΞͽֹϡ̙Т۞ᄬ ёבֹϡೱზ Convert(StrToFloat(Edit.Text), ltMonths, ltMillennia); ēޘ଀Հ̂۞໤ቁפଋனдΞͽֹϡ఺ֽ࣎ Convert(StrToFloat(Edit.Text), tuMonths, tuMillennia); ΨγĂײ Convert ۞˭غٙͽੵ˞ֹϡ ზЇңଋ̏൳ᐂд cbLongTime छ୉̚۞ЇңೱზᙷݭĄ ёΞͽϡֽೱב னдଋΞͽֹϡາ൳ᐂ۞ಏҜֽซҖೱზĄБા۞ Convert ֹϡາಏҜ ltMillennia := RegisterConversionType(cbLongTime, 'Millennia', 1000); ltCenturies := RegisterConversionType(cbLongTime, 'Centuries', 100); ltDecades := RegisterConversionType(cbLongTime, 'Decades', 10); ltYears := RegisterConversionType(cbLongTime, 'Years', 1); ltMonths := RegisterConversionType(cbLongTime, 'Months', 1/12); ඀ёቅϡֽ൳ᐂᏊณಏҜē۞˭غ Ąځࠎ LongTime छ୉۞ૄώಏҜߏѐĄଋ˵Ξͽ၆ٙࢋೱზ۞ಏҜΐˢᄲ தֽܑϯιࣇ׶ૄώಏҜ۞ೱზ͞ёĄٙͽĂltMonths ۞ೱზதࠎ 1/12ĂЯ ཌྷૄώಏҜĂд఺ּ࣎̄̚ߏѐĂ˵ᅮࢋؠཌྷ׎ι۞ᏊณಏҜĂֹ֭ϡೱზ ёĂ఺ົ൳ᐂপؠೱზछ୉۞ᏊณಏҜĄଋᅮࢋؠב RegisterConversionType ϲ̝ೱზछ୉̚۞Ч࣎ᏊณಏҜĄኛֹϡޙତ඾Ăଋᅮࢋ൳ᐂдࣣ ณಏҜޘ൳ᐂ ֹϡ BaseCLX 5-43 Result := AValue + 273.15; end; begin function CelsiusToKelvin(const AValue: Double): Double; Result := AValue – 273.15; end; begin function KelvinToCelsius(const AValue: Double): Double; end; Result := ((AValue * 9) / 5) + 32; begin function CelsiusToFahrenheit(const AValue: Double): Double; end; Result := ((AValue – 32) * 5) / 9; begin function FahrenheitToCelsius(const AValue: Double): Double; ёߏଂ StdConvs ಏ̮ो΍ֽ۞ēבზֹ̙ϡᖎಏ۞ೱზதĄ఺ֱ ࢍณಏҜ׶ૄώಏҜරͩઇೱზ۞඀ёቅĂЯࠎ఺჌ೱޘଋᅮࢋᇤᆷ׎ι໢ ڱᇤᆷ׶ૄώಏҜೱზ۞͞ tuCelsius := RegisterConversionType(cbTemperature, 'Celsius', 1); ϡॡ̙֭ົ၆ιઇЇңೱზē ຍд఺࣎ૄώಏҜ۞ּ̄̚ĂԧࣇΞͽֹϡᖎಏ۞ೱზதĂЯࠎ၁ᅫᑕڦኛ ГֽĂؠཌྷ׶൳ᐂೱზछ୉۞ૄώಏҜĂд఺ּ࣎̄̚Ă׎ࠎරͩ(Celsius)Ą ൳ᐂૄώಏҜ cbTemperature := RegisterConversionFamily('Temperature'); ତ඾Ă൳ᐂೱზछ୉ē ൳ᐂೱზछ୉ ณಏҜ۞̄ะĄޘޘณಏҜߏ၁ᅫ൳ᐂд StdConvs ಏ̮̝̚໢ޘො Ед఺㗗۞ tuFahrenheit: TConvType; tuKelvin: TConvType; tuCelsius: TConvType; cbTemperature: TConvFamily; var ᄃ඀ёనࢍ͘Ίܝ5-44 ˢ begin function ToEuro(const AValue: Double; Factor: Double): Double; sult := RoundTo(AValue * Factor, FRound); end; Re begin function FromEuro(const AValue: Double; Factor: Double, FRound: TRoundToRange): Double; ˘࣎ଂለ̮ೱზ΍ֽē ёಶΞͽ఍ந఺ֱયᗟâ࣎ೱზјለ̮ĂΩב൒҃ĂΪࢋ׌࣎ᖎಏ۞ೱზ ϡࣆੵ۞͞ёֽࢍზ၆ٙ޽ؠ̝ᇾ໤ለ̮۞ೱზĄֹڱy ೱზத͞ y ̙Т۞ఱ။α଺̣ˢ۞Ҝᇴ̙ТĄ ۞)Ăଋ̙ਕֹϡᖎಏ۞ೱზத͞ёֽϒቁ۞ೱზЧ჌ለ߷။ࣃĂࣧЯѣ˟ē ჌̙Тለ߷။ࣃ۞ఢ݋Ąᔵ൒ೱზத̪൒ჯ޺׽ؠ(̙ည࡚̮׶ለ̮ߏតજ Ăಶѣ˘௡ᇾ໤ϡֽೱზЧޢ(Ҷለ̮(Euroކֽ఍ந఺჌ೱზĄּтĂҋଂ ϲᙷҾޙё҃ΪѣણᇴࣃٕតᇴѣमளĂଋ˵Ξͽבਕᇤᆷ˘௡۞ೱზڍт ёΞਕдώኳ˯ౌઇ࠹Т۞ְĄבёĂҭ၁ᅫ˯఺ֱבк۞ޝϲ ޙёֽ൳ᐂೱზಏҜĄ൒҃Ăѣֱॡ࣏ଋΞਕᅮࢋבଋ఼૱ౌΞͽֹϡೱზ ֹϡᙷҾֽგநೱზ Convert(StrToFloat(Edit.Text), tuFahrenheit, tuKelvin); ඀ёቅԯࣃϤරͩೱზјฟĄ۞˭غ ёਕૉдଋ൳ᐂд cbTemperature ೱზछ୉̚۞ЇңಏҜมેҖೱზĄּтĂ ב ଋனдΞͽдᑕϡ඀ёֹ̚ϡາ൳ᐂ۞ಏҜֽેҖೱზĄБા۞ Convert ֹϡາಏҜ FahrenheitToCelsius, CelsiusToFahrenheit); tuFahrenheit := RegisterConversionType(cbTemperature, 'Fahrenheit', CelsiusToKelvin); tuKelvin := RegisterConversionType(cbTemperature, 'Kelvin', KelvinToCelsius, ϡֽ൳ᐂдछ୉̝̚׎ιಏҜ۞඀ёቅт˭ē ĄځͽΐˢಏҜ۞ᄲ ณಏҜĄଋ˵ΞޘёĂଋΞͽ൳ᐂೱზछ୉̚۞׎ιבனдଋ̏ᆷр˞ೱზ ൳ᐂ׎ιಏҜ ֹϡ BaseCLX 5-45 end; Result := AValue / FFactor; begin function TConvTypeEuro.ToCommon(const AValue: Double): Double; sult := RoundTo(AValue * FFactor, FRound); end; Re begin function TConvTypeEuro.FromCommon(const AValue: Double): Double; ёΪࢋֹϡ఺ֱռѣјࣶēב఺׌࣎ೱზ ound := ARound; end; FR FFactor := AFactor; inherited Create(AConvFamily, ADescription); begin const ADescription: string; const AFactor: Double; const ARound: TRoundToRange); constructor TConvTypeE const AConvFamily: TConvFamily; uro.Create( ၹ̮ԯࣃ޽ؠග఺ֱռѣјࣶēޙ ; end function FromCommon(const AValue: Double): Double; override; function ToCommon(const AValue: Double): Double; override; const AFactor: Double; const ARound: TRoundToRange); constructor Create(const AConvFamily: TConvFamily; const ADescription: string; public FFactor: Double; FRound: TRoundToRange; private TC uro = class(TConvTypeInfo) onvTypeE ᙷҾ۞ռѣјࣶ̚೩ֻα଺̣ˢ۞̈ᇴҜᇴĄ ՟ѣᗝγ۞ણᇴĂٙͽଋυืдೱზౌڱೱზಏҜॡֹٙϡ۞˘ᇹĂ఺ֱ͞ (д఺ּ࣎̄̚ಶߏೱზјለ̮׶ଂለ̮ೱზ΍ֽ)ֹϡĄϒтଋдۡତ൳ᐂ ToCommon ׶ FromCommonĂϡֽдೱზछ୉̚ೱზј׶ଂૄώಏҜೱზॡ ĂڱᙷҾυืଂ TConvTypeInfo ᚶٚ˭ֽĄTConvTypeInfo ؠཌྷ׌࣎͞ ϲೱზᙷҾޙ ёĄבёĂଋΞͽԯιࣇઇјᙷҾ۞јֹֽࣶϡ࠹Т۞ב ёĄࠎ˞ᔖҺ၆Տ˘࣎ለ߷။Ҿᇤᆷ׌࣎າ۞ೱზב࣎ለ߷။Ҿ൳ᐂ࠹Т۞ ё̚ᅮࢋᗝγ۞ણᇴĂ఺ܑϯଋ̙ਕಏ৷г၆Տ˘בдೱზڱયᗟߏĂ఺͞ end; Result := AValue / Factor; ᄃ඀ёనࢍ͘Ίܝ5-46 ˢ LInfo:=TConvTypeFactor.Create(cbEuro, 'FrenchFrancs', 6.55957, -2); LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Spani etas', 166.386, 0); if not RegisterConversionType(LInfo, euESP) then LInfo:= shPes LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Greek mas', 340.75, 0); if not RegisterConversionType(LInfo, euGRD) then LInfo:= Drach LInfo.Free; if not RegisterConversionType(LInfo, euDEM) then LInfo:=TConvTypeFactor.Create(cbEuro, 'GermanMarks', 1.95583, -2); LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Belgi ncs', 40.3399, 0); if not RegisterConversionType(LInfo, euBEF) then LInfo:= anFra LInfo.Free; if not RegisterConversionType(LInfo, euEUR) then LInfo:=TConvTypeFactor.Create(cbEuro, 'EUEuro', 1.0, -2); begin cbEuro: TConvFamily; var Ĉڱ͞ Ψ RegisterConversionTypeײޢˢᛳّĂͽ˭૟ྍೱზᙷҾ၁វ̼,൒ ൳ᐂՏ˘჌ೱზݭၗĂೱზᙷҾ੫၆̙Т။Ҿົѣ̙Т۞ೱზ̳ёᄃα଺̣ cbEuro := RegisterConversionFamily('European currency'); ൳ᐂೱზछ୉ē ֽڱனдଋ̏གྷΞͽֹϡາ۞ೱზᙷҾֽ൳ᐂለ߷۞Ч჌။ҾĂֶ໰݈ࢗ͞ ൳ᐂೱზछ୉ᄃ׎ιಏҜ euFIM: TConvType; { Finnish marks } euPTE: TConvType; { Portuguese escudos } euATS: TConvType; { Austrian schillings } euNLG: TConvType; { Dutch guilders } euLUF: TConvType; { Luxembourg francs } euITL: TConvType; { Italian lire } euIEP: TConvType; { Irish pounds } euFFR: TConvType; { French francs } euESP: TConvType; { Spanish pesetas } euGRD: TConvType; { Greek drachmas } euDEM: TConvType; { German marks } euBEF: TConvType; { Belgian francs } euEUR: TConvType; { EU euro } cbEuro: TConvFamily; var (ΐ˯఺࣎ᙷҾ۞តᇴ)׶൳ᐂາ۞ೱზछ୉ֽฟؕē ӘᙊҾфކனдଋ̏གྷѣ˘࣎ೱზᙷҾĂԧࣇΞͽ׶׎ι۞ೱზछ୉˘ᇹϤ Әតᇴކ ֹϡ BaseCLX 5-47 ซҖݭၗᖼೱ۞̍үĄ̚اҖྻү̈́޽ࠁĄበᛌጡົҋજ តᇴซڒ̖ቁؠĄVariant Ξͽᄃ׎ι۞ Variant ͽ̈́ፋᇴă၁ᇴăфҚ̈́ο ҖॡഇેޞдેҖॡഇՙؠݭҾ۞ྤफ़ݭၗĂৌϒ۞ྤफ़ݭၗΞͽ঻ڱѣ൑ ᄬ֏న߉̚ĂVariant ߏȈ̶ૻ҃ѣ˧۞ݭၗĄVariant ΃ܑٙ۞ޙ̰ Delphi ֹϡҋࢎ Variant Edit2.Text = FloatToStr(Convert(StrToFloat(Edit1.Text), euITL, euDEM)); ཌྷ̂Ӏ۞֧ٛ(Lire)ೱზјᇇ઼۞੺ҹ(Marks)ē ඀ёԯ۞˭غёΞͽೱზдາ cbEuro छ୉̚۞Їң̏൳ᐂ۞။ҾĄּтĂ ב னдଋΞͽдᑕϡ඀ёֹ̚ϡາ൳ᐂ۞ಏҜֽેҖೱზĄБા۞ Convert ֹϡາಏҜ ᕖૺּّ̄Ą ො ConvertIT ቑּ೩ֻΒӣிк။Ҿ(՟ѣ׽ؠ۞ᖼೱ๗த)ᄃ᏾ᄱᑭߤ۞˘࣎ end; LInfo.Free; if not RegisterConversionType(LInfo, euFIM) then LInfo:=TConvTypeFactor.Create(cbEuro, 'FinnishMarks', 5.94573, 0); LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Portu Escudos', 200.482, -2); if not RegisterConversionType(LInfo, euPTE) then LInfo:= guese LInfo.Free; if not RegisterConversionType(LInfo, euATS) then LInfo:=TConvTypeFactor.Create(cbEuro, 'AustrianSchillings', 13.7603, -2); LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Dutch ers', 2.20371, -2); if not RegisterConversionType(LInfo, euNLG) then LInfo:= Guild LInfo.Free; if not RegisterConversionType(LInfo, euLUF) then LInfo:=TConvTypeFactor.Create(cbEuro, 'LuxembourgFrancs', 40.3399, -2); LInfo.Free; if not RegisterConversionType(LInfo, euITL) then LInfo:=TConvTypeFactor.Create(cbEuro, 'ItalianLire', 1936.27, 0); LInfo.Free; TConvTypeFactor.Create(cbEuro, 'Irish s', 0.787564, -2); if not RegisterConversionType(LInfo, euIEP) then LInfo:= Pound LInfo.Free; if not RegisterConversionType(LInfo, euFFR) then ᄃ඀ёనࢍ͘Ίܝ5-48 ˢ end; VValue: Double; Reserved1, Reserved2: Word; VConvType: TConvType; VType: TVarType; TConvertVarData = packed record ؠтңΝྋ᝝׎ࣃĈ फ़Β߁ീณ۞ಏҜ(TConvType)ͽ̈́ീณࣃ(Double ݭҾ)ĄVarConv ಏҜՙ ּтĂVarConv ಏ̮ؠཌྷ˘࣎੃ᐂീณࣃ۞ҋࢎ Variant ݭၗĄѩݭၗ۞ྤ ፆүјࣶĄٽ Ә၆າ۞ྤफ़ݭҾѣຍཌྷͷކᔘߏҋࢎ˘࣎ᄃ TVarData ࠹ट۞੃ᐂݭၗĂ फ़Ąᔵ൒ଋ۞ҋࢎ Variant ˵Ξͽۡତֹϡ TVarData ֽᐼхྤफ़Ă̙࿅౵р ੃ᐂݭၗĄௐ˘࣎ Word ޽ϯ Variant ۞ݭၗĂ౺ዶ۞ 14 Ҝ̮௡ϡֽᐼхྤ Variant ૟ιࣇ۞ྤफ़ᐼхд TVarData ੃ᐂ྆Ą఺ߏ˘࣎ 16 Ҝ̮௡̂̈۞ ᐼхҋࢎ Variant ݭၗ۞ྤफ़ TCustomVariantType ᙷҾĄ ܧTInvokeableVariantType ᙷҾٕ TPublishableVariantType ᙷҾֽᚶٚĂ҃ Variant ݭၗĂଋυืଂ ۞ڱϲ͚೯ᛳّ̈́͞ޙĄࡶࢋڱឰι͚೯ᛳّ̈́͞ Variant ݭၗ֭ᄃ׎ιྤफ़ݭၗઇᖼೱĄଋ˵Ξͽซ˘Վΐૻ Variant ݭၗĂ ˯ࢗՎូࢉϠາ۞ Variant ݭၗĂֹ଀ଋΞͽֹϡᇾ໤۞ྻზֽ̄఍நາ۞ ёĄבϲ Variant តᇴͽ̈́Ᏸᄮ Variant ݭၗ۞ᅃӄޙ3 ᇤᆷ ၗᖼೱፆү)Ą Ә TCustomVariantType ۞̄ᙷҾĂ֭ͷ၁үυࢋ۞જү(Β߁Ч჌ݭކ 2 TVarData ੃ᐂĄ ז1 ૟ Variant ۞ྤफ़၆ᑕ ϲ˘࣎ Variant ݭၗĈޙࡶࢋ тң఍ந఺ֱາ۞ྤफ़ݭၗĄځᇤ পؠ۞ྤफ़ݭၗĄଋΪᅮࢋଂ TCustomVariantType ᙷҾࢉϠາ۞ᙷҾĂ֭ͷ ޽ᇾඈඈྤफ़ݭၗĄ൒҃ĂଋΞͽؼҩ Variant ۞ਕ˧ĂឰιΞͽ఍ந˘ֱ Βӣ੃ᐂăะЪăᐖၗੱЕăᑫ९ăᙷҾણ҂ٕڱĂVariant ൑˭ڶ࿰నଐ ֹϡ BaseCLX 5-49 ౵૱ֹϡ۞ݭҾᖼೱΞਕߏΩ˘࣎ Variant ݭҾ(҃זкĄ൒҃Ăଋυื҂ณ ధٽVariant ݭҾซҖᖼೱົְֹଐट ۞ޙॡĂࡶᄃ̰ڱ၁ү˯ࢗ׌჌͞ ݭၗćͽ̈́ CastToĂ૟ଋ۞ Variant ᖼࠎ׎ι۞ Variant ݭၗĄ ĈCastĂ૟׎ι۞ Variant ᖼࠎଋ۞ Variantڱ׌࣎͞ז೩ֻᖼݭજү஝ঘ ̝఍ಶдιົдυࢋॡҋજซҖᖼݭĄ ҋࢎ Variant ౵ࢦࢋ۞পҒ̝˘ಶߏΞឰଋ೩ֻᖼݭજүĄ҃ Variant ី߿ ྿јᖼݭ ĄڱTCustomVariantType ۞ߙֱ෍ᑢ͞ ϲᅃӄᙷҾĄТॡυืԼᆷޙଂ TCustomVariantType ࢉϠֽ ҋࢎ Variant ֹϡপঅ۞ᅃӄᙷҾֽ޽ؠтңซҖЧёᇾ໤۞ፆүĄଋΞͽ ϲ఍நҋࢎ Variant ݭၗ۞ᙷҾޙ ࢎ Variant ˵Ξͽ૟ TVarData ෛࠎ TComplexVarData ۡତፆүĄ ᇹĄѩ Variant(ٕι۞ TVarData ੃ᐂ)Ξͽᖼݭࠎ TComplexVarDataĂͷҋ Іણ҂ְ၁˯ಶߏ޽ᇾ(α࣎Ҝ̮௡)ĂЯѩፋ࣎੃ᐂ̂̈ᄃ TVarData ˘ۏ ;end Reserved4: LongInt; VComplex: TComplexData; Reserved1, Reserved2, Reserved3: Word; VType: TVarType; TComplexVarData = packed record Іણ҂۞੃ᐂݭҾĈۏ ࣎ TComplexData Іֽ੃ᐂ׎ࣃĄι˵ؠཌྷ˞˘࣎ᄃ TVarData ࠹Т̂̈ĂҭΒӣ˘ۏᙷҾ۞ І۞੃ᐂݭҾĄּтĂVarCmplx ಏ̮ಶֹϡ˞˘࣎ TComplexDataۏ޽ᇾٕ ࣎Ҝ̮௡۞۩มֽᐼхྤफ़ĄΞͽؠཌྷΒӣ 14 ٺࡶଋ۞ҋࢎ Variant ᅮࢋ̂ Әࠎ packed recordĄކො ؠཌྷᄃ TVarData ၆ᑕ۞੃ᐂݭҾॡĂኛચυ૟ι TVarData ෛࠎ TConvertVarData ۡତፆүĄ ι۞ TVarData ੃ᐂ)Ξͽᖼݭࠎ TConvertVarDataĂͷҋࢎ Variant ˵Ξͽ૟ ѩݭҾ۞̂̈ᄃ TVarData ੃ᐂ˘ሀ˘ᇹĄፆүҋࢎ Variant ॡĂVariant(ٕ ᄃ඀ёనࢍ͘Ίܝ5-50 ˢ ໚ Variant ۞ՀԼٕ׎ιᙝᅫड़ᑕĄֽ ٺ૟ֽ໚ Variant ኑᄦ˘ЊĂ֭ͷΪ఍ந఺Њ޿֓Ą఺Ξ֨ͤ၆ڱy ѩ͞ ఍நĄٽឰྤफ़Հ y ҋࢎ Variant ۞ྤफ़(Dest)ଂ TVarData ᖼݭࠎ TComplexVarDataĂ৷ო VarType ᛳّĂ˵ಶߏҋࢎ Variant ۞ݭၗ΃ቅĄ јࣶᇾϯ Variant ۞ݭၗ΃ቅĄιົనؠ TComplexVariantType ۞ ࣎Վូనؠ୬็а۞ TVarData ࡔᐂ۞ VType јࣶĄѩ˘ޢ౵۞ڱy ѩ͞ ຍ۞Ĉ ڦᔘѣ˘ְֱีߏࣃ଀ֽڱੵ˞ֹϡ Double үࠎᖼೱ̬̚ݭၗĂд఺࣎͞ end; end; VarDataClear(LSource); finally Dest.VType := VarType; end; end; VarDataClear(LTemp); finally TComplexVarData(Dest).VComplex := TComplexData.Create(LTemp.VDouble, 0); VarDataCastTo(LTemp, LSource, varDouble); try VarDataInit(LTemp); begin else TComplexData.Create(VarDataToStr(LSource)) TComplexVarData(Dest).VComplex := if VarDataIsStr(LSource) then VarDataCopyNoInd(LSource, Source); try VarDataInit(LSource); begin LSource, LTemp: TVarData; var procedure TComplexVariantType.Cast(var Dest: TVarData; const Source: TVarData); ϡ Double үࠎᖼೱ̬̚ݭၗĈڱ͞ ּтĂTComplexVariantType ᙷҾ۞ Cast ซҖᖼೱĄ Variant ݭҾ༊јߏ̬̚ݭၗֽ ޙݭҾ)Ą൑ኢтңĂଋᔘߏΞͽ૟̰ޙ̰ܧ ֹϡ BaseCLX 5-51 varString: case Left.VType of if Right.VType = VarType then begin const Operator: TVarOp); procedure TComplexVariantType.BinaryOp(var Left: TVarData; const Right: TVarData; Ĉڱ ͞ ּтĂ˭Еߏؠཌྷд VarComplx ಏ̮۞ TComplexVariantType.BinaryOp υืॲፂྻზ̮̈́ྻზ̄ซҖ఍நĂ็аᄃνྻზ̮࠹Тݭၗ۞ VariantĄ ڱĄBinaryOp ᅮࢋˬ࣎ણᇴĈνྻზ̮ăΠྻზ̮ͽ̈́ྻზ̄Ą၁үѩ͞ڱ ͞ modăshlăshrăandăorăxor ඈඈ)ซҖፆүĂଋυืԼᆷ׎ BinaryOp ࡶࢋҋࢎ Variant Ξͽᇾ໤ྻზ̄(Ед System ಏ̮̚۞+ă-ă*ă/ădivă ၁ү˟̮ྻү̄ Ϊдֽ໚ Variant ࠎ۩(Ϗజ޽ؠЇңࣃ)ॡ൴ϠĄ ڶېΒӣ༱˘ VarType ᛳّ՟ѣݭҾ΃ቅॡ۞఍நĄ఺჌ڱ͞ ຍ CastToڦኛ end; RaiseCastError; else end end; VarDataClear(LTemp); finally VarDataCastTo(Dest, LTemp, AVarType); LTemp.VDouble := TComplexVarData(LTemp).VComplex.Real; LTemp.VType := varDouble; try VarDataInit(LTemp); else VarDataFromStr(Dest, TComplexVarData(Source).VComplex.AsString); varString: VarDataFromOleStr(Dest, TComplexVarData(Source).VComplex.AsString); varOleStr: case AVarType of if Source.VType = VarType then begin LTemp: TVarData; var const AVarType: TVarType); procedure TComplexVariantType.CastTo(var Dest: TVarData; const Source: TVarData; Їң˘̙࣎ߏ string ۞ϫ۞ݭҾ)Ĉٺઇࠎᖼݭ̬̚ݭҾ(၆ Тᇹֹϡ Doubleڱ͞ ༊ଂҋࢎ Variant ᖼݭࠎ׎ι Variant ݭҾॡĂCastTo ᄃ඀ёనࢍ͘Ίܝ5-52 ˢ VComplex јࣶĄ ซҖྻზĄι૟ TVarData ੃ᐂᖼݭࠎ TComplexVarData ੃ᐂֹ֭ϡ׎ ֽڱІٙ೩ֻ۞͞ۏ ზ̄Ӏϡ TComplexDataྻڱăੵڱăࢷڱăഴڱ۞ΐ ซҖфҚాତć҃׌࣎ኑᄦޢზ̄ߏ૟ኑᇴᖼࠎфҚ൒ྻڱфҚ̈́ኑᇴ۞ΐ end; Result := True; RequiredVarType := VarType; { Complex Op TypeX } begin const Operator: TVarOp; out RequiredVarType: TVarType): Boolean; function TComplexVariantType.RightPromotion(const V: TVarData; ᛳّࣃֽซҖᖼݭĈ ࢋ VarTypeڱ͞ ྿јѩϫ۞ĂRightPromotionֽڱ͞ ϡԼᆷ RightPromotion ૟Πྻზ̮ᖼݭࠎኑᇴ VariantĄιӀטVariant ҃Πྻზ̮̙ߏĂ֤ᆃົૻ Ϊ఍நΠྻზ̮ࠎ΃ܑኑᇴ۞ҋࢎ VariantĄࡶνྻზ̮ࠎኑᇴڱѩ͞ ຍ۞ĄڦĂѣೀְ࣎ีߏࣃ଀̚ڱд఺࣎͞ end; RaiseInvalidOp; else end RaiseInvalidOp; else end RaiseInvalidOp; else TComplexVarData(Left).VComplex.DoDivide(TComplexVarData(Right).VComplex); opDivide: TComplexVarData(Left).VComplex.DoMultiply(TComplexVarData(Right).VComplex); opMultiply: TComplexVarData(Left).VComplex.DoSubtract(TComplexVarData(Right).VComplex); opSubtract: TComplexVarData(Left).VComplex.DoAdd(TComplexVarData(Right).VComplex); opAdd: case Operator of if Left.VType = VarType then else end; RaiseInvalidOp; else TComplexVarData(Right).VComplex.AsString; opAdd: Variant(Left) := Variant(Left) + case Operator of ֹϡ BaseCLX 5-53 LValue: Double; var (crLessThan, crEqual, crGreaterThan); CRelationshipToRelationship: array [TValueRelationship] of TVarCompareResult = const var Relationship: TVarCompareResult); procedure TConvertVariantType.Compare(const Left, Right: TVarData; Ĉڱ͞ І၁ү΍˭Е۞ Compareۏ TConvertVariantType ĄּтĂVarConv ಏ̮྆۞ڍણ҂(var) ણᇴϡֽ็а׌۰۞ͧྵඕ ᅮࢋˬ࣎ણᇴĈνྻზ̮ĂΠྻზ̮̈́˘࣎ڱ͞ ĄCompare۞ٽ၁үߏ౵ट ֽڱ͞ ࡶଋ۞ҋࢎ Variant ݭҾ୬͚೯Чё۞ͧྵྻზфĂ֤ᆃͽ Compare Ąڱ͞ ᆷ CompareOp ĂٕԼڱ͞ Ξ೩ֻҋࢎ Variant ۞ͧྵྻზĄ౅࿅Լᆷ Compareڱѣ׌჌͞ ၁үͧྵྻү̄ Ăνྻზ̮̪൒ܲ޺фҚݭҾĄ˭ڶზĂдѩଐྻڱҖΐ ιߏфҚͷ୬ซܧνྻზ̮ᖼݭࠎኑᇴ VariantĂੵטૻڱ͞ LeftPromotion end; Result := True; RequiredVarType := VarType; else RequiredVarType := varString if (Operator = opAdd) and VarDataIsStr(V) then { TypeX Op Complex } begin const Operator: TVarOp; out RequiredVarType: TVarType): Boolean; function TComplexVariantType.LeftPromotion(const V: TVarData; ૟νྻზ̮ᖼݭࠎኑᇴ VariantĄ Ă˭ڶĂLeftPromotionĂΞдΠྻ̮ࠎኑᇴ۞ଐڱᇴ VariantĄΩ˘࣎ᙷҬ۞͞ Ă૟Πྻზ̮ᖼݭࠎኑ˭ڶĂдνྻ̮ࠎኑᇴ۞ଐڱ͞ ֹϡ RightPromotion Аᖼݭࠎኑᇴ VariantĄԧࣇ̏གྷۢ྽тң݈ڱზĂྻზ̮υืд็ˢѩ͞ Ξ͚೯఺ᇹ۞ࢍڱ͞ ឰι͚೯ኑᇴ̈́׎ιᇴࣃݭҾ۞ྻზĄࢋឰ BinaryOp BinaryOp Ϊ఍நপؠ۞ೀ჌ྤफ़ݭҾĈфҚ̈́׎ιኑᇴ VariantĄଋ˵Ξͽ ĂΞд၁үҋࢎ Variant ॡࠁ˯ϡಞĄڱ۞ᅃӄ͞ Ăᓝ൴˘ּ࣎γĄTCustomVariantType ᙷҾΒӣధктТ RaiseInvalidOpڱ ͞ Ψ RaiseInvalidOpײྏ඾ֹϡ׎ι۞ྻზٕ̄׎ιݭၗ۞ྻზ̮ౌົጱ࡭ ᄃ඀ёనࢍ͘Ίܝ5-54 ˢ ᓝ൴ּγĄֽڱ͞ Ψ RaiseInvalidOpײଋΞͽ ซҖٕ൑ຍཌྷॡĂڱа׌۰ߏӎ࠹ඈĄࡶͧྵ൑็ޢĂซҖͧྵજүĂ൒ڱ CompareOp ᅮࢋˬ࣎ણᇴĈνྻზ̮ăΠྻზ̮ͽ̈́ͧྵྻზ̄Ą၁үѩ͞ Ąڱ͞ ݭၗĂଋυืԼᆷ CompareOp۞ه ͚೯ٕ̂̈ѨԔໄ̙ٺcrLessThan ٕ crGreaterThan ౌߏ̙ޫ༊۞ĄᑕྍĂ၆ Ă൑ኢ็аٺࠎ̙ඈڍcrLessThanăcrEqual ٕ crGreaterThanĄࡶͧྵ۞ඕ υื็аڱ͞ ၁үಶ̙ЪዋĂЯࠎ Compareֽڱ͞ Ą֤ᆃֹϡ Compareٺ ᙯ۞ٺĂٕ̙ඈٺĂΪѣඈهໄ۞ٺă̈ٺҋࢎݭҾ̙͚֭೯ٙᏜ۞̂ڍт end; Relationship := CRelationshipToRelationship[LRelationship]; end; RaiseInvalidOp; else TConvertVarData(Right).VConvType) TConvertVarData(Left).VConvType, TConvertVarData(Right).VValue, LRelationship := ConvUnitCompareValue(TConvertVarData(Left).VValue, if Left.VType = VarType then else VarData(Right).VDouble); LRelationship := CompareValue(TConvertVarData(Left).VValue, varDouble: RaiseCastError; else TConvertVarData(Left).VConvType, LValue, LType) LRelationship := ConvUnitCompareValue(TConvertVarData(Left).VValue, else LRelationship := CompareValue(TConvertVarData(Left).VValue, LValue) if LType = CIllegalConvType then if TryStrToConvUnit(Variant(Right), LValue, LType) then varString: case Right.VType of LRelationship := EqualsValue; // treated like a varConvert else it is treated as a double // The right can also be a string. If the string has unit info then it is // Compare after converting convvar2 to convvar1's unit type // convvar1 cmp convvar2 // Compare the value of convvar and the given number // convvar cmp number // supports... begin LRelationship: TValueRelationship; LType: TConvType; ֹϡ BaseCLX 5-55 end; RaiseInvalidOp; else end RaiseInvalidOp; else TComplexVarData(Right).VComplex.DoNegate; opNegate: case Operator of if Right.VType = VarType then begin const Operator: VarOp); procedure TComplexVariantType.UnaryOp(var Right: TVarData; Ĉڱ͞ ּтĂ˭Еࠎ VarComlx ಏ̮۞ TComplexVariantType.UnaryOp ࠎᄃྻზ̮࠹Тݭၗ۞็аࣃĄڍზĂඕ ĂซҖྻڱᅮࢋ׌࣎ણᇴĂྻზ̮̈́ྻზ̄Ą၁үѩ͞ڱ͞ ĄUnaryOpڱ͞ ୬ឰҋࢎ Variant ݭၗ͚೯ᇾ໤۞˘̮ྻზф(-̈́ not)ĂଋυืԼᆷ UnaryOp ၁ү˘̮ྻү̄ ᖼݭĂ̖ਕ͚೯Հк۞ྤफ़ݭၗĄטซҖૻ݈ڱ͞ CompareOp дྻზ̮็ˢ Compare ٕڱ͞ ଋυืᖣϤ RightPromotion ̈́ LeftPromotion ͚ٙ೯۞ྻზ̮ݭҾȈ̶ѣࢨĄಶည˟̮ྻზ̄۞͚೯˘ᇹĂڱຍѩ͞ڦኛ end; RaiseInvalidOp; else end RaiseInvalidOp; else ComplexVarData(Left).VComplex.Equal(TComplexVarData(Right).VComplex); Result := not opCmpNE: ComplexVarData(Left).VComplex.Equal(TComplexVarData(Right).VComplex); Result := opCmpEQ: case Operator of if (Left.VType = VarType) and (Right.VType = VarType) then Result := False; begin const Operator: Integer): Boolean; function TComplexVariantType.CompareOp(const Left, Right: TVarData; Ϊ͚೯׌࣎ྻზ̮ߏӎ࠹ඈ۞ྻზĈ т˭၁үĄιڱ͞ тĂVarCmplx ಏ̮۞ TComplxVariantType.CompareOpּ ᄃ඀ёనࢍ͘Ίܝ5-56 ˢ begin function TComplexVariantType.IsClear(const V: TVarData): Boolean; ࣃĈڱܧ Ϗ޽ؠࣃٕࠎإᏰҾ Variant ߏӎֽڱĄӀϡѩ͞ڱ͞ ଋᔘυื၁ү IsClear end; FreeAndNil(TComplexVarData(V).VComplex); V.VType := varEmpty; begin procedure TComplexVariantType.Clear(var V: TVarData); Variant ٙপҾ੨ཉ۞ྤ໚Ĉ ٸຍ۞г͞ಶߏυืᛖڦ˘ࢋ Ă઱ڱ͞ Ąಶည Copyڱ͞ ࡶࢋ఍நтң୻ੵ Variant ۞ྤफ़Ăኛ၁ү Clear Ąڱ͞ ΞͽۡତΨ SimplisticCopyڱ͞ TVarData ඕၹ)Ă֤ᆃଋ۞ Copy ٺԆБཉ फ़(˵ಶߏྤफ़Ξͽྤٸ৛థ ࡶଋ۞ҋࢎ Variant ॡၗ֭՟ѣপҾ੨ཉ੃ጸវֽх Indirect ણᇴӘۢѩ Variant ۞ྤफ़ߏӎΒӣมତણ҂Ą ۞ڱ͞ ො Copy end; end; VComplex := TComplexData.Create(TComplexVarData(Source).VComplex); VType := VarType; begin with TComplexVarData(Dest) do else VarDataCopyNoInd(Dest, Source) if Indirect and VarDataIsByRef(Source) then begin const Indirect: Boolean); procedure TComplexVariantType.Copy(var Dest: TVarData; const Source: TVarData; Іٕણ҂ݭҾ۞јࣶ੨ཉٙᅮ۞੃ጸវĈۏ˞੫၆ Ą఼૱ኑᄦજү̙֭ᙱĂΪࢋҾԞڱ͞ ࢋ఍நኑᄦજүĂଋυื၁ү Copy ၗ఍நĄ ੵ˞ᖼݭͽ̈́၁үྻზ̄γĂଋᔘυื੫၆тңኑᄦ̈́୻ੵҋࢎ Variant ݭ ኑᄦ̈́୻ੵҋࢎ Variant ֽᓝ൴ּγĄ Ψ RaiseInvalidOpײົڱຍ not ྻზ̄၆ኑᇴֽᄲ֭൑ຍཌྷĂٙͽѩ͞ڦኛ ֹϡ BaseCLX 5-57 end; end; Free; finally end; WriteFloat(Imaginary); WriteFloat(Real); begin with TComplexVarData(Source).VComplex do try with TWriter.Create(Stream, 1024) do begin const Stream: Stream); procedure TComplexVariantType.StreamOut(const Source: TVarData; end; end; Free; finally end; VComplex.Imaginary := ReadFloat; VComplex.Real := ReadFloat; VComplex := TComplexData.Create; begin with TComplexVarData(Dest) do try with TReader.Create(Stream, 1024) do begin const Stream: TStream); procedure TComplexVariantType.StreamIn(var Dest: TVarData; ĈڱӘ۞͞ކᙷҾͽ˭Е͞ё၁ү IVarStreamable ̬ࢬٙ ΨĄּт VarCmplx ಏ̮̚ĂTComplexVariantTypeײͽ̈́ᆷˢྤफ़߹ॡజ ĂStreamIn ̈́ StreamOutĂ̶Ҿдଂྤफ़߹᝝΍ڱIVarStreamable ؠཌྷ׌࣎͞ ಏ̮ٙؠཌྷ۞ IVarStreamable ̬ࢬĄ ΃ᙷҾυื၁ү Classesޢ ྍтңજүĄࠎ྿јѩϫ۞ĂTCustomVariantType ఍நҋࢎ Variant дᐼх̈́ྶˢྤफ़Қ߹ॡܝĂ૞ט҃ଋΞͽ೩ֻҋ̎۞፟ ܑॾᑫ९ॡజᖼݭࠎфҚĂͷдଂܑॾᑫ९᝝аॡϤфҚᖼࠎֽࣧॾёĄ൒ Ă༊ҋࢎ Variant ݭၗүࠎ̳ฟᆸ৺۞ᛳّॡĂιົдᛳّхˢ˭ڶ࿰నଐ ྶˢ̈́ᐼхҋࢎ Variant end; TComplexVarData(V).VComplex.IsZero; Result := (TComplexVarData(V).VComplex = nil) or ᄃ඀ёనࢍ͘Ίܝ5-58 ˢ ซҖፆүĄ̖ޢ۞ Variant జᖼݭࠎ TVarData ඕၹ(TCompexVarData)Ă൒ ຍ็аڦёĄኛבёĂ̙࿅ѣ˘ֱᙷҬΑਕ۞בVarCmplx ಏ̮֭̚՟ѣѩ end; TComplexVarData(ADest).VComplex := TComplexData.Create(ARead, AImaginary); TComplexVarData(Result).VType := ComplexVariantType.VarType; VarClear(Result); begin function VarComplexCreate(const AReal, AImaginary: Double): Variant; ϲኑᇴ VariantĈޙёΞϡֽבЕ Ă๱ˢυࢋ۞ࣃĄּтĂ˭̼ؕܐϲҋࢎ Variant ᇹּĂ֭ઇዋ༊۞ޙᑒଋ ࣎Ϥ޽ؠࣃயϠҋࢎ Variant ۞඀Ԕ૟ົឰ඀ёᆷ੓ֽՀᅅᗫĄ఺჌඀Ԕົ ϲ˘ޙܝϡБા۞ VarCast ඀ԔĂ૟ֽ໚ Variant ᖼјଋࢋ۞ݭၗĄЯѩ૞ ߏֹڱ͞˘ϲҋࢎ Variant ݭၗᇹּ۞઱ޙּтĂࡶ՟ѣᅃӄ඀Ԕ۞੨ЪĂ ൾ๻౫໭Ą ͽдᑕϡ඀ёֹ̚ϡѩݭၗĄ൒҃Ăࡶ՟ѣᅃӄ඀Ԕ۞੨ЪĂֹϡ੓ֽΞਕ ΃ᙷҾֽ၁үҋࢎ Variant ݭၗĂಶΞޢ۞ ϲ TCustomVariantTypeޙ˘όଋ ᇤᆷᅃӄ඀Ԕ FreeAndNil(ComplexVariantType); finalization finalization ડ߱Ĉ ঐѩݭҾ۞ොΊĄͽ˭ߏ VarCmplx ಏ̮۞פҾ۞ᇹּĂιົҋજ ΃ᙷҾ۞ಏ̮ finalization ડ߱̚Ăၨ໑ѩᙷޢ дؠཌྷ TCustomVariantType ComplexVariantType := TComplexVariantType.Create; initialization நր௚̰Ąͽ˭ߏ VarCmplx ಏ̮۞ initialization ડ߱Ĉ ІॡĂιົҋજ૟ώ֗ොΊҌ Variant ఍ۏϲྍᙷҾ۞ޙᙷҾ۞ᇹּĄ༊ଋ ϲѩޙ΃ᙷҾ۞ಏ̮ initialization ડ߱̚Ăޢ дؠཌྷ TCustomVariantType ΃ᙷҾޢ ֹϡ TCustomVariantType ̈́ᆷˢĄ І੨Ъྤफ़Қ߹ֽ఍நࣃ۞᝝΍ۏтңֹϡReader̈́ Writerڱຍ఺ֱ͞ڦኛ ֹϡ BaseCLX 5-59 ĄܮĂឰιֹϡ੓ֽྵࠎ͞ڱࢬĂଋ˵ధ˵ົຐࢋග̟ιᛳّ̬̈́͞ܧၗ֭ Ąӈֹଋ۞ҋࢎ Variant ॡڱΨι۞͞ײࢬ۞ᛳّͽ̬̈́פ࿅ѩ Variant ᝝ ĄּтĂࡶ Variant Βӣ˘̬࣎ࢬĂଋΞͽ౅ڱߙֱ Variant ጾѣᛳّ̈́͞ ڱ͚೯ᛳّ̈́͞ ёĄבёĄּтĂVarCmplx ಏ̮ᔘ೩ֻ˞˘ુኑᇴ˯ΞซҖᇴጯྻზב̍׍ ੵ˞ͽ˯ٙ೩۞ᇾ໤̍׍Ăଋ˵Ξͽࠎҋ̎۞ҋࢎ Variant ݭၗ೩ֻ׎ι۞ ё̖ਕึӀֹϡĄב ೱજүĂٙͽ VarCast ΃ᙷҾ̏གྷ၁үݭҾᖼޢ ёĂЯࠎ TCustomVariantTypeב јࣶͽ̈́ VarCast ຍ˯ࢗ၁үֹϡ˞ٙѣ Variant ۞ВТপᇈĈTVarData ੃ᐂ۞ VTypeڦኛ end; Result := AValue; else VarCast(Result, AValue, VarComplex) if not VarIsComplex(AValue) then begin function VarAsComplex(const AValue: Variant): Variant; end; Result := (TVarData(AValue).VType and varTypeMask) = VarComplex; begin function VarIsComplex(const AValue: Variant): Boolean; VarCmplx ಏ̮̚۞၁үĈ ҋࢎ Variant ݭၗͽ̈́૟׎ιݭၗ۞ Variant ᖼݭࠎາ۞ҋࢎݭၗĄ˭Еࠎ Ωγ׌࣎̂ొ̶ҋࢎ Variant ౌົ೩ֻ۞̍׍ߏᑭߤߙ࣎ Variant ߏӎࠎྍ end; Result := ComplexVariantType.VarType; begin function VarComplex: TVarType; ёĈבтңᇤᆷ˘࣎็а TCustomVariantType.VarType ᛳّ۞ᅃӄ ёϯቑב΍۞פ΃ѩ΃ቅ۞඀ԔȈ̶ѣϡĄ˭ЕϤ VarCmplx ಏ̮פֻ˘࣎ ІॡజҋજயϠĄ೩ۏ΃ޢ ϲ TCustomVariantTypeޙቅ̙֭ߏ૱ᇴĄιົд ϲ็аҋࢎ Variant ݭҾ΃ቅ۞඀ԔĄѩݭҾ΃ޙΩ˘࣎ѣϡ۞ᅃӄ̍׍ߏ ᄃ඀ёనࢍ͘Ίܝ5-60 ˢ TConvertVarData(V).VConvType, LType), LType) VarConvertCreateInto(Variant(Dest), Convert(TConvertVarData(V).VValue, System.Copy(Name, 3, MaxInt), LType) then if DescriptionToConvType(ConvTypeToFamily(TConvertVarData(V).VConvType), begin else if System.Copy(Name, 1, 2) = 'AS' then onvFamilyToDescription(ConvTypeToFamily(TConvertVarData(V).VConvType)) Variant(Dest) := else if Name = 'FAMILYNAME' then Variant(Dest) := ConvTypeToFamily(TConvertVarData(V).VConvType) else if Name = 'FAMILY' then Variant(Dest) := ConvTypeToDescription(TConvertVarData(V).VConvType) else if Name = 'TYPENAME' then Variant(Dest) := TConvertVarData(V).VConvType else if Name = 'TYPE' then Variant(Dest) := TConvertVarData(V).VValue if Name = 'VALUE' then Result := True; // 'As[Type]' // 'FamilyName' // 'Family' // 'TypeName' // 'Type' // 'Value' // supports... begin LType: TConvType; var const V: TVarData; const Name: String): Boolean; function TConvertVariantType.GetProperty(var Dest: TVarData; ଀ᛳّĈפᚶٚĄٙͽι۞ҋࢎ Variant ͚೯ᛳّĄ˭Еቑּϯቑтң ּтĂVarConv ಏ̮۞ TConvertVariantType Ϥ TInvokeableVariantType ᙷҾ ĄڱΨ͞ײᛳّ̈́פΞϡֽхڱ͞˯ͽ y SetProperty y GetProperty y DoProcedure y DoFunction ĈڱTInvokeableVariantType ؠཌྷα࣎͞ TCustomVariantType ᙷҾĄ ܧTInvokeableVariantType ᚶٚĂ҃ Ăϡֽ͚೯ҋࢎ Variant ݭၗ۞ᙷҾಶᑕྍϤڱࡶࢋۡତᛳّ̈́͞ ϡ TInvokeableVariantTypeֹ ֹϡ BaseCLX 5-61 ΃ᙷҾĄޢ۞ υื૲ѣ RTTIĄ఺ܑϯιυืͽበᛌ޽ϯ {$M+} ซֽበᛌĂٕߏ TPersistent ІۏӀྻүĂΒӣҋࢎྤफ़۞ึטො ࠎ˞ឰ TPublishableVariantType ೩ֻ۞፟ ۞̍үĄ ଀̈́ᆷˢᛳّפซҖֽڱ͞ І۞ GetProperty ̈́ SetPropertyۏ TComplexData ᆸ۞̍үĄιӀϡ RTTI Լᆷ˞غTPublishableVariantType ᙷҾົࠎଋซҖ end; Result := TComplexVarData(V).VComplex; begin function TComplexVariantType.GetInstance(const V: TVarData): TObject; ІĈۏ д TVarData ੃ᐂ྆۞ TComplexDataٸĂ็аᐼڱ͞ TComplexVariantType ᚶٚҋ TPublishableVariantTypeĂ֭ ͷ ၁ ү GetInstance ኑᇴ۞̳ฟᛳّ(Reală Imaginaryă Radius ă Theta ̈́ FixedTheta)Ą ٺІጾѣ˘ֱᙯۏ І࢑యĄTComplexDataۏ ૟ኑᇴྤफ़ϹϤ TComplexData ּтĂಶညώౢ̬ٙ௜۞Ķᐼхҋࢎ Variant ྤफ़ķĄTComplexVariantType ώ֗۞ᛳّĄ І۞̳ฟᛳّౌົјࠎ VariantۏĂ֤ᆃٙѣྍڱ͞ ҾĂГ၁ү GetInstance Variant ώ֗۞ᛳّ˘ᇹĄΪࢋଋͽ TPublishableVariantType ᙷҾઇࠎͭᙷ ёֽ၁үᛳّĂಶညߏ͞۞ٽІĂ֤ᆃѣՀटۏࡶҋࢎ Variant ۞ྤफ़Βӣ ֹϡ TPublishedVariantType ЩჍĂણᇴᇴϫͽ̈́ݭၗĄڱឰଋΞͽજၗгயϠ͞ ࠰ࠎȈ֖۞˘ਠ̼Ăڱ͞ ТᇹгĂSetPropertyăDoFunction ̈́ DoProcedure ЩჍĄ ͚೯જၗயϠ۞ᛳّڱຍѩ͞ڦ଀ྤੈĂͽ Variant ݭၗ็аĄኛפࡔᐂ̚ Ϥ TVarDataޢͽ Name ણᇴֽ଀ۢຐࢋଣྙ۞ᛳّЩჍĂ൒ڱ͞ GetProperty end; Result := False; else end Result := False; else 5-62 ˢܝᄃ඀ёనࢍ͘Ί ֹϡ̮І 6-1 y ̮Іਕΐ˯ፋЪᒖဩ۞̮Іሹ̚Ă˵Ξͽдܑॾ˯ซҖፆү y ̮ІᛳّΒӣેҖॡഇݭҾྤੈĄ ϲдુᝑ(stack)̚Ąޙ௢ુ(heap)˯Ă̙ਕٺy ̮ІΪਕ੨ཉ ΐˢᗝγ۞఍ந඀ёቅĄ̰ڱԛಶߏд׎ְІ఍ந͞ үͭ΃ᙷҾֽࢉϠາ۞ᙷҾֽ࣒ԼΑਕĄ༊̮ІజᚶٚॡĂ౵૱֍۞ଐ ૟ιࣇ༊ܧy ̮І౵૱֍۞ֹϡ͞ёĂߏ౅࿅࣒Լιࣇ۞ᛳֹֽّϡĄ҃ y ٙѣ۞ Delphi ̮Іᚶٚҋ TComponent ᙷҾхд඾̙͌۞मளĄमளт˭Ĉ ᙷҬĂҭְ၁˯Ă̮Іྫྷ˘ਠ۞ޝͺ࠻̝˭ĂDelphi ۞̮Ірညྫྷ׎ιᙷҾ ॾٕྤफ़ሀ௡˯ĄܑٺΞෛ̮Ітྤफ़ాඕ̮Іཉܧ ЕЧ჌Ξෛ̮ІĂт޷ต̈́Еϯ஼ඈඈĂֽ྿јֹϡ۰̬ࢬ۞నࢍĄٕߏ૟ ཉଵٸ˯ॾٕྤफ़ሀ௡˯ĄଋΞͽдܑॾܑٺٸٳሹ˯Ᏼፄ˘̮࣎ІĂ૟ι дፋЪᒖဩ̚Ăధк̮Іౌͽщ྅д̮Іሹ˯۞͞ёֽ೩ֻĄଋΞͽд̮І ϡ̮Іֹ ᄃ඀ёనࢍ͘Ίܝ6-2 ˢ categoriesķĄ Ķproperty۞ځՀкྤੈĂણ֍ቢ˯ᅃӄᄲٺViewĄᙯ פ˭໣ဂΠᔣĂ֭Ᏼ Іᑭෛጡ޷ۏ࿰న˯ĂLegacy ᙷ۞ᛳّ̙ົពϯĂࢋԼត display filterĂд ޷˭ഴཱི޷ᔣົᔳᖟ఺ᛳّ۞̄ࣃЕϯĄ ّ۞̄ࣃЕϯĄ࠹ТгĂࡶߏдᛳّЩჍय़ᙝ΍னഴཱི(-)Ă޷˭ഴཱིٕۡତ ࡶߏдᛳّЩჍय़ᙝ΍னΐཱི(+)Ă޷˭ΐཱིٕۡତ޷˭ΐཱི޷ᔣົពϯ఺ᛳ ᗕᑝ Value ᛼Ҝ̷ೱᏴፄĄٕפΞͽଂ˭ٛЕܑᏴ ЕᓝݭၗᛳّĂٕڒοٺॡĂΞͽۡତ޷˭ᛳّ۞ฟᐝфϓۡତᏴፄᛳّĄ၆ Property ᛼ ٺֹϡ Tab Ξд Value ᛼Ҝ׶ Property ᛼Ҝม̷ೱĄ༊ഫᇾҜ Іᑭෛጡົពϯ΍ٙᏴ̮І۞ᛳֻّଋበᏭĄۏ༊ҰᏴፄܑॾ˯۞̮ІॡĂ дనࢍॡഇనؠᛳّ ͛ІĄځՏ̮࣎І۞ᛳّĂኛણ҂ቢ˯ᄲٺᙯ ࣃĄ ϡপঅ۞ᛳّበᏭጡĄࢋдેҖॡഇనؠᛳّĂдᑕϡ඀ё඀ёቅనؠາ۞ ІᑭෛጡనؠĂдߙֱଐԛ˭ĂΞͽӀۏpublished ᛳّдనࢍॡഇΞͽд నؠ̮Іᛳّ ଀ྤफ़Ąפ̈́ଂܑॾ ϲܑॾĂ็ᅍણᇴͽޙϲᑕϡ඀ёֹϡ۰̬ࢬķ૟̬௜тңજၗޙௐ 9 ౢĶ event handler)ӈΞĄ) ڱDelphi ̮І఍நĄ༊Ұຐࢋаᑕߙ࣎ੈिॡĂΪࢋ೩ֻ၆ᑕ۞ְІ఍ந͞ ѩੈिซҖаᑕĄ̂ొ̶۞ Windows ੈि(VCL)ٕր௚ְІ(CLX)ౌົజ ёซҖ఍நĂ၆בswitch ୃࢗĂੈि၆ᑕܑٕаᑕܑॾ)֭૟ι̶ࠁҌዋЪ۞ ॡĂր௚ົயϠ WM_LBUTTONDOWN ੈिĄ඀ёυืྃ॓ੈि(఼૱གྷϤ ၆ྖ஼Ąд˘ֹ࣎ϡ VCL ̮І۞ Windows ᑕϡ඀ё̚Ă༊ֹϡ۰޷˭޷ต ྅ّĄּтĂԧࣇֽ࠻࠻Βӣ˘࣎޷ต۞ދІ఼૱ͧ˘ਠᙷҾ׍ѣՀָ۞̮ ֹϡ̮І 6-3 DrawGrid1.Repaint; :ڱ͞ ۞ Repaint Ψᘱ൪͞ॾײᇆညĄҰΞͽည఺ᇹ̄۞ีטࢦ൪Ꮘ၌˯ଠົڱ͞ ѣ Repaint ีטΨၚּĄּтĂෛᛇ̼ଠײё࠹Т۞בmethod)ֹϡ׶೼఼඀Ԕᄃ)ڱ͞ ڱΨ͞ײ ;Form1.Caption := MyString ͽજၗనؠܑॾ۞ᇾᗟ: ЇңдనࢍॡഇΞͽనؠ۞ᛳّౌΞͽϡ඀ёቅдેҖॡഇనؠĄּтĂΞ дેҖॡഇనؠᛳّ Ąڍ૱˵ົឰҰ࿰ᜓనؠඕ ᛳّበᏭጡឰҰдಏ˘၆ྖ͞๴నؠኑᗔ۞ᛳّĄιࣇ೩ֻᏮˢ۞រᙋĂ఼ ˟˭˵ົฟୁᛳّበᏭጡĄ ߙֱ̮ІĂдܑॾ˯۞̮І޷ٺ޷˭(…)௑ཱིಶົฟୁ఺ᇹ۞၆ྖ͞๴Ă၆ ّय़ᙝ۞ Value ᛼Ҝពϯ(…)Ąࢋฟୁ఺ᛳّበᏭጡĂ޷˟˭ Value ᛼Ҝٕ Іᑭෛጡ̰ົдᛳۏѣֱᛳّ(ညߏ Font)ѣপঅ۞ᛳّበᏭጡĄ఺ֱᛳّд ֹϡᛳّበᏭጡ Іᑭෛጡ˯ĄۏՀЩĂ˵ົ੺˯ͅᑕдڱӘ඀ёቅ̚૟ְІ఍ந͞ކҾ ଋдܑॾᙷڍІᑭෛጡົҋજԼត࠹၆ᑕ۞඀ёቅĄੵѩ̝γĂтۏԼតĂ Іᑭෛጡ˯Լតᄃ඀ёቅ࠹ᙯ۞ᛳّĂт event hanlder ۞ЩჍâҭۏд І˯Ą̮۞ פІ۞ࣃĄ༊ҰԼតВѣᛳّ۞ࣃĂԼតࣃົүϡдՏ࣎Ᏼ̮۞פௐ˘࣎Ᏼ Іᑭෛጡົពϯ࿰నࣃٕߏۏІ۞఺ֱᛳّࣃ̙࠹ТĂ̮۞פNameĄࡶߏᏴ ІٙВѣ۞ᛳّ⎯ੵ˞̮פІᑭෛጡົពϯᏴۏॡĂפ༊к࣎ᛳّజᏴ ᄃ඀ёనࢍ͘Ίܝ6-4 ˢ Ξͽాඕ۞ٙѣְІĄ Іᑭෛጡ۞ Events ࢱົពϯ఺̮ІۏІᑭෛጡ޷˭ Events ᇾចĄۏ2 д ІĄ̮פ1 Ᏼ ĂڱІᑭෛጡயϠְІ఍ந͞ۏֹϡ ĄࢋڱІᑭෛጡആܑॾٕߏܑॾ˯Їң̮ІயϠາ۞ְІ఍ந͞ۏଋΞͽϡ ڱϲາ۞ְІ఍ந͞ޙ ڱy ӁੵְІ఍ந͞ y ૟ΑਕְܑІాඕ˯඀ёቅ ڱனх۞ְІ఍ந͞זy ૟ְІాඕ ڱІ఍நְ͞זy Ա ڱϲ̮І࿰నְІ۞఍ந͞ޙ y ڱy யϠາ۞ְІ఍ந͞ тңĈځপঅ۞඀ԔĄώ༼૟ᄲ ၁ᅫ˯ߏڱevent handler)ĂְІ఍ந͞)ڱҖĄ఺ᇹ۞඀ёቅΨઇְІ఍ந͞ Delphi ̚Ăೀͼٙѣଋᇤᆷ۞඀ёቅౌົۡତٕมତ۞੫၆ְІ۞аᑕ҃ે Іߏ˘পҾ۞ᛳّĂ΃ܑેҖॡഇٙ൴Ϡ۞ְĂ఼૱ߏֹϡ۰۞જүĄдְ ڱֹϡְІ׶ְІ఍ந͞ ቑಛ۞ՀкྤੈĂણ֍ௐ 4 ౢ۞Ķቑಛ׶ࢨؠෟķ˘༼Ąٺᙯ end; epaint; R begin procedure TForm1.Button1Click(Sender: TObject); ЩჍĈ ࢬΐ˯ܑॾ۞݈ڱΨ͞ײࢦ൪ܑॾĂ̙ᅮࢋдڱІ఍நְ͞۞ีטॾ۞̄ଠ ЩჍ۞ቑಛĄּтĂࡶߏᅮࢋдܑڱ͞ٺՙפ׶ᛳّ˘ᇹĂߏӎᅮࢋࢨؠෟ ֹϡ̮І 6-5 begin..end ડ๴̰Ą ۞ڱְІ఍ந͞ 3 ᗕᑝଋຐࢋ៍࠻ְІ۞ value ᛼ҜĂົχฟ඀ёቅበᏭጡĂഫᇾ݋ઃд Іᑭෛጡ̰Ă޷˭ Events ᇾចĄۏ2 д ІĄ̮۞ڱຐࢋԱವ׎ְІ఍ந͞פ1 дܑॾ˯ĂᏴ ĈڱࢋԱವ̙ߏ࿰నְІ۞ְІ఍ந͞ ඀ёቅௐ˘Җ۞ฟᐝҜཉĄڱઃд̮І۞࿰నְІ఍ந͞ Ĉᗕᑝܑॾ˯۞̮ІĂົχฟ඀ёቅበᏭጡĂഫᇾ݋ڱ఺ְ࣎І఍ந͞זԱ ڱĂΞͽϡ࠹Т۞͞ڱࡶߏᗕᑝܑॾ۞ߙ̮࣎ІĂͽயϠ࿰నְІ۞఍ந͞ ڱವԱְІ఍ந͞ тົฟୁਕૉซҖనࢍॡഇᛳّበᏭ۞၆ྖ͞๴Ą ᑕЇңְІĄٙͽ༊ଋдܑॾበᏭጡ˯ᗕᑝ఺ֱ̮ІĂົѣ̙Т۞ͅᑕĄּ Ąѣֱ̮І(ညߏ TBevel)̙֭ົаڱٙѣ۞̮Іౌѣ࿰న۞ְІ఍ந͞ܧ֭ Ą˯ڱ࣒Լ۞ְІ఍ந͞ ҋજயϠ OnClick ְІ۞඀ёቅĂ֭ฟୁ඀ёቅበᏭጡĂ૟ഫᇾઃдଋᅮࢋ ĂдܑॾበᏭጡ̚ᗕᑝ఺̮ІĂಶڱOnClick ְІĄࢋயϠ࿰నְІ఍ந͞ ҘĄּтĂ޷ต۞࿰నְІߏڌ࿰నְІߏ̮ІдેҖॡഇ౵૱ᅮࢋ఍ந۞ ڱϲ࿰నְІ۞ְІ఍ந͞ޙ 4 д begin..end ડ๴̰ĂᏮˢ༊ְІ൴ϠॡࢋેҖ۞඀ёቅĄ ๴̰Ą begin..end ડ זĂٕ૟ഫᇾொڱበᏭጡົฟୁ֭૟ഫᇾொҌְІ఍ந͞ ޷˟˭ Value ᛼ҜĂٕߏ޷˭ Ctrl+EnterĄ඀ёቅޢଋࢋ۞ְІĂ൒פᏴ 3 ᄃ඀ёనࢍ͘Ίܝ6-6 ˢ end; AboutBox.ShowModal; AboutBox.Caption := ''; else AboutBox.Caption := 'About ' + Application.Title if Sender = Button1 then begin procedure TMain1.Button1Click(Sender: TObject); ၆ྖ͞๴ᇾᗟពϯᑕϡ඀ё۞ЩჍĄ ણᇴĄּт˭ࢬ۞඀ёቅົд OnClick ְІߏϤ Button1 ̮Іᛈ൴ॡĂ̖д Ψֽઇ̙Т۞̍үĄᙯᔣᕇߏд if..then..else ୃֹ̰ࢗϡ Senderײ̮࣎І ॡĂ˵ΞͽॲፂߏࣹڱĄೀ̙࣎Т۞̮ІВֳТ˘఍ந͞ڱΨ఍ந͞ײГޢ ߏࣹ˘̮࣎ІயϠְІĂ൒غזߏӀϡ Sender ણᇴĂֽ޽΍̚ڱְІ఍ந͞ ֹϡ Sender ણᇴ ˘༼Ą ̈́ action bands ۞ՀкྤੈĂኛણ֍ௐ 9 ౢ۞Ķგந̍׍Ё́Αਕܑ۞જүķ action lists ٺπέᑕϡ඀ёĂaction bands ̙ҖĄᙯྭٺAction lists Ξϡ action bands ೩ֻՀૻ̂۞̍׍ĂΞะ̚გநаᑕֹϡ۰જү۞඀ёቅĄ Ąҭߏ Action lists ̈́ VCL ̚۞ڱ͞ٽᖎ۞ڱ˯ࢗ඀ԔߏВϡְІ఍ந͞ ιĄפЩჍĂಶΞଂЕϯ̚Ᏼ۞ڱְІ఍ந͞ Ą޷ ˭(ڱІ۞ְІ఍நְ͞۞פ(఺ЕϯΪົពϯ఺ܑॾ˯Ξͽ޽ؠගᏴ ЕϯĄڱ3 ޷˭఺ְІय़ᙝ۞˭቏ᐝĂχฟ˘ҚА݈ᇤᆷр۞ְІ఍ந͞ ඀ёቅ۞ְІĄڱຐࢋాඕ఍ந͞פІᑭෛጡ۞ Events ࢱ˯ĂᏴۏ2 д ຐࢋᇤᆷ׎ְІ඀ёቅ۞̮ІĄפ1 дܑॾ˯ĂᏴ Ĉڱனх۞ְІ఍ந͞זࢋ૟׎΁̮І۞ְІాඕ ĄڱְІ۞ְІ఍ந͞ Ч̮࣎І OnClickזต୬ซҖᄃᏴಏีϫ࠹Т۞જүĂଋΞͽᇤᆷТॡాඕ Ą༊˘࣎޷ڱ఼ϡְІ఍ந͞۞זΨײᏴಏ׻΄׶̍׍Е˯۞ԣి޷ตౌົ ඀ёቅГӀϡĄּтĂזĂΞͽ྿ڱᖣϤᇤᆷ఍நк̮࣎ІְІ۞ְІ఍ந͞ ڱனх۞ְІ఍ந͞ז૟ְІాඕ ֹϡ̮І 6-7 ࢱ̰Ăቁؠѣࣃ޽ؠගΑਕܑีϫ۞ Name ᛳّĄ Іᑭෛጡ۞ PropertiesۏΑਕܑีϫĄдפ2 д Menu Designer ෛ඄̰ĂᏴ ІಶΞฟୁ Menu DesignerĄۏ 1 ᕇ˟˭ MainMenu ٕ PopupMenu ΑਕܑีϫĂזඕాڱࢋ૟னх۞ OnClick ְІ఍ந͞ ۞඀ёቅĄ 4 д begin..end ડ๴̰ĂᏮˢଋԓ୕༊ֹϡ۰޷˭఺࣎ΑਕܑีϫॡેҖ Ăഫᇾົઃд begin..end ડ๴̰Ąڱጡ̰யϠְІ఍ந͞ 3 ଂ Menu Designer ෛ඄̰Ă޷˟˭ΑਕܑีϫĄDelphi ົд඀ёቅበᏭ Name ᛳّѣనؠࣃĄ Іᑭෛጡ̰Ăቁؠ఺ีϫ۞ۏΑਕܑีϫĄдפ2 д Menu Designer ̰Ᏼ ІಶΞฟୁ Menu DesignerĄۏ 1 ᕇ˟˭ MainMenu ٕ PopupMenu ĂڱࢋആΑਕܑีϫயϠְІ఍ந͞ ϲ׶გநΑਕܑķ˘༼Ąޙ׶࠹ᙯྤੈĂણ֍ௐ 9 ౢ۞Ķ Menu Designer ٺඕ˯ΑਕܑᏴಏĄᙯాڱਕܑĄώ༼ྋᛖтң૟ְІ఍ந͞ ၗԼតΑې׻΄ౌυืаᑕ OnClick ְІĂ҃ͷ఼૱ଋົࢋજၗ۞ॲፂ඀ё ĄࢋឰΑਕܑྻүĂՏ࣎Αਕܑٽट૱ܧΐ˯˭ٛёΑਕܑ׶ᇅ΍ёΑਕܑ Delphi ۞ Menu Designer ΐ˯ MainMenu ׶ PopupMenu ̮ІĂឰᑕϡ඀ё ڱ૟ΑਕְܑІాඕனх۞ְІ఍ந͞ Ąڱؠ˘࣎னх۞ְІ఍ந͞ ߏ޽ٕڱ఺ְІĂд Value ᛼ҜΞͽயϠາ۞ְІ఍ந͞פEvents ࢱ̰ĂᏴ Іᑭෛጡ۞ۏдޢͽ Shift ᔣᕇᏴ)ٙѣࢋ៍࠻׎В఼ְІ۞̮ІĂ൒)פᏴ ఺ֱ̮І֭ពϯιࣇВѣ۞ְІĄдܑॾ˯Ăפ༊̮ІѣВ఼۞ְІĂΞͽᏴ ពϯ׶ᇤᆷВֳ۞ְІ඀ёቅ ᄃ඀ёనࢍ͘Ίܝ6-8 ˢ CLX૞ϡĈLCDNumberĄ ̈́StaticTextĄ ActoinToolBarăCustomizeDlg ActionMainMenuBară ChartăActionManageră ValueListEditorăColorBoxă ApplicationEventsă ߏĂੵVCL૞ϡĈ ีטAdditional ҋࢎ۞ଠ ӎ Microsoft͛І(msdn.microsoft.com)Ą ቑּĂኛણ҂۞ีטActiveX ActiveXଠ ࢱࢬЩჍ ̰ट ྭπέĉ ܑ6.1 ̮Іሹࢱࢬ̈́ٙΒӣ۞̮І Ąܑ 6.1 Е΍࿰న۞̮Іሹࢱࢬ׶ιࣇٙΒӣ۞̮І჌ᙷĄڱ͞ ώ۞ Delphi Ξਕ၆̮Іѣ̙Т۞̶ᙷۍд Standard ࢱࢬĂ̙Тٸٕ޷ตົ ϲΑਕܑăበᏭ͞๴ޙТ۞ࢱࢬ˯Ąּтགྷ૱ֹϡ۞̮Іညߏ̙ٺ̶ᙷĂཉ ̮ІሹΒӣధкΞͽдᑕϡ඀ёֹ̰ϡ۞̮ІĄ̮Іሹ˯۞̮ІͽΑਕซҖ πέ̮Іྭܧྭπέᄃ ᏾ᄱĄ interface ડ)׶ι۞၁ү(д implementation ડ)ćӎ݋дበᛌॡົ΍னበᛌ Ә(дಏ̮۞ކ۞ڱĂҭߏࡶҰтѩઇĂࢋቁؠொੵ͞ڱӁੵְІ఍ந͞ ΨĄࡶଋᙸຍĂ˵Ξͽҋ̎ײΞਕົజ఺ܑॾ˯׎΁̮Іٙڱٙ೩Ă఺ֱ͞ ĂЯࠎಶт݈ࢬڱ໰ĄҭߏӁੵ̮І̙֭ົଂ඀ёಏ̮ᑫ९̰Їң࠹ᙯ۞͞ Ә̚۞ણކ༊ଋдܑॾበᏭጡ˯Ӂੵ̮ІĂ඀ёቅበᏭጡົӁੵдܑॾݭҾ ڱӁੵְІ఍ந͞ ĄפЩჍಶΞଂ఺ЕϯᏴڱ΍னдЕϯ̰Ą)޷˭ְІ఍ந͞ົڱ͞ ЕϯĄ(Ϊѣࠎ఺ܑॾ۞ OnClick ְІᇤᆷ۞ְІ఍ந۞ڱ۞ְІ఍ந͞ Іᑭෛጡ۞ Events ࢱ̰Ă޷˭ OnClick य़ᙝ۞˭቏ᐝฟୁА݈ᇤᆷۏд 3 ֹϡ̮І 6-9 ϲშᅫშྮᑕϡ඀ёٙᅮ۞ ߏޙIndy I/O ׎ι ߏ ఼ੈ̮І) ࣧؕቅ۞Winshoesშྮٸ̮І(ฟ ϲშᅫშྮᑕϡ඀ёٙᅮ۞ޙIndy Misc ׎ι ߏ ఼ੈ̮І) ࣧؕቅ۞Winshoesშྮٸ̮І(ฟ ბٙᅮྭπέ۞შᅫშྮ఼ੈڇIndy Servers Ҩ ߏ ఼ੈ̮І) ࣧؕቅ۞Winshoesშྮٸ̮І(ฟ ბٙᅮྭπέ۞შᅫშྮ఼ੈ͗މ Indy Clients PageSetupDialog̮ІĄ PrinterSetup-Dialog̈́ SavePictureDialogă OpenPictureDialogă Dialogs ၆ྖ͞๴̮І ߏćੵVCL૞ϡĈ І ӎ̮ژDecision Cube ྤफ̶़ ӎ І ϲкᆸߛၹྤफ़ऱᑕϡ඀ё۞̮ޙ DataSnap ߏ ጡ۞Вϡ̬ࢬĄڇSQLҨפ ϲ۞જၗSQL఍ந̮ІĄιؠཌྷ˞х dbExpress ֹϡdbExpress۞ྭπέĂྤफ़ऱ̚ DBCtrlGrid̈́DBChartĄ Data Controls ෛᛇ̼۞ྤफ़ຏ̮ۢІ ߏćੵVCL૞ϡĈDBRichEditĂ XMLTransfromClientĄ XMLTransformProvideră̈́ XMLTransformă ߏćੵVCL૞ϡĈ ෛᛇ̼̮Іܧ फ़ऱăܑॾăߤྙă׶ಡܑ۞ྤפData Access х COM+ ఍நCOM+ְІ۞̮ІĄ ӎ ӎ फ़ऱ۞̮ІĄྤ פBDE གྷϤBorland Database Engineх ӎ ऱ۞̮ІĄ फ़ྤפADO གྷϤActiveX Data Objectsх ࢱࢬЩჍ ̰ट ྭπέĉ ᄃ඀ёనࢍ͘Ίܝ6-10 ˢ ĂΑਕܑ ߏีטStandard ᇾ໤ଠ ӎ Microsoft͛І COM server۞̮І,ኛણ҂ ྅Microsoft ExcelăWordඈඈދ Servers Samples ҋࢎ̮ІቑּĄ ӎ Rave నࢍෛᛇ̼ಡܑ۞̮ІĄ ߏ ӎ ІĄ ϲWebᑕϡ඀ё۞̮ޙIW Standard ͽIntraWeb ӎ ІĄ ϲWebᑕϡ඀ё۞̮ޙIW Data ͽIntraWeb ӎ ІĄ ϲWebᑕϡ඀ё۞̮ޙIW Control ͽIntraWeb ӎ ІĄ ϲWebᑕϡ඀ё۞̮ޙIW Client Side ͽIntraWeb ӎ Microsoft͛І COM server۞̮І,ኛણ҂ ྅Microsoft ExcelăWordඈඈދ Office2K ߏ ߛၹྤफ़ऱ඀ёฟ൴۞̮ІĄ ბ඀ёͽ̈́кᆸڇInternetExpress Тॡ͚೯WebҨ ߏ ۞̮ІĄ Internet ͚೯შᅫშྮ఼ੈ̈́Webᑕϡ඀ё ߏ ۞̮ІĄ გநInterBaseྤफ़ऱAPIפInterBaseAdmin ೩ֻх ߏ ۞̮ІĄ InterBaseྤफ़ऱਕ˧פInterBase ೩ֻۡତх ఼ੈ̮І) ࣧؕቅ۞Winshoesშྮٸhandler ̮І(ฟ ࢱࢬЩჍ ̰ट ྭπέĉ ֹϡ̮І 6-11 ϡ඀ёķĄ VCL ᄃ CLX ᑕϡ඀ё۞मளّĂኛણዦௐ 15 ౢĶฟ൴ྭπέᑕ ٺ୬ᒢྋᙯ Ąځ̈́ Samples ࢱࢬ۞ߙֱ̮ІΪ೩ֻቑּĂϏ೩ֻᄲ ĄActiveXĂServersځ̮ІሹᏴፄߙ˘ࢱࢬᇾចĂົពϯྍࢱࢬٙѣ̮І۞ᄲ дڍĄтځІГ޷˭ F1 ֽୁજቢ˯ᄲ̮פ˭ F1 ٕ۰૟̮Іϴ˯ܑॾ˯ĂᏴ ІሹĂ޷̮פĄҰΞͽдᏴځІሹ˯۞̮ІྤੈĂኛણ࠻ቢ˯ᅃӄᄲ̮ٺᙯ Ă૟̝ΐˢ̮ІሹĄޢ(Templae)׶॰ߛ(Frame)ۍ௡ј۞̮Іᇹ ଋΞͽᐌຍд̮Іሹ˯ᆧΐăொੵ׶ࢦາଵЕ̮ІĄ˵ΞͽயϠϤ˘ֱ̮І IconViewĄ TextBrowseră SpinEdit ̈́ CLX૞ϡĈTextViewer ă ඈĄ PageScroller̈́ComboBoxEx MonthCalendară Coolbar, DataTimePickeră UpDownăHotKeyă VCL૞ϡĈRichEdită Controlsࢱࢬć Т۞̮Іົ΍னдCommon ϲCLXᑕϡ඀ёॡĂѣధк࠹ޙ ีט˘ਠ૱ϡWindowsଠ control (CLX) /Common Win32(VCL) Win 3.1 ͚೯Windows 3.1ёᇹ۞̮ІĄ ӎ ϲWebᑕϡ඀ё۞̮ІĄ ߏޙ WebSnap ߏ ۞̮ІĄ ϲSOAP-enabled Web Servicesޙ WebServices ֶVCLٕCLXѣ̙ٙТĄ ё)Ą ࿅ᕭᄃពϯᑫ९۞̮І(CLXᑕϡ඀ ᑕϡ඀ё)Ą ጡĂᑫ९ր௚Ăкಫវ׶DDE(VCL ĂΒӣࢍॡีטSystem ր௚ᆸ৺۞̮І׶ଠ ࢱࢬЩჍ ̰ट ྭπέĉ ᄃ඀ёనࢍ͘Ίܝ6-12 ˢ ̮ІĂኛણ҂ௐ 16 ౢĶщ྅̮ІइІķĄ ۞ᑕϡ඀ёֹ̚ϡĄࡶࢋᇤᆷ̮ІĂኛણ҂̮Іᇤᆷ͘ΊĄࡶࢋщ྅ߊѣ۞ ᇄથฟ൴ůΐˢ̮ІሹĂ֭дҰ˧םଋΞͽ૟ҋࢎ̮Іů̙ኢߏҋ̎ᆷ۞ٕ Іሹ˯̮זΐˢҋᄦ̮І І 7-1̮טֹϡଠ Ѣॡ۞໣ဂ޽ᇾٳy Լត જү۞ٸٳІҋࢎۏѢٳy ౅࿅ Ѣજүٳy ඕՁ ϫี˭ٸ y Ѣซˢ۞ีϫٳצy ତ Ѣજүٳؕୁ y ׎΁̮І̰Ąזٸٳϯඕၹ̝ᙷ۞̮І ពېѢፋ̮࣎ІĂٕߏឰ΁ࣇ૟Ч࣎ีϫଂညߏЕϯ͞๴ٕፘٳͽឰֹϡ۰ ĄଋΞڱІ۞р͞ۏטdrag-and-drop)Ăߏឰֹϡ۰дܑॾ̰ଠ)ٸٳІ۞ۏ ٸٳІ̰၁ү̮טдଠ ІĂֽயϠ၁ϡ۞ֹϡ۰̬ࢬĄ̮טྋᄲтңдᑕϡ඀ёֹ̰ϡଠ ІߏਕдેҖॡഇᄃֹϡ۰யϠ̢જ۞ෛᛇ̼̮ІĄдώౢ̚Ăࠎଋ̮טଠ І̮טϡଠֹ ᄃ඀ёనࢍ͘Ίܝ7-2 ˢ Ѣ۞ีϫĄࡶٳ఺࣎జצІߏӎਕତ̮טѢഫᇾͽពϯѩଠٳϫĄኛଋԼត ఺࣎ีצд఺྆ĂιߏӎਕତٸְІĂ఺ॡ࣏ιυื޽΍Ĉࡶߏֹϡ۰ԯι OnDragOver זќົܮІ̮טҘॡĂྍଠڌѢߙֱٳ˯І̮ט༊ֹϡ۰дଠ Ѣซˢ۞ีϫٳצତ end; end; જι}ٳ BeginDrag(False); {ࡶߏтѩĂ if ItemAtPos(Point(X, Y), True) >= 0 then { ఺྆ѣ࣎ีϫ? } begin with Sender as TFileListBox do { ԯ Sender ༊ү TFileListBox } જ}ٳ if Button = mbLeft then { Ϊд޷˭໣ဂνᔣॡ begin Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure TFMForm.FileListBox1MouseDown(Sender: TObject; ѢજүĈٳ९Еϯ͞๴۞໣ဂ޷ᔣְІĂιΪົд޷˭໣ဂνᔣॡୁؕ ְІ۞ણᇴĂᑭߤֹϡ۰޷˭۞ߏࣹ࣎޷ตĄּтĂ˭ࢬ۞඀ёቅົ఍நᑫ Ψ BeginDrag ̝݈Аീྏ໣ဂ޷ᔣײѢ۞୧ІĂညߏдٳଋ˵Ξͽనؠୁؕ Ѣ۞ፆүĄٳؕୁົ̙ ໣ဂ۞ᕇᑝĂҭߏ֭צІତ̮טΨ BeginDrag(False)ົឰଠײү̖ົฟؕĄ ѢજٳĂޢϡ۰ৌϒ૟໣ဂொજ˘̈߱Ϥ Threshold ٙ޽ؠ۞෼ᗓֹזᆃ݋ࢋ ฟؕĂಶ׶ DragMode నࠎ dmAutomatic ˘ᇹĄࡶߏ็ˢ FalseĂ֤גϲົܮ Ѣજүٳ̙็ˢ۞ણᇴůThresholdĄࡶߏͽ True ็ˢઇࠎ ImmediateĂ֤ᆃ ણᇴĂͽ̈́˘࣎ΞᏴፄ็ˢٕڒĄBeginDrag ᅮࢋ˘࣎Щࠎ Immediate ۞οڱ ͞ І۞ BeginDrag̮טΨଠײѢ۞જүĂኛଋٳࡶࢋ౅࿅͘જ۞͞ёୁؕ ѢĄٳdmManual(఺ߏ࿰నࣃ)Ă֭ᖣϤ఍ந໣ဂ޷ᔣֽୁજ dmAutomatic ົ̒ᕘ໣ဂ۞ϒ૱߿જĂٙͽ˘ਠົ૟ DragMode నࠎ ٺѢĄϤٳІ˯Ăͷֹϡ۰޷˭໣ဂ޷ตॡĂಶົҋҖฟ̮ؕטଠٺᇾҜ Ѣ̮І۞͞ёĄࡶ DragMode నࠎ dmAutomaticĂ֤ᆃΪࢋഫٳֹϡ۰ฟؕ ඾̮ІдેҖॡഇаᑕטІౌѣ࣎Ψઇ DragMode ۞পّĂιଠ̮טՏ࣎ଠ Ѣજүٳؕୁ І 7-3̮טֹϡଠ end; ConfirmChange('Move', FileList.FileName, Items[GetItem(X, Y)].FullPath); with DirectoryOutline1 do if Source is TFileListBox then begin Y: Integer); procedure TFMForm.DirectoryOutline1DragDrop(Sender, Source: TObject; X, ϫᐂ̰Ą۞˭ٸז૟ᑫ९ଂϫ݈۞Ҝཉொ Ѣֽ۞ϫᐂፘពϯ̮ІΞͽٳଂᑫ९Еϯ͞๴צд˭ࢗ۞ VCL ቑּ̚Ăତ Ѣ׎˯ॡĂԼត̮І۞ᗞҒĄٳशĄּтĂҰΞਕົֹϡѩ˘ྤੈĂֽдีϫ Ѣॡٙགྷ࿅۞ྮٳІజۏѢٳёਕૉ監看జב఍நٸٳ۞ळᇾĄ఺ֱણᇴឰ І˯̮טତќ۞ଠٺѢีϫ۞ֽ໚Ă׶ҜٳІ˘ᇹĂdrag-drop ְІពϯజ І۞ OnDragDrop ְІ˯Ąಶ׶ drag-over ְ̮טѢีϫ۞ଠٳజצࢋତז Ѣซˢ۞ีϫĂኛଋ૟ְІ఍ந඀ԔాඕٳĄࡶࢋ఍நజڱॡ۞఍ந͞˭ٸ ІజۏѢซˢ۞ีϫॡĂι˵ົᅮࢋؠཌྷдٳצІܑϯιΞͽତ̮ט˘όଠ ϫี˭ٸ ;end Accept := False; else Accept := True; if Source is TFileListBox then begin Y: Integer; State: TDragState; var Accept: Boolean); procedure TFMForm.DirectoryOutline1DragOver(Sender, Source: TObject; X, Ѣֽ۞ีϫĈٳଂᑫ९Еϯ͞๴צቑּ̚Ăϫᐂፘពϯ̮ІΪົତ Ąд˭ࢬ VCL ඀ёቅ˭ٸ఺࣎צІ఍ந඀ԔΞͽϡ఺ֱણᇴՙؠֹӎࢋତ Ѣ۞ֽ໚׶໣ဂഫᇾ۞ϫ݈ҜཉĄְٳDrag-over ְІΒӣೀ࣎ણᇴĂΒӣ Ąצତ̙ٕצΞ૟׎నࠎ TrueĄAccept ົ૟ഫᇾ۞ᙷݭԼតࠎତܮ˘ีϫॡĂ ѩצѩ drag-over ְІ̚ѣ࣎Щࠎ Accept ۞តᇴણᇴĂࡶְІ఍ந඀Ԕ୬ତ ְ࣎І఍ந඀ԔĄ І۞ OnDragOver ְІాତҌߙ̮טІ˯ࢬ۞ีϫĂኛ૟ଠ̮טдଠצࢋତ ᄃ඀ёనࢍ͘Ίܝ7-4 ˢ ІĄۏѢٳბߏӎࠎ ёĂͽ̶Ᏹֽ໚ב Ψ isDragObjectײdrag-over ׶ drag-drop ְІ౅࿅ਕૉ ІӈΞĄۏІĂ֤ᆃĂϫᇾბಶΪᅮࢋ఍ந˘჌ᙷݭ۞ۏѢٳ࠹Тᙷݭ۞ Іౌд׎ OnStartDrag ְІ̚யϠ̮טՏ࣎ଠڍІҋ֗ćтۏѢٳ໚ბӈࠎ І̖ҖĄ̙࿅Ă༊ଋֹϡ˞ TDragObject ۞ࢉϠᙷҾॡĂֽ̮ט͚೯Տ჌ଠ ѢĂֽ໚ბ଀ٳІᅮࢋୁؕ࠹Тྤफ़۞̮טІĄࡶߏк̙࣎Тଠ̮טү۞ଠ Ѣજٳϒ૱ֽᄲĂOnDragOver ׶ OnDragDrop ְІ۞ֽ໚ણᇴߏୁؕፋ࣎ ІĄۏѢٳд OnStartDrag ְІֽ̚யϠҋࢎ۞ ĄڱІĂֶ֭ᅮࢋᖬᄏ׎෍ᑢ͞ۏѢٳVCLğࢉϠ ٺTDragObjectExĞ่ዋϡ ၗྤੈĂΞͽଂ TDragObject ٕېഫᇾळᇾĄࡶଋຐࢋᒔ଀Հк۞ І˯ࢬ۞̮טଠ۞צѢีϫ۞ֽ໚ăͽ̈́дତٳ׶ drag-drop ְІົ޽΍జ ҖࠎĄ࿰న˯Ădrag-overٸٳІ۞ۏଋΞͽֹϡ TDragObject ֽҋҖనؠ જү۞ٸٳІҋࢎۏѢٳ౅࿅ end; if Target <> nil then FileList1.Update; begin procedure TFMForm.FileList1EndDrag(Sender, Target: TObject; X, Y: Integer); ѢְІĈٳ д˭ࢗ۞ VCL ቑּ̚Ăᑫ९Еϯ͞๴ົࢦາፋநι۞ᑫ९Еϯͽ఍நඕՁ І˯ळᇾࣃĄ̮טॡĂତќ۞ଠ˭ٸְІ˵ӣѣ ІĄOnEndDrag̮טѩ˘ีϫ۞ଠצѢ۞ีϫĄ̝ͅĂTarget ӈࠎତٳ఺࣎జ צІତ̮טજүĄࡶߏ Target ࠎ nilĂ΃ܑ՟ѣଠ˭ٸ఺࣎צІ(ࡶѣ۞ྖ)ତ ̮טOnEndDrag ְІ̚౵ࢦࢋ۞ણᇴߏΨઇ TargetĂι޽΍˞տౣߏࣹ࣎ଠ І۞ OnEndDrag ְІాඕְІ఍ந඀ԔĄ ̮טѢฟ۞ีϫĂኛдଠٳІаᑕଂι̮טІĄࡶࢋឰଠ̮טѢજү۞ଠٳ аගୁؕ็ົܮѢ۞ְІٳฟ໣ဂ޷ᔣ)Ă֤ᆃඕՁٸѢีϫ۞Тॡٳజצତ І̙̮טĂٕߏֹϡ۰дଠ˭ٸѢ۞ีϫ̏జٳѢፆүඕՁॡ(Ξਕߏజٳ༊ ѢፆүٳඕՁ І 7-5̮טֹϡଠ 1 నؠ DockSite পّࠎ TrueĄ Іјࠎ docking ૄгĂኛଋĈ̮טࡶ୬ֹෛ඄ݭၗ۞ଠ Іјࠎ docking ૄг̮טឰෛ඄۞ଠ পّĄٸٳො д CLX ̙̚Ξֹϡ જү۞͞ёٸٳІаᑕ̮טଠ̄טy ଠ Іᗓฟ docking ૄг۞͞ё̮טଠ̄טy ଠ д docking ૄг۞͞ёٸІઃ̮טଠ̄טy ଠ І̮טෛ඄ଠ̄۞ٸІјࠎΞઃ̮טy ឰଠ Іјࠎ docking ૄг̮טy ឰෛ඄ݭၗ۞ଠ ІĈ̮טpanel(၆ᆅϡ͗ბડા)۞̄ଠ តјົܮ఺ panel ˯ॡĂιࣇזٸٳІజ̮טଠ۞ٸdocking ૄгĄ༊Ξઃ Ξ૟˘࣎ panel ̮І׶ܑॾνᙝ၆ᆅĂ֭ឰ఺ panel јࠎܮdocking ૄгĂ docking ૄг۞̄ෛ඄ĄּтĂࡶࢋдܑॾෛ඄۞νᙝ೩ֻ זٸͽүࠎઃ TWinControl ۞ࢉϠᙷҾΞͽઇࠎ docking ૄгĄTControl ۞ࢉϠᙷҾ݋Ξ ٸٳІ̰၁ү̮טдଠ VCLğĄ ٺDragCursor পّĞ่ዋϡ Ѣ໣ဂ޽ᇾĂΪᅮдనࢍॡഇనؠ̮І۞ٳѢֹٙ̚ϡ۞ٳଋΞͽҋࢎд Ѣॡ۞໣ဂ޽ᇾٳԼត ѢĄٳࢋેҖᑫᄃֹϡ DLL ၁ү۞ܑॾ̝มซҖ ІΞͽឰଋдкֹ࣎ϡ̙Т DLL ٙ၁ү۞ܑॾĂٕߏдᑕϡ඀ё۞͹ۏѢٳ Ă֤ᆃଋΞͽԼࠎᚶٚ TDragObjectExĂͽ֨ͤ੃ጸវ۩ม۞᏷εĄٸͽᛖ ଋ఍ந۞ߏ TDragObject ۞ࢉϠᙷҾĂݒ՟ѣҋҖΐڍ۞ࢉϠᙷҾ݋ӎĄт Ă҃ TDragObjectٸVCLğົజҋજгᛖ ٺTDragObjectEx ۞ࢉϠᙷҾĞ่ዋϡ ᄃ඀ёనࢍ͘Ίܝ7-6 ˢ ાĂдௐ˟࣎జ dock ॡĂ݋ົ૟ι̶ј׌࣎፾ϲડાĂֶѩᙷଯĄPage ଠ ბડ͗މІֽᄲĂௐ˘࣎̄ෛ඄జ dock ॡĂົ๱႕̮טࣇĄ၆̂кᇴ۞ଠ ιצҋજгତົܮॡĂdocking ૄгٸ༊̄ෛ඄д docking ૄг˯ࢬజᛖ д docking ૄг۞͞ёٸІઃ̮טଠ̄טଠ ѣͭෛ඄۞ঙજෛ඄Ą јࠎ՟ົܮІ࠹Т۞ᙷҾĂ֤ᆃι̮טFloatingDockSiteClass నؠࠎ׶ଠ ІĄࡶଋຐࢋரΝજၗटጡෛ඄Ăኛ૟̮ט఺࣎ଠٸ ᅮࢋயϠ፾ϲ۞ঙજ dock ૄгֽઃ̙ܮTWinControl ۞ࢉϠᙷҾĂ֤ᆃ Іࠎ̮טІĂ֭јࠎΞ dock ̄ෛ඄۞ͭෛ඄ĄࡶΞ dock ۞̄ෛ඄ଠ ̮טજၗயϠ఺࣎ᙷҾ۞ෛ඄ݭଠົܮฟॡĂٸд docking ૄг̝γజ І̮טІ۞ TWinControl ࢉϠᙷҾĄ༊ѩଠ̮טଠ̝ٸෛ඄ॡĂٙࢋઃ 3 నؠ׎ FloatingDockSiteClass পّĂΞ޽ؠдιྋੵ docking јࠎঙજ drag-and-dock જүĄ ؕୁֽڱ͞ BeginDrag ΨײІॡҋજୁؕĄ༊ DragMode ࠎ dmManualĂ̪൒Ξͽ̮טજଠ ٳdocking)જүົдֹϡ۰ͽ໣ဂฟؕ ٕٸٳ(ॲፂ DragKind ۞ࣃĂߏ Ѣٳ2 ૟ DragMode నࠎ dmAutomaticĄ༊ DragMode నࠎ dmAutomaticĂ ืͽ OnDragOverăOnEndDrag ׶ OnDragDrop ְІ၁үԆјĄ જүĂυٸٳؕୁົܮІ̮טѢྍଠٳDragKind ࠎ dkDrag(࿰నࣃ)ॡĂ າ۞ docking ૄгĂٕߏឰιјࠎঙજෛ඄Ą༊ז૟ιொົܮІ̮ טѢଠٳ1 ૟ DragKind পّనࠎ dkDockĄ༊ DragKind నࠎ dkDock ॡĂ ІĂኛଋĈ̮טෛ඄ଠ̄۞ٸІјࠎΞઃ̮טࡶ୬ֹଠ І̮טෛ඄ଠ̄۞ٸІјࠎΞઃ̮טឰଠ І۞̂̈Ą̮ט ІĂӎ݋ૄг۞̂̈ົజనࠎ 0Ăତ඾ιົࢦາአፋ̂̈ͽ௑Ъ̄ଠ̮ט ଠ̄۞ٸ୬ઃזιତќܧࠎ TrueĄ༊ AutoSize পّజనࠎ True ॡĂੵ Іॡ̖΍னĂኛଋ૟ AutoSize পّనۏٸІдઃۏࡶߏԓ୕ dock ૄг 2 І 7-7̮טֹϡଠ Control পّĄ ІĂΞͽֹϡ౅࿅ Source ણᇴ็ซ۞ TDragDockObject ۞̮טଠ̄פࢋх Іјࠎ̄ෛ඄Ąࡶ̮טଠצӀϡ఺ְІΞͽซҖЇңυࢋ۞ҜཉአፋĂͽତ ፆү۞ OnDragDrop ְІĄٸٳdocking ૄг̝˯Ą఺ְ࣎ІᙷҬд೼఼ ٺ ᛈ൴ົܮ ІॡĂOnDockDrop̮טΞ dock ۞̄ଠ˭ٸ˯І̮ט༊ֹϡ۰дଠ object; TDockDropEvent = procedure(Sender: TObject; Source: TDragDockObject; X, Y: Integer) of property OnDockDrop: TDockDropEvent; ֤ᆃ OnDockOver ಶ̙ົ൴ϠĄ Іజ OnGetSiteInfo ְІ఍ந඀Ԕ١඗(˵ధߏЯࠎι۞ݭҾ̙၆)Ă̮ט۞ଠ ĄࡶߏΞ dock˭ٸְІĄ౅࿅ιΞᖣϤనؠ Accept ણᇴĂ఼ֽۢ̄ෛ඄Ξజ ፆүॡ۞ OnDragOverٸٳdocking ૄг̝˯Ą఺ְ࣎ІᙷҬд೼఼ ٺ൴Ϡ ᛈົܮ ІॡĂOnDockOver̮טѢགྷ࿅ଠٳІ̮ט༊ֹϡ۰૟Ξ dock ۞̄ଠ State: TDragState; var Accept: Boolean) of object; TDockOverEvent = procedure(Sender: TObject; Source: TDragDockObject; X, Y: Integer; property OnDockOver: TDockOverEvent; ĄٸІ۞ઃ̮ט̈۞ docking ડાĂࡶ૟ CanDock నࠎ False ݋Ξ١඗̄ଠ ळᇾĂCanDock ົజనؠࠎ TrueĄଋΞͽԼត InfluenceRect ۞ࣃĂͽயϠՀ ࠎ docking ૄг۞Ꮘ၌̼ؕܐOnGetSiteInfo ְІ൴ϠॡĂInfluenceRect ົజ Ă֤ᆃѩૄώӈࠎ̄ෛ඄҂ᇋ docking ۞г͞Ą༊צІĂࡶତ̮טܑ۞̄ଠ DockClient ણᇴٙ΃ צdocking ૄг̝˯Ą఺ֹϡૄгΞՙؠߏӎࢋତ ٺ൴ І˯ॡĂOnGetSiteInfo ְІӈົᛈ̮טଠזѢΞ dock ۞̄ෛ඄ٳ༊ֹϡ۰ TRect; var CanDock: Boolean) of object; TGetSiteInfoEvent = procedure(Sender: TObject; DockClient: TControl; var InfluenceRect: property OnGetSiteInfo: TGetSiteInfoEvent; Ід dock ॡ۞͞ёĈ̮טଠ̄טВѣˬְ࣎ІΞឰ docking ૄгซ˘Վࢨ ᇾចࢱ̚)Ąז׀ІĂ݋ົЪ̮ טෛ඄ߏΩ˘࣎ page ଠ̄ڍІົ૟̄ෛ඄ dock ซˢາ۞ᇾចࢱ̰(т̮ט ᄃ඀ёనࢍ͘Ίܝ7-8 ˢ ͛фĄ۞פy ӁੵᏴ y ગ˭ăኑᄦă׶෭˯͛фĄ ٙѣ۞͛фĄפy Ᏼ ͛фĄפy Ᏼ ІĄۏ y ΐˢ Clipboard y дેҖॡഇΐˢଡજคĄ y నؠ͛ф၆ᆅ͞ёĄ ѣֱΑਕ˵ਕϡдበᏭ̮І˯Ą఺ֱ͹ᗟஉᄏĈ д˭ࢬ۞ౢ༼̚Ăྋᄲ˞тңд rich በᏭٕ౯ො̮Іΐˢధк̙Т۞ΑਕĄ І̰ྻϡ͛ф̮טдଠ ѢඕՁॡ൴ϠĄٳү۞ OnEndDrag ְІĂιົд ፆٸٳІĄOnEndDock ᙷҬۏѢٳІயϠҋҖనؠ۞̮טឰΞ dock ۞̄ଠ ፆү۞ OnStartDrag ְІĄ׶ OnStartDrag ᙷҬĂιٸٳOnStartDock ᙷҬ Ѣ֭ dock ۞࿅඀̚൴ϠĈٳІ̮טѣ׌ְ࣎ІົдΞ dock ۞̄ଠ જү۞͞ёٸٳІаᑕ̮טଠ̄טଠ ΞϤ઱᝝۞ DockClientCount পّᒔ଀Ą ᇴϫ݋͗މ۞ DockClients পّᒔ଀Ăѩপّࠎ TControl ۞৶͔ੱЕĄDock ѣϡĄ఺ีྤੈΞ౅࿅઱᝝۞ޝົ(݈ dock ۞׎΁̄ෛ඄(ࡶѣ۞ྖ ١඗ undockĄд၁ү OnUnDock ְІ఍ந඀ԔॡĂࡶਕۢ྽ϫ(ૄг(Sender ІĂ҃ Allow ણᇴΞឰ docking̮טClient ણᇴܑϯ˞ဘྏ undock ۞̄ଠ TUnDockEvent = procedure(Sender: TObject; Client: TControl; var Allow: Boolean) of object; property OnUnDock: TUnDockEvent; OnUnDock ְІ఍ந඀ԔซҖаᑕĂࠤҌΞ١඗ undockĈ ᗓॡĂΞдٳІజ̮טૄгົҋજឰ̄ෛ඄ undockĄDocking ૄгд̄ଠ Ѣ඾Ă҃ͷ DragMode পّనࠎ dmAutomatic ॡĂdockingٳІజ̮ט༊̄ଠ Іᗓฟ docking ૄг۞͞ё̮טଠ̄טଠ І 7-9̮טֹϡଠ ࡶଋຐдેҖॡഇΐˢଡજคĂኛֶ໰˭ЕՎូซҖĈ ĄטІΞਕಶᅮࢋͪπଡજคĂЯࠎ͛ф̙ົజበᏭጡ۞Πᙝቡٙࢨ дĄдୁજҋજೱҖॡĂ̮ІΪົᅮࢋݬۡଡજคĄࡶߏᙯౕҋજೱҖĂ̮ rich በᏭ׶౯ො̮ІΞͽΒӣͪπٕݬۡଡજคĂᅮࢋॡ˵Ξͽ׌۰ౌॡх дેҖॡഇΐˢଡજค ଋ˵Ξͽֹϡ HMargin পֽّአፋ౯ො̮І۞νΠᙝࠧĄ end; Alignment := taCenter; else if Center1.Checked then Alignment := taRightJustify else if Right1.Checked then Alignment := taLeftJustify if Left1.Checked then నؠ௑Ъ۞ Alignment }ޢ with Editor do { ൒ with Sender as TMenuItem do Checked := True; { ᑭߤజᕇ޷۞ีϫ } Center1.Checked := False; Right1.Checked := False; Left1.Checked := False; { ୻ੵٙѣ఺ˬ࣎ᑭ८ีϫ } begin procedure TEditForm.AlignClick(Sender: TObject); Center ΑਕܑᏴีĄ Character Αਕܑ۞ Right ׶ זԯ࠹Т۞ְІ఍ந඀ԔాඕޢܑีϫĂ൒ ּтĂ˭ࢬ۞඀ёቅົ૟ OnClick ְІ఍ந඀ԔాඕҌ Character|Left Αਕ ШΠ၆ᆅĄڱϡĄࡶߏᙯౕଫҋજೱҖ(WordWrap)Ăಶ՟ѣᏱ Alignment পّĄΪѣд WordWrap পّࠎ True ॡĂAlignment ̖ົயϠү д̚มĄࡶຐдበᏭ̮Іనؠ͛ф۞၆ᆅ͞ёĂኛଋనؠበᏭ̮І۞ νᙝٕΠᙝĂٕߏ၆ᆅזд rich በᏭٕ౯ො̮І̚Ăֹϡ۰Ξͽ૟͛ф၆ᆅ నؠ͛ф၆ᆅ͞ё y ఍ந OnPopup ְІĄ y ೩ֻᇅ΍ёΑਕܑĄ y ઃͤΑਕܑᏴี۞үϡĄ ᄃ඀ёనࢍ͘Ίܝ7-10 ˢ 1 Ᏼፄࢋֹϡ clipboard ۞඀ёಏ̮Ą ІĈۏ ࡶଋຐдᑕϡ඀ё̰ΐ˯ Clipboard ಏ̮̰Ą Clipbrd ඀ё ٺӘކІజۏ ĄTClipboardڱ͞۞(͛ф(׶׎΁ॾёĂΒӣဦͯ ྅੓ֽĂιΒӣ˞ซҖગ˭ăኑᄦă׶෭˯ދWindows Clipboard)۞Αਕග І૟ગ෭ᘨ(ּтۏ ΑਕĂΒ߁̙Тᑕϡ඀ё̝ม۞ᑫ९ĄTClipboard ͛ф۞۞פ̂ొЊ۞͛ф఍நᑕϡ඀ёĂౌ೩ֹֻϡ۰Ξд͛І̝มொજᏴ Іۏ ΐˢ Clipboard ҭ၆౯ො̮ІֽᄲĂࡶଡજคజฟୁĂಶ˘ؠົజពϯ΍ֽĄ Ξ૟ଡજคᔳᖟ੓ֽĄܮᄲĂࡶߏ͛фΞజཉˢ Rich በᏭ̮І۞ቑಛ̰Ăι Rich በᏭ׶౯ො̮Ідଡજค۞఍ந˯ൾ຋ѣֱ̙ТĄ၆ rich በᏭ͛Іֽ end; end; WordWrap1.Checked := WordWrap; { నؠ௑Ъ۞ΑਕܑᏴี } ScrollBars := ssBoth; { ̙ೱҖ݋׌࣎ଡજคౌࢋ } else ScrollBars := ssVertical { ೱҖΪᅮࢋݬۡଡજค } if WordWrap then WordWrap := not WordWrap; { ̷ೱೱҖ } begin with Editor do begin procedure TEditForm.WordWrap1Click(Sender: TObject); І఍ந඀ԔĄĈ ˭ࢗ۞඀ёቑּ̚Ă૟ Character|WordWrap ΑਕܑีϫాତҌ OnClick ְ ͽੵΝĄ 2 నؠ rich በᏭٕ౯ො̮І۞ ScrollBars পّĂͽ૟ଡજคΒӣซֽٕΐ Ąޘᆵ ೱҖĄΞਕ˵଀ᑭߤߏӎѣЇң͛фҖৌ۞෹࿅ rich በᏭٕ౯ො̮І۞ Ă఺ຍᏜ඾଀ᑭߤ rich በᏭٕ౯ො̮Іߏӎୁજҋજ˭ڶд̂ొЊ۞ଐ ՙؠ͛фߏӎົ෹࿅ΠᙝቡĄ 1 І 7-11̮טֹϡଠ PosReturn := Pos(FindDialog1.FindText,Memo1.Lines[I]); begin for!I := 0 to Memo1.Lines.Count do! PosReturn, SkipChars: Integer; begin I, J, var procedure!TForm1.FindDialog1Find(Sender: TObject); ĄפజᏴົܮனྍ͛ф۞г͞ FindText পّ̚۞͛фĄ࣐ࡶԱ඾˞Ă֤ᆃ Memo1 ΍ ٺವ၆ྖ͞๴̚޽ؠ ຩವ Memo ̮І̚ߏӎӣѣຩົܮᓝּֽᄲĂ˭ࢗ۞ OnFind ְІ఍ந඀Ԕ І̝͛фቤ኏ડ۞ୁؕҜཉ̮טበᏭଠٺSelStart фҚ࠹၆ ޘܜфҚ۞פSelLength ٙᏴ ͛ффҚ۞פSelText ̮І̰ٙᏴ পّ ೡࢗ ͛ф۞পّפܑ7.1 Ᏼ ͛ф۞পّĄפܑ 7.1 Еϯϡֽ఍நᏴ ЊಶົͅϨĄొ۞פ͛фĂٙᏴפ͛фĄ༊ֹϡ۰Ᏼ۞פᇾϯᏴ Ϩͅົޙ͛фĄበᏭ̮І̰פClipboard ̝݈ĂυืАᏴ זдଋਖ਼Їң͛ф ͛фפᏴ MDIFrame, Clipbrd; uses ఺ᇹĈ ּтĂдѣ̄ෛ඄۞ᑕϡ඀ё̚Ă඀ёಏ̮۞၁үొЊ۞ uses ̄ήΞਕົည uses Clipbrd; x ࡶߏᔘ՟ѣѣ uses ̄ήĂΐ˯˘Җ ClipbrdĄ ΐ˯ޢx ࡶߏд implementation ొЊ̏གྷѣ uses ̄ήĂдι۞౵ 3 д implementation ˭ࢬ۞ uses ̄ήΐˢ ClipbrdĄ ຩವ implementation ܲ঻фĄ 2 ᄃ඀ёనࢍ͘Ίܝ7-12 ˢ ĄڱCutToClipboardăCopyToClipboardăPasteFromClipboard ׶͞ ΨበᏭ̮І۞ײࡶຐࢋֹϡગ෭ᘨગ˭ăኑᄦă׶෭˯͛фĂኛ̶Ҿ дગ෭ᘨ˯ֹϡဦԛ۞ྤੈĄ)ٺତᅺĄ(д 12 ౢ̚ѣᙯ Ξͽ׶ગ෭ᘨ࠹ڱధк͞˞ޙІ۞በᏭ̮ІĂ̰̮ט྅˞ᇾ໤͛ф఍நଠދ Іගગ˭ăኑᄦă෭˯ů̙გߏдᑕϡ඀ё̰ొăٕߏд׎΁ᑕϡ඀ё̝̰Ą ۏֹϡ Clipbrd ඀ёಏ̮۞ᑕϡ඀ёĂΞͽ౅࿅ગ෭ᘨֽ૟͛фăဦԛă׶ ગ˭ăኑᄦă׶෭˯͛ф end; RichEdit ٙ̚ѣ۞͛ф } פ RichEdit1.SelectAll; { Ᏼ begin procedure TMainForm.SelectAll(Sender: TObject); ּтĂ Ąڱ͞ І۞ SelectAll ̮טΨ RichEdit1 ଠײІ۞ፋ̰࣎टĂኛ̮טrich በᏭٕ౯ොଠ פࡶຐࢋᏴ ͛фĄפજֽᏴٳ໣ဂ ѣϡĄд̂ొЊ۞׎΁ଐԛ˭Ăֹϡ۰ົϡ޷ᔣٕޝ࿅̮І۞Ξ֍ડાॡົ rich በᏭٕ౯ො̮І̚۞ٙѣ̰टĄ఺д̮І۞̰ट෹ פᏴົڱ͞ SelectAll ٙѣ۞͛фפᏴ end; end;! end; Break; Memo1.SelLength := Length(FindDialog1.FindText); Memo1.SelStart := SkipChars; Memo1.SetFocus; SkipChars := SkipChars + PosReturn - 1; SkipChars := SkipChars + (I*2); Skipchars := Skipchars + Length(Memo1.Lines[J]); pchars := 0; for!J := 0 to!I - 1 do! Ski begin if!PosReturn <> 0 then!{found!} І 7-13̮טֹϡଠ ϡߏֶፂગ෭ᘨ̚ߏӎхд͛ф҃ՙؠĄ CutăCopyă׶ Delete Αਕܑีϫనؠ EnabledĄPaste ׻΄۞࡭ਕٕઃͤү ͛фĂд Edit Αਕܑ۞۞פ۞ְІ఍ந඀ԔĄιົॲፂ RichEdit1 ߏӎѣᏴ д˭ࢬ۞඀ёቑּ̚Ăົ૟ܑ̄ॾ۞ΑਕЕϯ۞ Edit ีϫాඕ OnClick ְІ үϡĂኛ૟׎ Enabled পّనࠎ FalseĄ ۞ዋ༊ॡ፟Ăߏдֹϡ۰޷˭Αਕܑ౤ბ۞ีϫॡĄࡶຐઃͤΑਕܑีϫ۞ Αਕܑ۞ CutăCopyă׶ Delete ีϫౌᑕྍតјѷϨĄ၆ᙯౕߙีΑਕܑ ͛фĂEditפ׻΄ଂΑਕܑொੵĂּтĂдበᏭ఍நጡ̰Ăࡶߏϫ݈՟ѣᏴ ϡ̝Αਕܑ׻΄۞үϡĂҭߏ̙ົ૟఺ྻגϲڱ఼૱дᑕϡ඀ё̰ົઃͤ൑ ઃͤΑਕܑᏴี۞үϡ end; Editor.ClearSelection; begin procedure TEditForm.Delete(Sender: TObject); Edit Αਕܑѣ࣎ Delete ีϫĂଋ۞඀ёቅ࠻੓ֽΞਕಶົညߏ఺ᇹĈ ĄּтĂࡶߏдڱ͞ Ψ ClearSelectionײ͛фĂኛଋ۞פࢋӁੵበᏭ̮І˯Ᏼ ͛фĄࡶ۞פClipboard ˯ĂಶΞӁੵበᏭ̮І˯Ᏼ ז͛ф෭۞פͦᅮ૟Ᏼ ͛ф۞פӁੵᏴ end; Editor.PasteFromClipboard; begin procedure TEditForm.PasteFromClipboard(Sender: TObject); end; Editor.CopyToClipboard; begin procedure TEditForm.CopyToClipboard(Sender: TObject); end; Editor.CutToClipboard; begin procedure TEditForm.CutToClipboard(Sender: TObject); Edit|Paste ۞ OnClick ְІ˯Ĉ Edit|CutăEdit|Copy ׶ זтĂ˭ࢬ۞඀ёቅ̶Ҿ૟ְІ఍ந඀Ԕాඕּ ᄃ඀ёనࢍ͘Ίܝ7-14 ˢ ࡶຐࢋдܑॾΐˢᇅ΍ёΑਕܑĂኛଋĈ ІҋҖనؠΑਕܑĄ̮טᖬᄏଫܑॾ۞পّĂឰপؠ۞ଠ І˵ѣ PopupMenu পّĂଋΞ̮טౣࢋពϯࣹ࣎ᇅ΍ёΑਕܑĄ࣎Ҿ۞ଠ ܑॾ۞ PopupMenu পّ޽ؠ۞ߏĂ༊ֹϡ۰дܑॾ˯޷˭໣ဂΠᔣॡĂտ ۞Αਕܑีϫ˘ਠֽᄲĂ̏གྷౌѣଥशᔣ˞Ą ТְІ఍ந඀ԔĄଋ̙ᅮࢋആᇅ΍ёΑਕܑயϠΐిᔣٕଥशᔣĂЯࠎ၆ᑕ ׶ Paste በᏭ׻΄Ą఺ֱᇅ΍ёΑਕܑีϫΞͽֹϡ׶ Edit Αਕܑ၆ᑕ۞࠹ ּтĂд͛фበᏭጡᑕϡ඀ё̰ĂΞͽΐˢᇅ΍ёΑਕܑࢦኑ CutăCopyă ׻΄Ą۞ז ഴ͌ொજ໣ဂĂΪࢋдᑕϡ඀ё̍үડ޷˭໣ဂΠᔣಶΞֹϡ˘Қགྷ૱ົϡ ΑਕĄιࣇឰֹϡ۰ܮᇅ΍ё(ٕჍώгბ)Αਕܑߏٙѣᑕϡ඀ё૱֍۞͞ ೩ֻᇅ΍ёΑਕܑ ગ෭ᘨྻϡॡ۞ྤੈĄٺдௐ 12 ౢĂĶ఍நဦԛᄃкಫវ̚」೩ֻ˞Հкᙯ ݭၗࠎ৷͛фٕ HTML ͛фĄ ّኳĄଋΞͽֹϡᙷҬ text/plain ٕ text/html ̝ᙷ۞̄ݭၗֽ޽ؠ͛ф۞ Ăѩ͛фࠎ఼ϡ˭غڶĄд఺჌ଐڱ͞ ො д CLX ᑕϡ඀ё̚Ăኛֹϡ Provides ีϫ۞үϡĄ Ψ HasFormatĂΞͽۢ྽ગ෭ᘨߏӎѣЇң͛фĂ֭妥當۞࡭ਕٕઃͤ Paste ײࣃĄͽ CF_TEXT ણᇴڒІă͛фٕߙ჌ॾё۞ᇆည็аοۏ̰ߏӎхд Ğд CLX ᑕϡ඀ё̚۞ Providesğົॲፂдગ෭ᘨڱ͞ ગ෭ᘨ۞ HasFormat end; Delete1.Enabled := HasSelection; Copy1.Enabled := HasSelection; Cut1.Enabled := HasSelection; { ࡶ HasSelection ࠎ True ݋ୁજΑਕܑีϫ } ݋ࠎ True }פ HasSelection := Editor.SelLength > 0; { ࡶ͛фజᏴ Paste1.Enabled := Clipboard.HasFormat(CF_TEXT); { ୁજٕԺͤ Paste Αਕܑีϫ } begin Әᇶॡតᇴ }ކ } ; HasSelection: Boolean var procedure TEditForm.Edit1Click(Sender: TObject); І 7-15̮טֹϡଠ Copy2.Enabled := HasSelection;{ ΐˢ఺˘Җ } Copy1.Enabled := HasSelection; Cut2.Enabled := HasSelection;{ ΐˢ఺˘Җ } Cut1.Enabled := HasSelection; HasSelection := Editor.SelLength <> 0; Paste2.Enabled := Paste1.Enabled;{ ΐˢ఺˘Җ } Paste1.Enabled := Clipboard.HasFormat(CF_TEXT); begin HasSelection: Boolean; var procedure TEditForm.Edit1Click(Sender: TObject); дᇅ΍ёΑਕܑ۞Տ࣎ีϫౌѣ˘Җ඀ёቅΐซ EditEditClick ̚Ą ᇅ΍ёΑਕܑ̮І۞ OnPopup ְІĄזEditEditClick ְІ఍ந඀ԔĂߏాඕ 13ࢱ̝̚ĶઃͤΑਕܑีϫ۞үϡķೡᆷ۞-7ٺд˭ࢬ۞඀ёቅ̰Ă 3 дְІ఍ந඀Ԕ̰ᇤᆷ඀ёቅ࡭ਕăઃͤүϡăٕߏពϯΑਕܑีϫĄ ι۞ OnPopup ְІĄז2 ૟ְІ఍ந඀Ԕాඕ ᇅ΍ёΑਕܑ̮ІĄפ1 Ᏼ ࡶଋຐдពϯᇅ΍ёΑਕܑีϫ̝݈ΐͽአፋĂ ܑ̮І೩ֻ˞˘࣎Щࠎ OnPopup ۞ְІĄ ఺࣎ࣧЯĂᇅ΍ёΑਕٺΑਕܑ׻΄Ă଀дΑਕܑ̮Іώ̰֗఍நְІĄૄ ᇅ΍ёΑਕֽܑᄲĂι֭՟ѣ౤ბ۞ΑਕЕϯĂٙͽࢋ໤౯ᇅ΍ёٺҭߏ၆ ϫ۞ OnClick ְІĂಶညд7-13ࢱ۞ĶઃͤΑਕܑีϫ۞үϡķٙೡࢗ۞Ą ೼఼۞ΑਕܑĂΞͽ఍நΑਕܑ౤ბีٺٕઃͤ೼఼۞Αਕܑีϫ˘ᇹĄ၆ ଋΞਕົຐдពϯΑਕܑ̝݈ĂАአፋᇅ΍ёΑਕܑีϫĂಶညଋຐࢋ࡭ਕ ఍ந OnPopup ְІ ᇅ΍ёΑਕܑีϫ۞ OnClick ְІĄזёాඕב4 ૟఍ந Αਕܑ̮І۞ЩჍĄ І۞ PopupMenu পّనؠࠎ఺࣎ᇅ΍ё̮ט3 ૟ពϯΑਕܑ۞ܑॾٕଠ 2 ϡ Menu Designer ؠཌྷᇅ΍ёΑਕܑ۞ีϫĄ ཉᇅ΍ёΑਕܑ̮ІĄٸ˯дܑॾ 1 ᄃ඀ёనࢍ͘Ίܝ7-16 ˢ Іߏ̮טপّĄЕϯ͞๴׶ኑЪ͞஼ౌѣΨઇ Style ۞পّĄStyle ՙؠ˞ଠ ጾѣ۰ҋ൪ְІ̝݈నؠ׎זІ҃֏Ăଋಶ଀дତќ̮ט̙࿅Ă၆׎ι۞ଠ ĶOnCustomDrawķٕĶOnAdvancedCustomDrawķĄ Ą఺ְֱІּтۏІĂ҃ͦᅮనؠЇңְְז̚۞̙Тล߱྆ќ ពϯ̮Іăͽ̈́̍׍Еౌົдᘱᄦ࿅඀ېְІĄᓝּֽᄲĂညЕϯ̮Іăፘ ఺זІົҋજгତќ̮טΨĄߙֱଠײ඀ԔĂ༊ιᅮࢋజᘱᄦॡ̖Ξͽΐͽ Іᇆည۞யϠ೩ְֻІ఍ந̮טІ۞ᘱᄦ͞ёĂଋಶ଀ࠎଠ̮טࡶຐҋࢎଠ నؠጾѣ۰ҋ൪۞ࢲॾ 3 ൪΍ጾѣ۰ҋ൪۞ีϫĄ ІΐҌфҚҚЕĄۏ2 ૟ဦԛ 1 నؠጾѣ۰ҋ൪۞ࢲॾĄ ఺ֱՎូĈזІॡΒ߁̮ט˘ਠֽᄲĂдயϠጾѣ۰ҋ൪ଠ ĄٽटޝІಶۏีϫ˯Ă఺ᇹд൪΍Ч࣎ีϫॡࢋֹϡ఺ֱ Еϯ۞Տ࣎זІాඕۏߏфҚЕϯĂWindows ົͽ͛фពϯιࣇĄଋΞͽ૟ ІౌົΒӣีϫЕϯĄд࿰న۞ଐԛ˭Ă఺ֱЕϯ̮טٙѣ۞ጾѣ۰ҋ൪ଠ ϫΐ˯ဦԛķ˘༼Ą ϡጾѣ۰ҋ൪ആΑਕܑΐ˯ᇆည۞ྤੈĂણዦௐ 9 ౢ̚۞ĶആΑਕܑีٺᙯ ߏᗝγΐ˯)͛фĄٕ)ܧѣ۰ҋ൪౵೼఼۞ϡ౉ߏആЧ࣎ีϫ೩ֻဦԛĂ҃ І۞ጾѣ۰(˘ਠֽᄲĂߏܑॾ)дેҖॡഇ൪΍Տ࣎ีϫĄጾ̮ט҃ߏϤଠ ĂڱІ۞Տ࣎ีϫ൪΍͛ф۞̮͞ט̈́̍׍ЕඈĄι΃ܑ̙֭ߏϡᇾ໤ആଠ ពϯ̮ІăͽېၗЕăፘېІăЕϯ̮Іă̮טΑਕܑăᇾᗟ̮Іăࢱចଠ Іౌ̯ధଋҋࢎ̮ІజயϠ۞͞ёĄΒ߁˞Еϯ͞๴ăኑЪ͞஼ă̮טధкଠ Іΐ˯ဦԛ̮טගଠ end; Delete1.Enabled := HasSelection; І 7-17̮טֹϡଠ ဦԛĄ Іᑭෛጡ۞ Picture በᏭጡĂ૟Տ࣎ᇆည۞ Picture পّనࠎຐࢋ۞ۏ4 ϡ І۞ Visible পّనࠎ falseĄ̮ט3 ૟Տ࣎ᇆညଠ 2 నؠ Name পّĄ ІĄ̮ט1 д͹ܑॾΐ˯ᇆညଠ І۞ဦԛĂಶညߏĈ̮טІ̚ᐼхጾѣ۰ҋ൪ଠ̮ט ֽᐼхᑕϡ඀ё̰૟ົֹϡ۞ᔳᖟᇆညĄᓝּֽᄲĂଋΞͽдᔳᖟ۞ᇆညଠ І̮טІдܑॾ˯ពϯဦԛᇆညĄଋ˵Ξͽֹϡᇆညଠ̮טኛଋֹϡᇆညଠ ІĂιΒӣ˞ဦԛᇆည(ּт bitmap)Ą̮טෛᛇ̼۞ଠܧІߏ̮࣎טᇆညଠ ૟ᇆညΐҌᑕϡ඀ё̚ фҚҚЕ۞ϒቁҜཉ˯Ąז໰˭ࢬೀ༼ٙࢗĂ૟఺ֱᇆညኑᄦ ޢຐ఺ᆃઇĂಶ଀дᑕϡ඀ё̚ΐ˯ဦԛᇆညĂ൒ڍពϯჃჄ፟۞ᙷݭĄт дჃჄ፟фϓ̝γܮּтĂдᑫ९გநᑕϡ඀ё̰ĂΞਕົࢋΐ˯ဦԛĂͽ ІҚЕĄۏٸՏ࣎фҚҚЕੵ˞ᐼхιҋ࣎׊۞фҚҚЕ̝γĂϺਕх ІΐҌфҚҚЕۏ૟ဦԛ csOwnerDrawVariable lbOwnerDrawVariable, ྤफ़ՙؠ дેҖॡഇϤޘĂ੼ޘVariable Տ࣎ีϫѣ̙Т੼ csOwnerDrawFixed lbOwnerDrawFixed, ّՙؠ ϤItemHeightপޘᇹĂ੼˘ޘFixed Տ࣎ีϫ੼ ጾѣ۰ҋ൪ ຍཌྷ ּ̄ ܑ7.2 Fixed׶variable۞ጾѣ۰ҋ൪ࢲॾ І̝݈ಶՙؠ˞Ą̮ט̈˵ధົតĂҭՏ࣎ีϫ۞̂̈ߏд൪΍ଠ І˘ؠߏ׽ؠ۞(fixed)Ĉᔵ൒Տ࣎ҖЕ۞̮̂טܑ 7.2 ٙೡࢗ۞Ą׎΁۞ଠ Еϯ͞๴׶ኑЪ͞஼׍ѣᗝγ۞ጾѣ۰ҋ൪ࢲॾĂΨઇ fixed ׶ variableĂт DefaultDrawing ۞পّ࡭ਕٕઃͤ࿰నᘱ൪۞үϡĄ ӎֹϡ࿰న۞ᘱ൪(ΨઇĶᇾ໤ķࢲॾ)ٕߏጾѣ۰ҋ൪Ą͞ॾ̮ІֹϡΨઇ ᄃ඀ёనࢍ͘Ίܝ7-18 ˢ 1 ֶᅮࢋᄃӎĂአፋЧ࣎ีϫ۞̂̈Ą ซҖ˭ЕՎូĄኛֹϡಏ˘ְІ఍ந඀Ԕֽ఍நٙѣ۞ีϫĄ І۞Տ࣎ΞෛีϫĂ̮טІ۞ีϫĂኛଋ੫၆ଠ̮טࡶࢋ൪΍ጾѣ۰ҋ൪ଠ ΍Ч࣎ีϫĄ І˯Տ࣎Ξෛีϫ۞ְІĄଋ۞ᑕϡ඀ё଀ҋҖ఍ந఺ְֱІͽ൪̮טϠଠ ІĄ࠹ͅ۞Ăүຽր௚ົய̮טᘱဦ఍ந඀Ԕůౌ̙ົдᏈ၌˯൪΍఺࣎ଠ І۞ࢲॾనࠎጾѣ۰ҋ൪ů̙ኢߏ౅࿅నؠপّٕ೩ֻҋࢎ۞̮ט༊ଋ૟ଠ ൪΍ጾѣ۰ҋ൪۞ีϫ end; end; DriveTabSet.TabIndex := AddedIndex; { ֤ᆃឰιјࠎϫ݈۞ᇾច } if UpCase(Drive) = UpCase(DirectoryOutline.Drive) then { ϫ݈۞ჃჄ፟? } end; AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Network.Picture.Graphic); DRIVE_REMOTE: { ΐ˯˘࣎ᇾច } AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Fixed.Picture.Graphic); DRIVE_FIXED: { ΐ˯˘࣎ᇾច } AddedIndex := DriveTabSet.Tabs.AddObject(Drive, Floppy.Picture.Graphic); DRIVE_REMOVABLE: { ΐ˯˘࣎ᇾច } case GetDriveType(Drive + ':/') of {ϒࣃ΃ܑϒቁ۞ჃჄ፟ } begin for Drive := 'A' to 'Z' do { ֶԔ఍நٙѣΞਕ۞ჃჄ፟ } begin AddedIndex: Integer; Drive: Char; var procedure TFMForm.FormCreate(Sender: TObject); ְІ఍ந඀Ԕົညߏ఺ᇹ̄Ĉ ొЊĂੵ˞Տ࣎ϒቁჃჄ፟۞фϓ̝γĂιᔘົΐ˯ពϯჃჄ፟ᙷݭ۞ဦԛĄ тң૟ᇆညΐˢфҚҚЕĄ఺ߏᑫ९გந඀ё۞˘˞ځд˭ࢬ۞ּ̄̚Ăᄲ І׶фҚߏͧྵр۞͞ёĄۏٙᅮ۞ྤफ़ਕТॡ౯ԁĂТॡΐˢڍ Іΐˢனх۞фҚ˯ĄтۏІĂٕߏ૟ۏ˯ĄΞͽдΐˢфҚ۞Тॡ˵ΐˢ фҚҚЕ۞фҚזΞͽ૟ιࣇాඕܮᑕϡ඀ёֹ̚ϡဦԛᇆညॡĂٺ˘όΞ ૟ᇆညΐҌфҚҚЕ̚ జ࠻֍۞ĄڱІߏ൑̮טдଋેҖ఺ᑕϡ඀ёॡĂ఺ֱᇆညଠ І 7-19̮טֹϡଠ ͽЯᑕ׶ι࠹ా۞ဦԛĈޘᆧΐՏ࣎Еϯีϫ۞੼ І۞ OnMeasureItem ְІ˯Ăιົ̮טጾѣ۰ҋ൪ଠז˭ࢬ۞඀ёቅົాඕ ൪΍̝݈ͽ ColWidths ׶ RowHeights পّనؠĄ ֹϡጾѣ۰ҋ൪͞ॾॡĂᘱᄦॡ̙ਕԼតॾ̄۞̂̈ĄՏ࣎ҖЕ۞̂̈ߏд ĄޘІ۞ᆵ̮טؠߏଠ˘ޘĄีϫ۞ᆵޘ ϫ઱˘ΞͽԼត۞ߏีϫ۞੼ีٺдЕϯ͞๴׶ኑЪ͞஼̚Ăᑕϡ඀ёᙯ నࠎ 5 ࣎ည৵Ăௐ˟࣎ีϫ݋ଂ౵˯ࢬზ੓۞ௐ̱࣎ည৵ฟؕĂዶѩᙷଯĄ ޘּтĂдតજ۞ጾѣ۰ҋ൪Еϯ͞๴̚Ăࡶߏᑕϡ඀ё૟ௐ˘࣎ีϫ۞੼ ፂ݈ࢬีϫ۞̂̈አፋĄ ߏΞតજ۞Ĉᑕϡ඀ёΞͽឰι̂˘ֱٕߏ̈˘ᕇĄତ˭ֽ۞ีϫҜཉ݋ॲ አፋ̂̈۞ְІѣ׌࣎ࢦࢋ۞ણᇴĈีϫ۞৶ཱི͔ቅ׶ีϫ۞̂̈Ą׎̂̈ measure-item ְІĄ ̙ٙТĄЕϯ͞๴׶ኑЪ͞๴ֹϡ۞ߏ OnMeasureItemĄ͞ॾ݋՟ѣ І۞̙ТĂְІ۞ЩჍົѣ̮טІ۞ measure-item ְІ˯Ąॲፂଠ̮טଠ ጾѣ۰ҋ൪זଋԼតጾѣ۰ҋ൪ีϫ۞̂̈Ăኛଋ૟ְІ఍ந඀Ԕాඕڍт ԛአፋࠎͧ఺׌۰ൾ̂˘ֱĄ͞ܜјဦԛ۞̂̈Ąࡶߏࢋѣဦԛ׶͛фĂ݋૟ ԛԼ͞ܜΞ૟఺ܮ΃ีϫ۞͛фĂפԛ̂̈ĄᓝּֽᄲĂࡶߏࢋϡဦԛ͞ܜ ͛фൾ̂˘ֱ)Ąଋ۞ᑕϡ඀ёΞͽ఍ந఺ְ࣎ІĂ֭Լត Delphi ٙᏴፄ۞ Delphi ົՙؠีϫ۞̂̈(˘ਠֽᄲĂιΪົͧͽϫ݈۞фݭពϯ఺ีϫ۞ І۞̦ᆃг͞Ą̮טϯдଠ measure-item ۞ְІĄmeasure-item ְІӘ෦ᑕϡ඀ёĂ఺࣎ีϫ૟ࢋព І൪΍Տ࣎ีϫ̝݈Ăүຽր௚ົயϠ̮טдឰᑕϡ඀ёആጾѣ۰ҋ൪ଠ አፋጾѣ۰ҋ൪ีϫ۞̂̈ 2 ൪΍ีϫĄ አፋ̂̈Ą ࠹Т̂̈۞ีϫ(ּтĂѣ lsOwnerDrawFixed ࢲॾ۞Еϯ͞๴)݋̙ᅮࢋ ᄃ඀ёనࢍ͘Ίܝ7-20 ˢ var R: TRect; Index: Integer; Selected: Boolean); procedure TFMForm.DriveTabSetDrawTab(Sender: TObject; TabCanvas: TCanvas; OnDrawItem ְІ˯Ĉ Еϯ͞๴۞זbitmaps)̚۞Տ࣎ีϫĄ఺࣎඀ёົ૟ѩְІ఍ந඀Ԕాඕ ּтĂ˭ࢬ۞඀ёቅϯቑ˞тң൪΍Её͞๴(׎̚ӣѣᙯᓑҌՏ࣎фҚ۞ ёд఍நՏְ࣎ІॡĂᑕྍֶගؠ۞ડા̂̈൪΍ዋ༊۞ีϫĄ ၗ۞ྤੈ(ညߏ఺ีϫߏӎጾѣᏮˢ൏ᕇ̝ᙷ۞)Ąᑕϡ඀ېϫีٺ૱ᔘѣᙯ Draw-item ְІ̰ӣ۞ણᇴ޽΍˞୬൪ีϫ۞৶͔ă୬ᘱᄦ۞ડા̂̈Ă఼ y OnAdvancedDrawĂּт OnAdvancedDrawItem y OnCustomDrawĂּт OnCustomDrawItem y OnDrawĂּт OnDrawItem ٕ OnDrawCell ጾѣ۰ҋ൪۞ְІЩჍ࠰ͽ˭ࢗ׎̝̚˘ࠎфࢵĈ І۞ draw-item ְІ˯Ą̮ט ఺࣎ଠזІ۞Տ࣎ีϫĂ଀૟ְІ఍ந඀Ԕాඕ̮טࡶࢋ൪΍ጾѣ۰ҋ൪ଠ ᘱᄦְІĄזќ І۞̙ТĂ఺ֱีϫΞਕ˵ົ̮טՏ࣎ΞෛีϫயϠ draw-item ְІĄֶଠ І۞̮טІĂүຽր௚ົആଠ̮ט༊ᑕϡ඀ёᅮࢋ൪΍ٕࢦ൪ᄃѣ۰ҋ൪ଠ ൪΍Տ࣎ጾѣ۰ҋ൪۞ีϫ ϫ۞ৌϒݭҾ˯ĄีזᖼೱݭҾаטࢋ૟ιࣇૻ ІॡĂᅮۏІݭҾĄдଋଂੱЕԹ΍ۏЇң۞ٸݭҾ۞পّĂٙͽιਕૉх ᖼೱݭҾĄObjects ߏ TObjectטො ଋυื૟ีϫଂфҚҚЕ۞ Objects পّүૻ end; Inc(TabWidth, 2 + BitmapWidth); { ޘΐ˟ᆧΐᇾចᆵޘ { ͽ࠹ా۞ဦԛᆵ BitmapWidth := TBitmap(DriveTabSet.Tabs.Objects[Index]).Width; begin BitmapWidth: Integer; var ຍ TabWidth ߏ࣎ var ણᇴ }ڦ } ;( var TabWidth: Integer procedure TFMForm.DriveTabSetMeasureTab(Sender: TObject; Index: Integer; І 7-21̮טֹϡଠ end; end; R.Top + 2, DriveTabSet.Tabs[Index]); { ૟ι൪дဦԛνᙝ } ཉ͛ф }ٸ } , TextOut(R.Left + 2 + Bitmap.Width Draw(R.Left, R.Top + 4, Bitmap); { ൪΍ဦԛ } begin with TabCanvas do Bitmap := TBitmap(DriveTabSet.Tabs.Objects[Index]); begin Bitmap: TBitmap; 7-22 ˢܝᄃ඀ёనࢍ͘Ί ёऱ 8-1בฟ൴ᑕϡ඀ёă̮Іᄃ ᑕϡ඀ёົజበᛌјΞۡତેҖ۞ેҖ඀ёĄ ચĞWindows ServiceğĂ఺ೀ჌ڇĞServiceğᑕϡ඀ёેҖॡಶည˘࣎ෛ඄ ચڇέĞConsoleğᑕϡ඀ёેҖ۞ॡ࣏ົѣ˘࣎׻΄ЕᏮˢ۞ෛ඄Ąטଠ ϡ۞ֹϡ۰̬ࢬĂٽဦԛֹϡ۰̬ࢬ(GUI)ᑕϡ඀ёĂ˘ਠֽᄲĂౌົѣᖎಏ ёऱĞDLLğבy इІĞPackagesğᄃજၗాඕ ચĞServiceğᑕϡ඀ёĞΪѣෛ඄ᑕϡ඀ё̖ѣğڇ y έ(console)۞ᑕϡ඀ёטy ଠ y ဦԛֹϡ۰̬ࢬ(GUI)۞ᑕϡ඀ё ϲ۞ᑕϡ඀ё̚Ă౵૱֍۞Β߁˭Еೀ჌Ĉޙдଋٙົనࢍă ϲޙᑕϡ඀ё۞ ёऱĄבϲᑕϡ඀ёă̮Іᄃޙтңځдώౢ̚Ăᖎࢋгࠎଋᄲ ёऱבᄃ ฟ൴ᑕϡ඀ёă̮І ᄃ඀ёనࢍ͘Ίܝ8-2 ˢ 1 Ᏼፄ File|New|Other ͽ૲΍ New Items ၆ྖ஼Ą ϲ˘࣎າ۞ SDI ᑕϡ඀ёĂኛଋޙ୬ SDI ᑕϡ඀ё ϡ඀ёֹϡ۰̬ࢬ۞ฟ൴ķĄ ᑕϡ඀ёдUI ฟ൴˯۞჌჌ણ҂ྤੈĂኛણዦௐ9 ౢĂĶᑕٺ଀Հкᙯפࡶຐ ෛ඄Ą఺дྏზܑٕߏ͛ф఍நր௚ඈᑕϡ඀ё̚ߏȈ̶૱֍۞Ą үĄдଳϡ MDI ۞ᑕϡ඀ё̚Ăಏ˘ͭෛ඄Ξͽฟୁ˘࣎ͽ˯۞͛Іٕ̄ Їңܑॾ(form)࠰Ξଳϡкࢦ͛І̬ࢬ(MDI)Ժٕߏಏ˘͛І̬ࢬ(SDI)ֽ၁ ֹϡ۰̬ࢬሀё Ąט९Ᏼีֽΐͽଠ ᑕϡ඀ёдેҖॡഇ۞ҖࠎĂ˵ౌΞͽдፋЪฟ൴ᒖဩ(IDE)̚ĂᖣϤనؠ૞ ૞९дనࢍॡഇ۞჌჌ҖࠎĂͽ̈́ٺੵ˞ᑕϡ඀ё۞၁үሀё̝γĂٙѣᙯ y кࢦ͛І̬ࢬ(multiple document interfaceĂMDI) y ಏ˘͛І̬ࢬ(single document interfaceĂSDI) ፋЪฟ൴ᒖဩ̚ĂВ೩ֻ׌჌ᑕϡ඀ё۞ֹϡ۰̬ࢬĞUIğሀёĈ ۞ΑਕĄ Ψ DLLăइІ(package)ă̈́׎ι͚೯ᑫĂᖣѩᕖ·ᑕϡ඀ёײଂેҖᑫ̚ ΑਕĂ҃ͷͧྵᖎಏ۞඀ё఼૱˵ౌΪѣ˘࣎ΞેҖᑫĄ̙࿅ĂଋΞͽ౅࿅ யϠ˘࣎ΞેҖ۞ᑫ९Ą఺࣎ΞેҖᑫ఼૱ࠎଋ۞඀ё೩ֻ˞౵ૄώ۞ົܮ Ăޢፆү۞ᑕϡ඀ёĄ༊ଋԆј˘࣎૞९۞በᛌજү̝ٽ̬ࢬĂឰֹϡ۰ट ဦԛֹϡ۰̬ࢬĞGUIğᑕϡ඀ёߏΒӣтෛ඄ăΑਕܑă၆ྖ஼ඈ۞ဦԛ ဦԛֹϡ۰̬ࢬᑕϡ඀ё ˘༼Ą ёऱķבϲइЇ́જၗాඕޙତజેҖĄኛଋણ҂д8-12ࢱ۞Ķۡڱ֭՟ѣᏱ ёऱĄ఺ֱᑕϡ඀ёבଋ˵ΞͽயϠ׎ι჌ᙷ۞૞९ĂᛊтइІᄃજၗాඕ ёऱ 8-3בฟ൴ᑕϡ඀ёă̮Іᄃ ϲ MDI ܑ̄ॾĂ֭ͷ૟׎ FormStyle পّనࠎ fsMDIChildĄޙ 3 ѣ CascadeăTileăͽ̈́ Arrange All ඈีϫ۞ WindowĄ ϲΑਕܑĂֹΑਕܑ̚ӣѣ File|OpenăFile|Saveăͽ̈́ӣޙ2 ࠎ͹ෛ඄ ϲ͹ෛ඄ܑॾٕ MDI ͭෛ඄Ą૟׎ FormStyle পّనࠎ fsMDIFormĄޙ 1 ϲາ۞ MDI ᑕϡ඀ёĂኛଋĈޙ˭ڶࡶࢋд̙જϡჟី۞ଐ MDI ͹ܑॾ̝˯Ą ٺజཉົܮజ౵̼̈ॡĂ׎ဦϯ ֱညߏ Cascade ͽ̈́ Tile ඈ჌჌̙Тăϡͽᑭෛк࣎ෛ඄۞ีϫĄ༊̄ෛ඄ MDI ᑕϡ඀ё۞͹Αਕܑ˯఼૱ົΒӣ Window ᇅ΍ّᏴಏĂ҃ͷӣѣ˘ ҃ˬгࢦາనؠՏܑ࣎̄ॾ۞পّࣃĄ Ϡ(derive)΍ٙѣ۞ܑ̄ॾߏ࣎ͧྵр۞͞ёĄ఺ΞͽᔖҺଋυื˘҃ГĂГ ߏ͹ܑॾ(fsMDIForm)Ąࠎଋٙѣ۞ܑ̄ॾؠཌྷ࣎ૄᖂᙷҾ(base class) Гࢉ І۞ FormStyle পّࣃĂΞͽ޽ؠܑॾࠎ˘ܑ̄ॾ(fsMDIChild)Ժٕۏ TForm (client window)̚ொજĒ˵ಶߏᄲ͹ෛ඄ົΒҝٙѣ۞̄ෛ඄Ą౅࿅నؠ ᛳෛ඄ܢൾ຋ኑᗔֱĄMDI ᑕϡ඀ёٙயϠ΍ֽ۞̄ෛ඄ĂΪਕдܮࢍ੓ֽ SDI ᑕϡ඀ёĂన ٺдฟ൴ MDI ᑕϡ඀ёॡĂᅮࢋྵк۞ఢ൪ĂЯѩ࠹ྵ 3 ޷˭ OKĄ 2 ᕇᑝ Projects ࢱѨĂ֭Ᏼፄ MDI ApplicationĄ 1 Ᏼፄ File|New|Other ͽ૲΍ New Items ၆ྖ஼Ą MDI ᑕϡ඀ё ٙͽ IDE ࿰నٙѣາயϠ۞ᑕϡ඀ё࠰ࠎ SDI ᑕϡ඀ёĄ ІĂ׎ FormStyle পّ࠰జనࠎ fsNormalĄۏ Form ۞ޙд࿰న۞ଐԛ˭Ăଋٙ 3 ޷˭ OKĄ ಏᑝ Projects ࢱѨĂ֭Ᏼፄ SDI ApplicationĄ 2 ᄃ඀ёనࢍ͘Ίܝ8-4 ˢ ࢗĄ ЩĂд description ఍Ꮾˢᖎൺ۞ೡפۍ4 д Shortcut name ആଋ۞າᇹ 3 д Code templates ྆ࢬ޷˭ Add ޷ตĄ 2 ᕇᑝ Code Insight ࢱѨĄ 1 Ᏼፄ! Tools | Editor OptionsĄ Վូт˭Ĉ۞ۍΐซΝĄΐˢ˘࣎ᇹۍĄଋ˵Ξͽ૟ଋҋ̎۞ᇹۍࢋ۞ᇹ ᏴፄଋޢĂኛ޷˭ Ctrl-j ൒ۍଋຐࢋд඀ёቅበᏭጡ྆ΐˢ˘௡඀ёቅᇹڍт end; begin for := to do Ĉۍд඀ёֹ̚ϡ for ਫ਼઻ĂଋΞͽд඀ёቅ̚ΐˢт˭۞ᇹ ଋຐࢋڍĄᓝּֽᄲĂтۍଋ˵Ξͽ૟ଋ૱ϡ۞඀ёቅඕၹᆷјଋҋ̎۞ᇹ ёĞfunctionğăͽ̈́ధк۞ࢗήĄב ĂּтੱЕĞarrayğăᙷҾĞclassğăۍΐҕ୹҇ĄଋΞֹϡᇾ໤۞඀ёቅᇹ д఺੻ߛ˯ޢ඀ёቅ྆۞੻ߛĂ൒זĂౌߏઇࠎజΐ˭ڶдкᇴଐۍ඀ёᇹ ۍ඀ёᇹ ͛ІĄځՀซ˘Վ۞ྤੈĂኛଋણ҂ቢ˯ᄲٺᙯ ؠ۞ᏴีనؠࣃĄ ϲ۞૞९࠰ົֹϡϫ݈ٙనޙ֎఍۞ Default ߤ८͞๴Ąтѩ˘ֽĂٙѣາ дෛ඄౵Π˭פ९̝˯Ăኛд Project Options ၆ྖ஼̚నؠᏴีࣃĂ֭ͷ८ ࡶຐԼតߙֱ࿰న۞ᏴีĂ֭ͷֹ଀఺ֱనؠ۞Լតਕૉ߉̈́૟ֽٙѣ۞૞ నؠ࿰నᏴี ؠЧ჌̙Т۞ᏴีĂኛᏴፄ Project|OptionsĄ ຐࠎଋ۞૞९నڍĄтטഇҖࠎĂ࠰Ξ౅࿅నؠ IDE ̚۞૞९Ᏼีֽΐͽଠ ੵ˞ଋᑕϡ඀ё۞၁үሀݭĂଋ૞९۞నࢍॡഇҖࠎͽ̈́ᑕϡ඀ё۞ેҖॡ నؠፋЪฟ൴ᒖဩă૞९ăͽ̈́በᛌጡᏴี ёऱ 8-5בฟ൴ᑕϡ඀ёă̮Іᄃ ચᑕϡ඀ё۞ּ̄ĄڇጡౌߏڇੈĄWebăFTP ٕߏ࿪̄ฎІҨ ͗ბᑕϡ඀ёĄιࣇ఼૱ߏдࡦഀેҖĂ҃ͷ̙ᅮࢋ͉кֹϡ۰ٙᏮˢ۞ྤ ચᑕϡ඀ёଂϡ͗ბᑕϡ඀ёᒔ଀ኛՐĂ఍ந఺ֱኛՐĂ֭૟ྤੈ็аϡڇ ચᑕϡ඀ёڇ ;end iteLn('exception occured'); end; Wr except raise exception.create('hi'); try begin SysUtils; uses {$APPTYPE CONSOLE} program!Project1; ଋ۞ᑕϡ඀ёᑕྍΒӣ˭ࢗ඀ёቅٙ̚ϯቑ۞ள૱఍ந඀ԔĈ ពϯ˘ܑ࣎ϯள૱ྤੈ۞၆ྖ͞๴ĄᓝּֽᄲĂົܮᅫĂWindows үຽր௚ έᑕϡ඀ёᑕྍቁܲଂ඀ё̙̚ົϴ΍Їңள૱Ąӎ݋Ă༊඀ё௣˞̝טଠ (code editor)Ą ϲ૞९ᑫĂ֭ͷពϯ΍඀ёቅበᏭጡޙࠎѩ჌ݭၗ۞ࣧؕቅĂົܮIDE ତ඾ Items ၆ྖ஼̚Ᏼፄ Console ApplicationĄ έᑕϡ඀ёĂኛᏴፄ File|New|OtherĂ֭ ͷ д Newטϲ˘࣎າ۞ଠޙຐڍт ѣࢨĄ ΞྻүĄ఺ᙷᑕϡ඀ё఼૱̙ᅮࢋֹϡ۰Ꮾˢ͉кྤੈĂ҃ͷેҖ۞Αਕܮ έĞconsoleğᑕϡ඀ё࠰ࠎ 32 Ҝ̮඀ёĂ҃ͷֶ̙ያဦԛ̼ፆү̬ࢬטଠ έᑕϡ඀ёטଠ 6 ޷˭ OKĄ Ąۍд Code ͛ф͞๴̚ᆷ˭ଋࢋາᆧ۞඀ёቅᇹ 5 ᄃ඀ёనࢍ͘Ίܝ8-6 ˢ weblogxxx.log ۞ᑫ९Ą ෹࿅ॡมĂҭߏд C:\TEMP ϫᐂ˭ᑕྍົѣ࣎Ψઇົޢᜓጡ౵ Ĉฟୁώгბ፟ጡ۞ Web ᕱᜓጡĂд URL ҜӬᏮˢ localhostĄᕱڍ៍࠻ඕ ၗ)Ą ېચߏдઃͤڇጡĂಶυืቁؠι՟ѣдႾ᝘ѩ఼ੈૂ(˵ಶ఺ڇѣ Web Ҩ ଋڍ۞ xxx ߏ ThreadID)ĄՏ࣎ૂᑕྍౌΪѣ˘࣎ Server дႾ᝘඾ĂЯѩт ۞࿰నૂĄώቑּົд C:\TEMP ϫᐂயϠ WebLogxxx.log ۞͛фᑫ(׎̚ ચ۞࿰నૂĂ˵ߏ Web Server аᑕ Web BrowserڇϡֽШ Web Server ኛՐ ચ۞ቑּѣ࣎ TServerSocketĂ఼ੈૂĞportğనࠎ 80Ą఺ ߏ Web Browserڇቑּ ఺ (˘ᇹΞͽֹϡ/SILENT Ᏼี)Ą ચĂኛд׻΄Е˭ΐͽેҖ֭ΐ˯/UNINSTALL ણᇴڇࡶࢋྋੵ̏щ྅۞ /SILENT Ᏼีಶ̙ົ΍ன఺ቁᄮੈिĄ ΍னቁᄮੈिĄΐ˯ົܮચщ྅јΑڇڍચ֭ඕՁેҖĂтڇщ྅׎ ચĂኛдેҖιॡΐ˯/INSTALL ણᇴĄᑕϡ඀ёົڇࡶࢋщ྅ᑕϡ඀ё۞ ચĄڇՐග SCM ֽୁજଋ۞ ચĄ׎΁ᑕϡ඀ё˵ΞͽᖣϤ็ਖ਼ኛڇControl ManagerĂSCM)ֽщ྅ გநࣶ(ServiceטચଠڇΞͽ౅࿅ܮĂଋޢચᑕϡ඀ёڇϲрޙ4 д ΨĄײёב ચซҖዋ༊۞ Windowsڇ఺඀ё̙ົயϠυࢋ۞ְІٕആ఺ ІĂҭۏ Ҿ۞ᑕϡ඀ёॡĂᔵ൒Ξͽΐˢ TServiceזᑕϡ඀ё྆Ăдΐ ચڇזચΪਕజΐڇચĄڇચᑕϡ඀ёΐˢᗝγ۞ڇServiceĂֽࠎଋ۞ פ3 ଋΞͽᏴፄ File|New|OtherĂତ඾д New Items ၆ྖ͞๴̚Ᏼ ચĄڇ˘ؠ׎পّ׶ְІ఍ந඀Ԕͽ၁үѩ Іᑭෛጡనۏચ(TService)۞ෛ඄Ąኛдڇ΍ன˘࣎၆ᑕҌົܮ2 ତ˭ֽĂ БાតᇴĂ׎ݭၗࠎ TServiceApplicationĄ дଋ۞૞९̰ΐˢ˘࣎Щࠎ Application ۞ົܮApplicationĄтѩ˘ֽĂ Service פFile|New|OtherĂ֭ଂ New Items ၆ྖ͞๴̚Ᏼ פ1 Ᏼ ચ۞ᑕϡ඀ёĂኛଋĈڇ ࡶଋຐࢋ၁ү Win32 ёऱ 8-7בฟ൴ᑕϡ඀ёă̮Іᄃ Mem(Buffer); end; Free finally Stream.Write(Buffer^, StrLen(Buffer)); Socket.ReceiveBuf(Buffer^, Socket.ReceiveLength); Buffer := AllocMem(Socket.ReceiveLength); try while Socket.ReceiveLength > 0 do begin Buffer := nil; er: PChar; begin Buff cket: TCustomWinSocket); var So procedure TService1.ServerSocket1ClientRead(Sender: TObject; OnClientRead ְІᗕᑝ໣ဂᔣĂ֭ΐˢͽ˭ְІ఍ந඀ԔĈ Іᑭෛጡ۞ۏٺ4 ତ඾ĂᏴፄଋдՎូ 1 ٙ̚ΐˢ۞̮І ServerSocket1Ą Service1: TService1; var end; { Public declarations } function GetServiceController: PServiceController; override; public Stream: TMemoryStream;//ΐˢ఺Җ඀ёቅ { Private declarations } private procedure Service1Execute(Sender: TService); Socket: TCustomWinSocket); procedure ServerSocket1ClientRead(Sender: TObject; ServerSocket1: TServerSocket; TService1 = class(TService) type ScktComp; Windows, Messages, SysUtils, Classes, Graphics, Controls, SvcMgr, Dialogs, uses interface ଋಏ̮۞ interface ߱རனдᑕт˭Ĉ 3 ତ඾Ăΐˢݭၗࠎ TMemoryStream ۞ռѣྤफ़јࣶҌ TService1 ᙷҾĄ (Service1)Ą ચෛ඄ڇServerSocket ̮І֭ΐҌ פInternet ࢱѨĂᏴ ۞ۍ2 ኛд̮Іሀ Service ApplicationĄົѣ࣎ЩΨ Service1 ۞ෛ඄΍னĄ ࡶࢋயϠቑּĂኛᏴፄ File|New|Other ֭ଂ New Items ၆ྖ͞๴Ᏼፄ 1 ᄃ඀ёనࢍ͘Ίܝ8-8 ˢ ଂܧߏĂ၆Տ࣎ኛՐயϠາેҖჰ(ଂ TThread ࢉϠĂ҃ڱͧྵѣड़த۞ү ኛՐĂٙͽזॡม఍நĂ˵ΞਕТॡଂк࣎ϡ͗ბତќܜ܅ચΞਕࢋڇЯࠎ ёĄב׶ OnExecute ఍ந ચ۞OnStartڇΨײĂ׎̰ӣ۞ਫ਼઻ົд఍நາኛՐ̝݈ĂАڱ̎۞Execute͞ ચેҖჰѣҋڇચĄڇឰଋΞͽд TService ۞ OnExecute ְІ఍ந඀Ԕ၁ү ТՎඈયᗟ)ĄTServiceThread ۞నࢍĂٕפ࣎ thread ેҖॡ̙ົயϠྤ໚х ચ۞၁үߏ thread-safe(ᛌොĈ˵ಶߏᄲкڇચĂಶυืቁؠڇ၁ү˞к࣎ ચᑕϡ඀ёڇଋ۞ڍચౌѣҋ̎۞ેҖჰ (TServiceThread)ĂЯѩтڇՏ࣎ ચેҖჰڇ πέ۞ᑕϡ඀ёĄྭٺϡڱચᑕϡ඀ё൑ڇ ො ચ۞ੵ᏾Ąڇy ၆ ચЩჍ۞পّĄڇ y ચેҖჰĞService threadsğĄڇ y ચᑕϡ඀ёॡĂᑕྍࢋۢ྽Ĉڇдᇤᆷଋ۞ end; end; ream.Free; St finally rSocket1.Active := False; Serve end; ServiceThread.ProcessRequests(False); while not Terminated do begin S t1.Active :erverSocke = True; ServerSocket1.Port := 80; // WWW ۞ port try S m := TMemoryStream.Create; trea begin procedure TService1.Service1Execute(Sender: TService); ְІ఍ந඀ԔĈ Іᑭෛጡ̚Ăᗕᑝ OnExecute ְІ֭ΐˢͽ˭ۏServiceSocket ˯ಊ)Ąд Ăдෛ඄̰۞ϡ͗ბડાಏᑝ໣ဂͽᏴፄ Service1 (̙ߏᕇдޢ5 ౵ end; end; Stream.SaveToFile('c:\Temp\Weblog' + IntToStr(ServiceThread.ThreadID) + '.log'); Stream.Seek(0, soFromBeginning); ёऱ 8-9בฟ൴ᑕϡ඀ёă̮Іᄃ end; Started := True; SparkyThread := TSparkyThread.Create(False); begin procedure TService2.Service1Start(Sender: TService; var Started: Boolean); ёĈב˯˭ࢬ۞ OnStart ְІ఍ந Іᑭෛጡᗕᑝ OnStart ְІĂ֭ΐۏService ෛ඄(Service1)Ă֭д פ5 Ᏼ end; end; Sleep(500); Beep; begin while not Terminated do begin procedure TSparkyThread.Execute; 4 ૟˭ࢬ۞඀ёቅΐˢ TSparkyThread.Execute ۞၁ү߱རĈ Service2: TService2; var 3 ତ඾дಏ̮඀ё۞၁ү߱རயϠ˘࣎ TSparkyThread ۞БાតᇴĈ end; procedure Execute; override; public TSparkyThread = class(TThread) ည఺ᇹ̄Ĉ Әᑕྍߏކચ۞̍үĄ׎ڇЩࠎ TSparkyThreadĄѩ thread ૟ົેҖଋ פӘ˘࣎ TThread ۞ᚶٚᙷҾĂ֭ކ2 дଋ۞඀ёಏ̮۞ interface ߱རĂ ࣎Ψઇ Service1 ۞ෛ඄Ą˘זApplicationĄଋົ࠻ Service פFile|New|Other ֭ଂ New Items ၆ྖ͞๴Ᏼ פ1 Ᏼ ᇶઃăᚶᜈٕઃͤॡĂιົ఍ந၆ᑕ Thread ۞ᇶઃăᚶᜈٕઃͤĄ ચజӘۢࢋڇચົдᇾ໤۞ TThread ̚Տ 500 ຋ࡋ൴΍ဤᓏĄ༊఺࣎ڇቑּ ఺࣎ ߏ࣎ቑּĈܮ˭ёඕՁĄͽ בચ۞ OnExecute ఍நڇޞҖჰ۞ Execute ਫ਼઻ᚶᜈ఍நາኛՐĂ̙҃ϡඈ ચેڇĄ఺Ξͽឰ̰ڱ͞۞ າ threadזચ۞၁үொڇTServiceThread)Ă֭૟ ᄃ඀ёనࢍ͘Ίܝ8-10 ˢ ᛖ఺ֱ̙Т۞ЩჍপّĄ ચߏᚶٚҋ TComponentĂٙͽιࣇᚶٚ˞ Name পّĄ˭ࢬ׌༼ၡࢋྋڇ ٺચ˵Ξͽߏ࿰ྶཏ௡Ăιࣇ˵ѣពϯЩჍ׶ৌϒЩჍĄ҃ϤڇΞͽߏ˘௡ ચ۞ЩჍ)ĄֶхᙯܼĞDependenciesğڇ)׶በᏭෛ඄̚۞ЩჍă׶ৌϒ۞ЩჍ ૜ቅ۞ֹϡ۰ЩჍ(Ψઇ Service Start ЩჍ)ăពϯдგநࣶ˯ܢચ̚ົѣڇ ఺ֱमҾĄځ۞ЩჍপّΞਕົឰଋ஄஑Ą҃дώ༼̚݋ࠎଋᄲ έ۞ᑕϡ඀ёğĂΒ߁˞ TService ׶ TDependencyĄдֹϡ఺ֱᙷҾॡĂ̙Т ચᑕϡ඀ё۞ᙷҾĞ̙֭ΒӣྭπڇVCL ٙ೩ֻϡͽயϠ Windows πέ̝ ચЩჍপّڇ ચ۞࿪ཝ˯ٙጾѣ۞఍நጡᇴϫĂֽᏴፄயϠາ۞ threadĄڇેҖ఺ ચّኳăഇ୕۞ాቢᇴăͽ̈́ڇચᑕϡ඀ёॡĂົॲፂ೩ֻ۞ڇ఼૱дฟ൴ end; Stopped := True; SparkyThread.Terminate; begin procedure TService2.Service1Stop(Sender: TService; var Stopped: Boolean); ёĈב Іᑭෛጡᗕᑝ OnStop ְІĂ֭ΐ˯˭ࢬ۞ OnStop ְІ఍நۏĂдޢ8 ౵ end; Paused := True; SparkyThread.Suspend; begin procedure TService2.Service1Pause(Sender: TService; var Paused: Boolean); ёĈבІᑭෛጡᗕᑝ OnPause ְІĂ֭ΐ˯˭ࢬ۞ OnPause ְІ఍நۏ7 д end; Continued := True; SparkyThread.Resume; begin var Continued: Boolean); procedure TService2.Service1Continue(Sender: TService; ёĈבந Іᑭෛጡᗕᑝ OnContinue ְІĂ֭ΐ˯˭ࢬ۞ OnContinue ְІ఍ۏд 6 ёऱ 8-11בฟ൴ᑕϡ඀ёă̮Іᄃ ۞Ԇፋྮशనјι۞фҚᇴࣃĄ ࠎ DebuggerĂݭၗࠎ REG_SZĄԯ Delphi32.exeפΐ˯˘࣎ᇴࣃĂЩф ચ࠹ТЩჍ۞̄፟ቅ(ּтĂMYSERV.EXE)Ąࠎ఺̄፟ቅڇ2 யϠ׶ଋ۞ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion ቅĈ 1 ኛАд registry ˭ࢬ۞ҜཉயϠΨઇ Image File Execution Options ۞፟ ચ׶ੵ᏾ጡ˘Тྻү:ڇგநࣶĞSCMğୁજטଠ ચڇΞͽϡܮΞਕົЯࠎᝋࢨ̙֖҃εୀĄ఺ॡ࣏ڱĂ఺࣎͞˭ڶдߙֱଐ ચᑕϡ඀ёӈΞĄ ڇྍפRun|Attach To Process ֭ଂΞϡ۞඀Ԕ̚Ᏼ פ඀ё۞඀ԔĂኛଋᏴ ચᑕϡڇࢋాඕҌڍચĂତ඾ాඕҌੵ᏾ጡğĄтڇੵ᏾Ğ˵ಶߏᄲĂАୁજ ચᑕϡ඀ёซҖڇચᑕϡ඀ё۞඀ԔĂͽ၆ڇྍזચેҖॡాඕڇଋΞͽд ચੵ᏾ڇ၆ ΍ֽ۞ Start ၆ྖ஼̚Ꮾˢ۞ĄפᏴ ̙˘ᇹ۞ĄServiceStartName ߏֹϡ۰ЩჍĂιߏд Service Control Manager ચЩჍߏڇચពϯЩჍ̈́ৌϒ۞ڇચୁજЩჍ ĞService Start Nameğ׶ڇ DisplayName ߏ̙˘ᇹ۞Ą ຍĂ఼૱ֶхᙯܼ۞ DisplayName ׶ Service ۞ڦTDependency.Name)Ąኛ ચЩჍ̙Т(TService.Name ă TDependency.DisplayName ăڇৌϒ۞ TService ۞ DisplayName ߏពϯд Service Manager ෛ඄۞ЩჍĄι఼૱׶ ׶ DisplayName ඈপّĄ TDependency ۞ Name ٺඈТົܮચĂ֤ᆃ఺࣎পّڇЩჍĄࡶֶхᙯܼߏ ચ۞ڇTService ۞ Name পّߏᚶٚҋ TComponentĄιߏ̮І۞ЩჍĂ˵ߏ TService ЩჍপّ TDependency Name পّ࠹ТĄ ચ۞ពϯЩჍ׶ৌϒ۞ЩჍĄιೀͼౌົ׶ڇTDependency DisplayName ߏ TDependency পّ ᄃ඀ёనࢍ͘Ίܝ8-12 ˢ something-2.1.3.bplĄ something.pas྆ࢬֹϡ{$LIBSUFFIX ‘-2.1.3’ }ಶΞͽᏮ΍ ࢬઘᑫЩ݈ࢬΐ˯фҚĄּтĂдޢ{$LIBSUFFIX ‘string’ } дᏮ΍ᑫ९۞ᑫЩ ঐٙѣ۞݈ཉфҚĄפֽ{ ’‘ ࢍॡഇइІΐ˯{$LIBPREFIX ‘dcl’ }Ăֹٕϡ{$LIBPREFIX {$LIBPREFIX ‘string’ } дᏮ΍ᑫ९۞ᑫЩ݈ࢬΐ˯পؠ۞фҚĄּтĂଋΞͽࠎన በᛌ޽΄ ೡࢗ ёऱ۞በᛌ޽΄ב ܑ8.1 ёऱ૞९ᑫ྆Ĉבдٸ˭Еበᛌ޽΄Ξͽ Әੈि۞၆ྖ͞๴Ą ёऱᑕྍౌ఍நٙѣ۞ள૱ĂͽᔖҺ Windows யϠពϯ᏾ᄱٕᛋבDLL ׶ ІᑫĄۏᛌјВֳ πέᑕϡ඀ёֹ྆ϡ DLLĄΪߏ DLLĞٕइІğд Linux ˭Ăᅮࢋଂາበ ᄃΞેҖᑫ࠹੨ЪֹϡĂࠎᑕϡ඀ё೩ֻߙֱপؠ۞ΑਕĄଋΞͽдଋ۞ྭ ёऱĞDLLğĂ၁ᅫ˯ߏ˘௡̏በᛌ࿅۞඀ёቅሀ௡ĂਕૉבٙᏜ۞જၗాඕ ёऱבϲइЇ́જၗాඕޙ ԣಶົඕՁĄޝୁજĂᑕϡ඀ё ચజڇ՟ѣڍࡋğĂЯࠎт 30-15 ޢચĞ̂ࡗд඀ёୁજڇԣ۞ୁજޝଋυื start MyServ ચٕϤ׻΄ЕୁજĈڇέୁજט2 ԣి۞дଠ જүĄ ᑕϡ඀ёԆјྶˢזೀࡋᛗۡޞ1 ࢵАĂдੵ᏾ጡ˭ࢬેҖᑕϡ඀ёĂඈ ൺ۞ॡม̰ԆјĈޝᅮࢋ˘ᕇ̈ԫμĂЯࠎυืдڱ᏾Ą̙࿅Ă఺࣎͞ ચᑕϡ඀ёซҖੵڇд Windows NT ր௚˯Ăଋ˵ΞͽֹϡΩ˘჌͞ёֽ၆ Service to Interact with DesktopķᏴีĄ ĶAllowפચĂ޷˭ୁજ֭Ᏼڇଋ۞פጡ̰ĂᏴטચଠڇέ྆۞טдଠ 3 ёऱ 8-13בฟ൴ᑕϡ඀ёă̮Іᄃ ᑕֹϡइІֽആ΃ DLLĂЯࠎ Web Services ཆд Delphi ۞ RTTI ˯Ą ІĂኛԼϡइІĂЯࠎइІΞͽВֳ RTTIĄТᇹ۞Ăд Web Services ̚ଋ ۏёऱ̚็ᅍבଋ଀ଂߙ࣎ڍࠎ is ᄃ as ྻზ̄ົͧྵ RTTI ̚۞ྤੈĄт ϡ is ٕ as ྻზ̄Ą఺ߏЯֹڱ൑ܮІ็ᅍҌΩ˘࣎ DLL ٕΞેҖᑫĂ֤ᆃ ۏଋଂߙ࣎ DLL ̚૟ڍRTTIğග׎΁۞ેҖᑫĂٕଂેҖᑫ็ˢ DLLĄт ౅࿅ DLL ็ᅍેҖॡഇݭၗྤੈĞRun Time Type Informationڱଋ൑ ёऱĄבDLLĂЯࠎΪѣइІਕૉგநăᙯౕ Qt ۞Вֳ ϡֹڱଋ۞ᑕϡ඀ё̚ӣѣ VisualCLXĂଋಶυืֹϡइІ҃൑ڍ̙࿅Ăт y ࣐ࡶଋ۞૞९ߏ࣎ OLE टጡॡĄ ᇄથ۞ฟ൴۰ॡĄ˧םϲ۞඀ёሀ௡Ăߏࢋ೩ֻගޙy ࣐ࡶଋຐ y ࣐ࡶଋຐᕖ·ߙ Web 伺服器的功能時。 ĄזΨײDelphi ٙౄ۞ᑕϡ඀ё ܧy ࣐ࡶ඀ёሀ௡ົజ ଋ۞૞९ĈٺइІĂՀዋϡٺĂDLL ࠹ྵ̚ڶயϠĄҭߏĂдͽ˭۞ೀ჌ଐ ٺٽ၆̂ొЊ۞ᑕϡ඀ёֽᄲĂइІ൑Ⴗ೩ֻ˞ྵָ۞ᇅّĂ҃ͷͧ DLL Հ ёऱ۞౵ָॡ፟בֹϡइЇ́જၗాඕ ྤੈĄ इІ۞ણ҂ٺՀкᙯזኛଋણዦௐ 16 ౢĂĶྻϡइІᄃ̮ІķĄд֤׊ΞͽԱ ·ፋЪฟ൴ᒖဩ۞ΑਕĄ ІĄેҖॡഇइІࠎϒдેҖ̚۞඀ё೩ֻ׎ΑਕĄ҃నࢍॡഇइІ݋ਕᕖ (IDE)̚۞˘჌পঅ۞ DLLĄइІΞ̶ࠎ׌ᙷĈેҖॡഇइІᄃనࢍॡഇइ Delphi ᑕϡ඀ёăٕߏፋЪฟ൴ᒖဩ ٺ҃ٙᏜ۞इІ(packages)Ă݋ߏϡ something-2.1.3.bplĄ something.pas྆ࢬֹϡ{$LIBVERSION ‘2.1.3’ }ĂಶົᏮ΍ ࢬГΐ˯ઘᑫЩĄּтĂдޢ{$LIBVERSION ‘string’ } дᏮ΍ᑫЩ۞ઘᑫЩĞ.bplğ በᛌ޽΄ ೡࢗ ᄃ඀ёనࢍ͘Ίܝ8-14 ˢ ߏӎ͚೯̙Тྤफ़ऱր௚۞ᜭજ඀ёඈĄ ăٕߏޘٽѣ̙ٙТĂ̙ኢߏΑਕ۞͚೯ቑಛăฟ൴۞ᙱౌڱĄՏ˘჌͞ט ፟۞פдనࢍ˘इྤफ़ऱր௚۞ॡ࣏Ăଋυื҂ᇋտౣࢋଳϡࣹ˘इྤफ़х टኛણ҂ௐ20ౢĄ Ąྎ௟̰ีטफ़۞ྤफ़ຏۢଠྤפData Controls Ξͽ౅࿅ྤफ़໚Ğdata sourceğх Provider۞ௐ30ౢĄ TDataSetProviderĄྎ௟̰टኛણ҂̬௜Client Dataset۞ௐ29ౢă̬௜ Ъϡ۞̮ІĄּтĈTClientDataSetᄃڱ͞פData Access ΞͽᄃЧ჌ྤफ़х Հкྤੈኛણ҂Online HelpĄ זInterBase۞ྤफ़ऱ̮ІĂ̙҃ᅮ౅࿅׎΁̬ࢬᆸĄຐࢋ଀פInterBase ۡତх າྤफ़Ąྎ௟̰टኛણ҂ௐ28ౢĄ फ़ऱĂҭυืֹϡTClientDataSetᄃTDataSetProvider̖ਕՀྤפిх फ़ऱ۞ྭπέ̮ІĂdbExpressᜭજ඀ё೩ֻԣྤפdbExpress ֹϡdbExpressх ᒖဩĄྎ௟̰टኛણ҂ௐ27ౢĄ ADOࠎૄᖂ۞̮ІĂឰଋΞͽ૟ଋ۞ᑕϡ඀ёፋЪˢͽADOࠎૄᖂ۞ ۞̮ІĄѣధк۞ADOᜭજ඀ёΞͽϡֽాඕ̙Т۞ྤफ़ऱր௚Ąͽ फ़ऱğྤפADO ֹϡActiveX Data ObjectĞADOĂϤ Microsoftٙฟ൴ϡֽх ۞̍׍Ąྎ௟̰टኛણ҂ௐ26ౢĄ Database ExplorerăSQL MonitorăᄃBDE Administratorඈ఺ᙷѣϡ ̢જğ۞̮ІĄBDE͚೯̂ณ۞Αਕͽ̈́೩ֻኜтDatabase Desktopă BDE ֹϡBorland Database EngineĞBDEĂጾѣ̂ณ۞APIϡֽᄃྤफ़ऱ ࢱѨ ̰टۍሀ फ़ऱࢱѨྤ۞˯ۍܑ8.2 ̮Іሀ Αਕ̶ֽ௡۞Ąٕט፟۞פĂྤफ़ऱ̮Іߏֶ໰׎х˯ۍд̮Іሀ फ़ऱٕϡֽӔனྤफ़ऱ̰टĄྤפ೩ֻ˞ధк̮ІĂΞϡֽх˯ۍд̮Іሀ Informixăٕߏ DB2Ă఺ֹ଀ᑕϡ඀ё̝มΞͽВϡྤफ़Ą ёĂ఺ֱྤफ़ऱညߏĈOracleă Sybaseă InterBaseă MySQLă MS-SQLă ጡٕߏྤफ़ऱ۞̍׍ฟ൴ซล۞ྤफ़ऱᑕϡ඀ڇଋΞͽֹϡాඕ SQL Ҩ फ़ऱᑕϡ඀ё۞ᇤᆷྤ ёऱ 8-15בฟ൴ᑕϡ඀ёă̮Іᄃ y Web Services y IntraWeb y WebSnap y Web Broker ጡᑕϡ඀ёĈڇଋΞͽֹϡ˭Е۞ Delphi ԫఙֽฟ൴ᇴ჌̙Т۞ Web Ҩ ඀ёĄ ጡᑕϡڇࢎಏĂٕаᑕྤੈᑭ৶̰टඈඈ۞ᑕϡ඀ёĂౌߏ Web Ҩ͗މயϠ ᝋࢨăפშ৭хטშࢱٕ XML ͛Іඈშࢱ̰ट۞ᑕϡ඀ёĄኜтֱ֤ϡֽଠ ጡბĂϡֽд Internet ˯็ᅍᙷҬ HTMLڇጡᑕϡ඀ёߏેҖдҨڇWeb Ҩ ጡᑕϡ඀ёڇϲ Web Ҩޙ ᑕϡ඀ёķ˘༼Ą Ăኛଋણ҂ௐ 18 ౢ۞Ķ̶൴ྤफ़ऱڱ͞۞ ൴Ąࡶຐࢋซ˘Վ˞ྋ̶൴ BDE ̶೸ёྤफ़ऱᑕϡ඀ё఼૱ᅮΩγ૟ BDE ᐌ඾׎΁ᑕϡ඀ёᑫ९˘੓̶ ลᑕϡ඀ёķĄ ϲ̶೸ёྤफ़ऱր௚۞ྤੈĂኛଋྎ֍ௐ 31 ౢĶฟ൴кޙٺ଀Հкᙯפࡶࢋ ᄃ SOAPĄ ϲĂΒ߁ DCOMăCORBAăTCP/IPޙؠֽםёᑕϡ඀ёΞͽ౅࿅к჌۞ ଋΞͽֹϡ˘ཏ̢࠹Ъү۞̮Іֽ͚೯̶೸ёྤफ़ऱᑕϡ඀ё۞ฟ൴Ą̶೸ ̶೸ёྤफ़ऱᑕϡ඀ё ώ۞ Delphi ౌ͚೯ྤफ़ऱĄۍො ٙѣ Ķ̶൴ྤफ़ऱᑕϡ඀ёķ˘༼Ą ൴۞ྤੈ݋ኛણ҂ௐ 18 ౢ۞̶ٺĄ҃ᙯڱጡ۞͞ڇᑕϡ඀ёͽ̈́ᑕϡ඀ёҨ ྎ௟̰टኛણ҂͘Ί۞ௐ˟ొ̶Ķฟ൴ྤफ़ऱᑕϡ඀ёķĂֽ˞ྋฟ൴ϡ͗ბ ᄃ඀ёనࢍ͘Ίܝ8-16 ˢ ĞDLLğĄ఺˵ߏฟ൴ WebSnap ᄃ Web Service ᑕϡ඀ёॡВ఼۞ᏴፄĄ ྭπέᑕϡ඀ёă֤ᑕྍᏴϡ CGI ፾ϲેҖ඀ёٕߏ Apache Вֳሀ௡ ጡฟ൴ڇࢋд Web Ҩڍଳϡ ISAPIăNSAPIăᄃ Apache DLL ᑕϡ඀ёĄт CGI ᄃ Win-CGI ᑕϡ඀ёົֹϡྵк۞ր௚ྤ໚Ăٙͽྵኑᗔ۞ր௚౵р ᙷ۞ᑕϡ඀ё̙֭ົజो̶ֽ൴Ą Web App Debuggerᑕϡ඀ёߏϤWeb Serverྶˢ۞ેҖᑫĄ఺ Ᏼፄ఺჌ݭҾົயϠֻWebᑕϡ඀ёฟ൴ᄃീྏ۞ੵ᏾ᒖဩĄ ፾ϲᑕϡ඀ё Web App Debugger ጡ็аගϡ͗ბĄڇϤҨޢDLL఍ந൒ ጡ็ˢڇጡٙྶˢ۞ᑕϡ඀ёĄྤੈߏ౅࿅Ҩڇ඀ёߏϤWebҨ ጡᑕϡڇᏴፄ఺჌ݭҾົ૟ଋ۞૞९నؠࠎDLLĄApache WebҨ ĞDLLğ ApacheВֳሀ௡ ΐˢዋ༊۞$APPTYPEበᛌ׻΄Ą uses̄ήĂͽ̈́זᏴፄ఺჌ݭҾົд૞९ᑫΐˢυࢋ۞ಏ̮ЩჍ ගϡ͗ბĄ ጡĂͽਖ਼аڇϤᇾ໤Ꮾ΍็аගҨڍଂϡ͗ბତќኛՐĂ֭૟ඕ έᑕϡ඀ёĂιົᖣϤᇾ໤Ꮾˢטጡᑕϡ඀ёߏଠڇCGI WebҨ ጡᑕϡ඀ё!ڇ ፾ϲ۞CGI WebҨ usesᄃexports̄ή྆Ąז ಏ̮ΐ۞זᏴፄ఺჌ݭҾົд૞९ᑫΐ˯library۞ฟᐝăᅮࢋϡ फ़ඕၹ็ගDLLĄՏ˘࣎ᅮՐ۞ੈिౌົѣ˘࣎ેҖჰٙ఍நĄ ბࢋ็ਖ਼۞ྤੈ౅࿅TISAPIApplicationᖼೱј˘჌ྤ͗މDLLĄ ጡٙྶˢ۞ڇጡᑕϡ඀ёߏϤWebҨڇISAPIᄃNSAPI WebҨ ёऱ(DLL)בၗాඕ ISAPIᄃNSAPI۞જ ጡݭҾ ೡࢗڇWeb Ҩ ጡᑕϡ඀ёڇܑ8.3 Web Ҩ ጡݭҾ׎̚˘჌ĈڇᏴፄ˭Е Web Ҩޢ File|New|OtherĂд New Items ၆ྖ஼Ᏼፄ Web Server ApplicationĂ൒ ጡᑕϡ඀ёĂኛᏴፄڇϲາ۞ Web Ҩޙࡶࢋֹϡ Web Broker ߛၹֽ ბΝĄ͗މז૟ιࣇ็ޢயϠ HTML ٕ XML ͛ІĂ൒ֽڱё̼۞͞ ёă౅࿅඀בInternet ࢱѨ̰۞̮ІΞͽᑒӄଋฟ൴ְІ఍ந ۞ۍд̮Іሀ Ξෛ̮ІĄܧጡΞͽΒӣڇጡᑕϡ඀ёĄ఺ֱ Web ҨڇDLL ̝ᙷ۞ Web Ҩ ଋΞͽֹϡ Web BrokerĞ˵జჍࠎ NetCLX ߛၹğֽயϠ CGI ᑕϡ඀ёٕ ฟ൴ Web Broker ᑕϡ඀ё ёऱ 8-17בฟ൴ᑕϡ඀ёă̮Іᄃ ĞRPCğซҖበቅĄ ΨײؠĂ֭ͷֹϡ XML ֽ၆ᅈბ඀ԔםؠĄιֹϡ HTTP ֽ༊ү็ᅍ۞ם ચֹϡ۞ߏ SOAPĂιߏ˘࣎д̶೸ёᒖဩ˭ϡֽϹೱྤੈ۞ᅅณ৺ڇ Web ચĄڇ໤ĂଋΞͽдშྮ˯೩ֹֻٕϡ׎΁Ξ඀ё̼۞ Object Access ProtocolğăWSDLĞWeb Service Definition Languageğඈᇾ ચĄ౅࿅ኜт XMLăXML SchemaăSOAPĞSimpleڇࢬϡͽೡࢗٙ೩ֻ۞ ચ೩ֻؠཌྷԆፋ۞̬ڇ ΨĄWebײapplicationğĂΞͽдშྮ˯̳ฟ൴Җᄃ ચߏҋԧΒӣ۞ሀ௡ᑕϡ඀ёĞself-contained modularڇ Web ચᑕϡ඀ёڇ ฟ൴ Web ᑕϡ඀ёķĄ WebSnap ۞ྤੈኛણ҂ௐ 35 ౢĶֹϡ WebSnap ฟ൴ Web ٺтᅮՀкᙯ 31 ౢ۞Ķֹϡ InternetExpress ฟ൴ Web ᑕϡ඀ёķ˘༼Ą InternetExpressĂኛଋણ҂ௐ ٺ֤ᆃଋΞͽֹϡ InternetExpress ԫఙĂᙯ ጡბેҖ script ۞͞ёĂڇдϡ͗ბેҖ script ̙҃ߏдҨפଋຐࢋଳڍт ጡᑕϡ඀ёķĄڇĶWeb Ҩ ጡᑕϡ඀ёݭҾĞISAPI/NSAPIăCGIăApacheğĄྎ௟̰ट֍ܑ 8.3ڇҨ Ᏼፄ WebޢItems ၆ྖ஼Ᏼፄ WebSnap ࢱѨĄᏴፄ WebSnap ᑕϡ඀ёĂ൒ ϲ˘࣎າ۞ WebSnap ᑕϡ඀ёĂኛଋᏴፄ File|New|OtherĂд Newޙࡶࢋ ጡბĄڇฟ൴Ҩٺዋϡ ጡĄWebSnap ̮ІົயϠ HTML ٕ׎ι۞ MIME ̰ट۞შࢱĄWebSnapڇҨ WebSnap ೩ֻ˞˘௡̮ІᄃჟីĂΞϡͽฟ൴ᄃშࢱᕱᜓጡ̢જ۞ซล Web ฟ൴ WebSnap ᑕϡ඀ё ጡᑕϡ඀ёķĄڇInternet Ҩ ϲޙጡᑕϡ඀ёĂኛણ҂ௐ 33 ౢĶڇϲ Web Ҩޙٺࡶଋຐࢋۢ྽Հкѣᙯ ᄃ඀ёనࢍ͘Ίܝ8-18 ˢ ІĂּтֹϡ Win9x Shell extensions ᄃ DirectX кಫវ͚೯Ąᑕۏ̢જ۞ யϠᄃր௚྆ͽCOMࠎૄᖂ۞APIזϡ඀ё̰ొֹϡ̬ࢬֽԼචፋវనࢍĂ ੼۞ᇅّĂଂ˘࣎ᑕޝֹϡ Delphi ֽฟ൴ͽ COM ࠎૄᖂ۞ᑕϡ඀ёĂ׍౯ Active ͛Іăᄃ Active ϫᐂඈԫఙ۞ૄᖂĄ ăีטăٕ Active ܑॾĄCOM Тॡ˵ߏ AutomationăActiveX ଠีטଠ ጡĞAutomation ServerĂΒ߁ ActiveX Server ObjectsğăActiveXڇજ̼Ҩ Іăҋۏ ጡბĂ၁ү۞̰टΞͽΒ߁ COMڇଋΞͽฟ൴ COM ϡ͗ბٕҨ ฟ൴ COMăOLEăٕ ActiveX ᑕϡ඀ёĄ۞ܮኜਠᙷҾᄃჟីౌΞͽឰଋ͞ ֹϡ COM ᄃ DCOM ચາᆧ̬ࢬӈΞĄڇચĂଋΪᅮࢋആֱ֤ڇІ೩ֻᗝγ۞ ଀̮ІĄࢋֹଋ۞̮פឰϡ͗ბΞͽдેҖॡഇڱͽ̢࠹໛఼Ą̬ࢬ೩ֻ͞ ѩ̝มΞكጡბڇ̬ࢬĂឰ̮Іᄃ̮Іăᑕϡ඀ёᄃᑕϡ඀ёăϡ͗ბᄃҨ ಶߏĂᖣϤؠཌྷ୻຾۞هѩ̢જĄCOM ౵ࢦࢋ۞៍كహវ̮Іᄃᑕϡ඀ё COM ߏ˘჌ᄃ඀ёᄬ֏൑ᙯ۞హវ̮ІሀݭĂਕឰેҖд Windows πέ۞ COM+ăActiveXăᄃ Active Server PageĄ ІĄଋ˵ΞͽֹϡۏІĂٕߏ DCOM Ξͽд̙Т۞፟ጡมֹϡۏٙ೩ֻ۞ ёజჍ̝ࠎ̬ࢬĄCOM ᑕϡ඀ёΞͽֹϡ̙ТҖ඀בมፆү۞ਕ˧Ă఺ֱ ѩΞͽ̝كІۏёĂֹבІߛၹĂдι۞నࢍ̚Ăਕ౅࿅࿰Аؠཌྷр۞ۏё COM ಶߏ Component Object ModelĂιߏ˘჌д Windows πέ˯۞̶೸ ϡ COM ฟ൴ᑕϡ඀ё ચ۞ྤੈĄڇ Web ٺચķĂ྆ࢬѣՀкᙯڇ ኛણ҂ௐ 38 ౢĶֹϡ Web ચගЇຍ۞ϡ͗ბֹϡĄڇ ጡ೩ֻ WebڇҨ ጡਕૉаᑕ SOAP ੈिĄ˵Ξͽฟ൴ڇጡ۞ϡ͗ბĂΪࢋ఺࣎ҨڇᆷЇຍҨ ચ۞ϡ͗ბĄଋΞͽᇤڇΨ˯ࢬײጡĂͽ̈́ڇચ۞Ҩڇ ଋΞͽฟ൴၁ү Web ёऱ 8-19בฟ൴ᑕϡ඀ёă̮Іᄃ ໤ྤफ़ሀ௡ॾγгрϡĄ̙࿅Ăᇾ໤ྤफ़ሀ௡ТᇹгϺਕజᑕϡҌЇң ล(single-tiered)ᄃ˟ล(two-tiered)ྤफ़ऱ۞ᑕϡ඀ё̚ॡĂᇾ˘ٺ༊ϡ г௡ᖐଋ۞ᑕϡ඀ёăՀᅅᗫгᄦү׎͛ІĄٽy ᇾ໤ྤफ़ሀ௡ֹଋՀᅅ ĞservicesğĂՏ˘჌ྤफ़ሀ௡ౌѣ׎পঅϫ۞Ă̶ࢗт˭Ĉ ચڇέٙΨ΍۞ሀ௡)ᄃטሀ௡ăWeb ሀ௡ăapplet ሀ௡(ᛌොĈϤଠ ˘Вѣрೀ჌۞ྤफ़ሀ௡Ăӈᇾ໤ྤफ़ሀ௡(standard data modules)ăᅈბ Ӏ۞௡ᖐّ̍׍Ąܮࠎଋ೩ֻ˞Ȉ̶ܮЊĂ֤ᆃĂྤफ़ሀ௡ ІĂٕ۰ߏຐࢋ࿣ᗓր௚̚఍நྤफ़ऱాତᄃྻүఢ݋۞ొۏྤफ़ऱᄃր௚ І۞य़ᙝĄҭߏĂ઄тଋχზࢦᖬֹϡјཏ۞̮טਠܑॾ̚ෛᛇ̼ଠ˘ٺཉ ෛᛇ̼(nonvisual)۞̮ІĄٙѣдྤफ़ሀ௡̚۞̮ІĶ༊൒Ξͽķజܧк࣎ ٙᏜ۞Ķྤफ़ሀ௡(data module)ķಶтТ˘჌পঅ۞ܑॾ(form)Ă׎̚Βӣ඾ ֹϡྤफ़ሀ௡ फ़ሀ௡ķ˘༼ĄྤّٽІķͽ̈́ௐ 31 ౢ۞ĶֹϡϹۏ +ϲ MTS ٕ COMޙMTS ᄃ COM+۞ྤੈኛણ҂ௐ 46 ౢĶ ٺࡶຐ଀ۢՀкᙯ நĄ ચăщБăྤ໚გڇٽCOM+͚ٙ೯۞Ϲ ۞ޢServer)ٕ Windows 2000 ͽ ચΒӣѣ Windows 2000 ͽ݈۞ MTS(Microsoft Transactionڇ۞ણᇴĄ఺ֱ ІĂົనؠ COM ᑕϡ඀ёۏચĂࠎ˞д̶೸ёᒖဩ˭გநڇѣߙֱপঅ۞ ֹϡ MTS ᄃ COM+ DCOM ۞ྤੈĂኛણ҂ௐ 31 ౢ۞Ķֹϡ DCOM ాቢķ˘༼Ą ٺᙯ ൴ķ˘༼Ą̶ֽטͽ ActiveX ଠ ķăٕௐ 31 ౢ۞Ķԯϡ͗ბᑕϡ඀ёטϲ ActiveX ଠޙఙໄኢķăௐ 45 ౢĶ Ăྎ֍ௐ 40 ౢĶCOM ԫੈྤ۞ีטCOM ᄃ ActiveX ଠ ٺࡶຐ଀ۢՀкᙯ ׎ι፟ጡ˯۞ COM ̮ІĄפDistributed COM дშྮ˯х ϡ඀ёΞͽֹϡдТ˘έ፟ጡ˯׎ιᑕϡ඀ё྆۞ COM ̮ІĂ˵Ξͽ౅࿅ ᄃ඀ёనࢍ͘Ίܝ8-20 ˢ Іᑭෛጡ(Object Inspector)̚በۏਕдܮफ़ሀ௡ෛ඄̚జᏴፄॡĂଋྤٺ̏ फ़ሀ௡ෛ඄̚Ą༊ߙ̮ІྤٺComponent Palette)˯߄ᏴĂତ඾ಏᑝ)ۍІሀ ෛᛇ̼̮ІΐҌྤफ़ሀ௡̚ĄΪืд̮ܧ҃ͷ՟ѣ၆ᆅϡ۞̈ᕇĄଋΞͽ૟ дనࢍॡഇĂྤफ़ሀ௡࠻੓ֽಶྫྷ˘ਠ۞ Form ՟ự׌ᇹĂੵ˞ࡦഀߏϨҒ ૞९྆ࢬĄז૟ሀ௡ΐޢ௡۞ಏ̮(unit)ᑫĂ౵ ฟୁ˘࣎۩۞ྤफ़ሀ௡Ăତ඾д඀ёቅበᏭጡ̚ពϯѩБາሀົܮ ΞĄIDE Data Module ̝˯ӈ ٺϲྤफ़ሀ௡ĂΪืᏴፄ File|New ֭ͷᗕᑝޙࡶ୬ ϲᄃበᏭޙᇾ໤ྤफ़ሀ௡۞ ચᑕϡ඀ёķ˘༼Ąڇચ۞ྤੈĂኛણ҂ௐ8-5ࢱ۞ĶڇٺՀкᙯזࢋ଀ڍ ચฟٕؕઃͤॡົᛈ൴۞ְІĄтڇ˞̙Ξෛ̮І۞ΑਕĂService Βӣ ચ۞ڇચĄࠎ˞ેҖ၁ү఺ֱڇጡᑕϡ඀ё྆۞ڇ྅˞ NT Ҩދ y Service ྤੈኛણ҂ቢ˯ HelpĄ Applet ۞ ٺՀкᙯזέ Applet ॡົᛈ൴۞ְІĄࢋ଀טֹϡ۰ેҖଠ έ̚ࢋពϯ۞ဦϯᔘѣ༊ט۞̙Ξෛ̮ІĂ΁ࣇؠཌྷ˞˘ֱপّĂтଠ έ Appletטέ Applet ۞͹຅Ąࠎ˞ેҖ၁үଠטy Applet ሀ௡ၹј˞ଠ ϡ Web ሀ௡Ăѣ඾ՀкՀྎႽ۞ྤੈĄ тңֹٺጡķ̚Ă၆ڇֽ۞ HTTP ੈिĄдௐ 33 ౢĂĶχౄ Internet Ҩ ׎̝̚γĂWeb ሀ௡˵Тॡ࢑య̶ࠁϤϡ͗ბٙ็ٺੈि̰ट۞̮Іཉ ጡᑕϡ඀ё۞͹຅Ąੵ˞૟யϠ HTTP аᑕڇy Web ሀ௡ၹј˞ Web Ҩ ጡ̚ΐˢᅈბྤफ़ሀ௡ķ˘༼Ąڇዦд8-25ࢱ۞Ķдᑕϡ඀ёҨ ጡ໛఼Ăࡶࢋۢ྽Հк࠹ᙯ۞ྤੈĂኛଋણڇϡ͗ბϡֽᄃᑕϡ඀ёҨ ጡ̰۞̙Ξෛ̮ІĂᅈბྤफ़ሀ௡ົᏮ΍পঅ۞̬ࢬĂͽ೩ֻගڇёҨ ώౌ͚೯ᅈბྤफ़ሀ௡ĄѩγĂࠎ˞ᐼхдᑕϡ඀ۍٙѣ۞ܧᖂĂҭ֭ ጡ۞ૄڇy дкลᑕྤफ़ऱϡ඀ё̚Ăᅈბྤफ़ሀ௡ၹј˞ᑕϡ඀ёҨ ѣՀྎ௟۞ྋᄲĄ ϲᄃበᏭķ˘༼̚Ăޙݭၗ۞ᑕϡ඀ё̚Ąд8-20ࢱ۞Ķᇾ໤ྤफ़ሀ௡۞ ёऱ 8-21בฟ൴ᑕϡ඀ёă̮Іᄃ ऱ྆۞׎΁ሀ௡Ăֹٕϡ఺࣎ሀ௡۞ᑕϡ඀ё྆۞׎΁ಏ̮࠹኏ࡎĄ Іۏ࣎পҾ۞ЩфĂͽᔖҺྫྷפІऱ۞ЩჍĂՀࢋۏࢋΐˢٺ׍Ξ᝝ّĂ၆ ଋᑕྍдనࢍॡĂՀԼྤफ़ሀ௡۞ЩჍĂͽ̈́࠹၆ᑕ۞ಏ̮ЩჍĂឰ΁ࣇՀ ܑॾٙϡ)Ą ߏĶUnit2ķ(Unit1 ࠎܮĶDataModule2ķĄ҃ DataModule2 ࠹၆ᑕ۞ಏ̮ᑫ ߏົܮ඀ё۞யϠજү(building) Ă֤ྍྤफ़ሀ௡࿰న۞ЩჍ ᓝּ҃֏Ă઄тଋୁؕ˞˘࣎າ۞૞९Ăдΐˢྤफ़ሀ௡̝݈ଂϏઇ࿅ᑕϡ ࿅۞౵̈ಏཱི̮ቅĄזĶDataModuleNķĄѩ ఍ ۞ N ˜ߏϫ݈д૞९̚ᔘϏϡ ྤफ़ሀ௡۞ЩჍົពϯдྤफ़ሀ௡ෛ඄۞ᇾᗟ఍Ă׎࿰న۞ЩჍࠎ ࠎྤफ़ሀ௡ᄃ׎ಏ̮׻Щ फ़ሀ௡۞ྤੈኛણ҂ online HelpĄྤٺࡶࢋ଀ۢՀкᙯ View DFM Ᏼፄ၆ѩপؠ۞ܑಏхᑫॡ۞ॾёĞ˟̮ᑫٕ͛фᑫğĄ View as Text ϡ͛фሀёពϯѩྤफ़ሀ௡۞পّĄ ІऱĄۏAdd to Repository ૟ѩྤफ़ሀ௡ΐˢ ᇹ̄Ą ࣧώᚶٚॡ۞זІऱ྆Ω˘࣎ሀ௡۞ԼតĂаೇۏঐ၆ᚶٚҋפ Revert to Inherited ၹ۞ึԔĄޙІдୁજॡ̮פCreation Order ឰଋਕૉԼតԼតྤफ़х ԔĄึ۞פజᏴޢTab Order Լតྤफ़ሀ௡̰ٙѣ̮Ід޷˭Tab ྆۞నؠğĄ Position ૟ሀ௡̰۞̙Ξෛ̮І၆ᆅĞֶ໰࠻̙֍۞ᕇٕଋд၆ᆅ၆ྖ஼ Edit ΍ன˘࣎ᏴಏΞͽឰଋдྤफ़ሀ௡྆ગ෭̮ІĄ Ᏼี ϫ۞ ܑ8.4 ྤफ़ሀ௡۞̰टᏴಏᏴี ົ΍னд̰टᏴಏ۞ᏴีĄ ଋ˵Ξͽ၆ྤफ़ሀ௡޷˭໣ဂΠᔣֽ៍࠻̰टᏴಏĄ˭Еܑॾᓁඕྤफ़ሀ௡ टৼՀк۞̮ІĄ Ꮽ׎পّĂಶྫྷྍ̮Ідܑॾ˯ॡ՟ѣ׌ᇹĄଋΞͽአፋྤफ़ሀ௡۞̂̈ͽ ᄃ඀ёనࢍ͘Ίܝ8-22 ˢ ІĈ˘࣎ྤफ़໚̮ІĞTDataSourceğ̮פ఺࣎ྤफ़ܑଋҌ͌ᅮࢋ׌࣎ྤफ़х פCUSTOMER ྤफ़ܑĄࡶࢋх זᓝּֽᄲĂ઄నଋ۞ྤफ़ऱᑕϡ඀ёົϡ ӈົజԼតĄ Іᑭෛጡ˭۞ЩჍۏІᑭෛጡ۞ Name পّĂۏĂΪࢋഫᇾொฟޢ࣒ԼԆ̝ Іᑭෛጡ྆በᏭ Name পّĄۏ2 д 1 Ᏼፄ̮ІĄ ࡶࢋԼតྤफ़ሀ௡̮྆І۞ЩჍĂኛଋĈ ࣎ЩфĂͽͅߍιٙ΃ܑ۞̮І჌ᙷᄃϡ౉Ąפଋ˵ధຐࢋ၆̮І ଋᏴፄଋٙຐࢋֹϡ۞পؠ̮ІĄٺܮDataSource1 ఺࣎ЩфĄ఺ᇹΞͽ ࢬΐ࣎ 1 ༊ι۞ЩჍĄᓝּֽᄲĂᕚ TDataSource ̮Іಶົ΍னޢІ჌ᙷ ᙊҾιտౣߏࣹ˘჌̮І۞ЩфĂ˵ಶߏд̮ٽ޽ࠁ˘࣎टົܮІॡĂሀ௡ ཉ̮ٸϡĂྤफ़ሀ௡˯۞̮Іౌົ΍னιࣇ۞ЩჍĄ༊ଋௐ˘Ѩֹܮ͞˞ࠎ ᏾ᄱੈिĄזќ ଋဘྏઇ఺ᇹ۞જүĂಶົڍཉт͞ॾ఺ᙷ۞Ξෛ̮ІĂтٸĄଋ̙ਕ˯ٸ ಏᑝ˘˭ྤफ़ሀ௡ӈΞ૟̮Іޢཉ۞̮ІĂ൒ٸІĄАಏᑝ̮ІЕ˯ଋٙຐ ཉΞෛ̮ٸ˭फ़ሀ௡˭ĂಶтТд˘ਠ۞ܑॾྤזཉ̙Ξෛ̮ІٸଋΞͽ Щפཉ̮І֭ആιٸ ѩྤफ़ሀ௡۞ొ̶ĄזԼଋ඀ёቅ̚ણ҂ Әֹ̚ϡѩЩჍٙؠཌྷ۞ݭၗ࠰ົజՀЩĂҭଋ̪υื͘જ࣒ކӘĂд඀Ԕ ކТॡՀજιд interface ߱ར۞ົܮࡶдనࢍॡഇԼតྤफ़ሀ௡۞ЩჍĂ ົజԼតĄ Іᑭෛጡ۞ Name পّĂෛ඄ᇾᗟ఍۞ЩჍӈۏĂΪࢋഫᇾொฟޢ࣒ԼԆ̝ Іᑭෛጡ̚በᏭ׎ Name পّӈΞĄۏ2 ତ඾д 1 ᕇᏴྤफ़ሀ௡ෛ඄Ą ࡶࢋՀԼྤफ़ሀ௡۞ЩჍĂኛଋĈ ёऱ 8-23בฟ൴ᑕϡ඀ёă̮Іᄃ public { Private declarations } private M Orders: TClientDataSet; Customers: TClientDataSet; TCustomerData = class(TDataModule) type Ә྆Ąކ type זёౌᑕྍΐ בΨĄЇңΐдྤफ़ሀ௡۞඀Ԕٕײ˵ΞͽдЇңֹϡྍሀ௡۞ಏ̮̚ΐͽ Ψྍ඀ԔĄײё̚ב۞ᘨ੃̍үćଋΞͽдߙ࣎ྤफ़ሀ௡̰̮І۞ְІ఍ந ̦ᆃ̙ТĄᓝּֽᄲĂଋΞਕᇤᆷ˞ߙ࣎඀ԔĂͽซҖ͡௣ă؞௣ăᄃѐ௣ ё)Ăಶ׶ᇤᆷ˘ਠϡͽΒ྅ྤफ़఍நఢ݋۞Бા඀ёቅ՟ѣבІ۞ְІ఍ந Β߁˞ᇤᆷྤफ़ሀ௡̚Ч̮)ڱдྤफ़ሀ௡۞ಏ̮ᑫ྆ĂଋТᇹгΞͽᇤᆷ͞ ϲдྤफ़ሀ௡̚۞ྤफ़఍நఢ݋ޙ Ąڱ౹ౄ΍ྤफ़఍நఢ݋გநଋፋ࣎ᑕϡ඀ё྆ྤफ़ፆү۞͞ ˘࣎ TClientDataSet ̮Іѣ෹࿅ 20 ࣎Ξਕ൴Ϡ۞ְІĄଋΞͽᖣϤ఺ְֱІ Іѣˬ࣎Ξਕ۞ְІĈOnDataChangeăOnStateChangeăͽ̈́ OnUpdateDataĄ ੵ˞পّ̝γĂଋ˵Ξͽആ̮ІᇤᆷְІ఍ந඀ԔĄּтĂTDataSource ̮ ᑕϡ඀ёֹ྆ϡ఺࣎ྤफ़ሀ௡۞ܑॾĄ ଋזॾ˯۞ྤफ़ຏ̮ۢІĄଋ၆̮Іপّٙઇ۞ԼតĂౌົᇆᜩܑזົᇆᜩ ᛼ҜĂᖣѩ˵۞זफ़໚дྤफ़ܑٕߤྙٙ̚ਕ࠻ྤטΨ΍᛼ҜበᏭጡĂֽࢨ फ़ຏ̮ۢІֽ࣒Լྤफ़Ąଋ˵Ξͽᗕᑝ ClientDataSetྤ۞זιࣇдܑॾ˯࠻ ྤफ़ගྤफ़໚̮ІĄ૟ྤफ़ะ ReadOnly পّనࠎ True Ξͽֹ֨ͤϡ۰౅࿅ к͌ٸт TClientDataSet ࢋฟטᓝּֽᄲĂଋΞͽֹϡྤफ़ะ۞পّĂֽଠ फ़ሀ௡྆Ăਕឰଋдፋ࣎ᑕϡ඀ё྆ะ̚ଠგιࣇ۞ҖࠎĄྤזٸ૟̮Іᕚ дྤफ़ሀ௡ֹ྆ϡ̮І۞পّᄃְІ CustomerTableĄ फ़ܑĂଋΞͽ૟ιࣇՀЩࠎ CustomerSource ᄃྤ۞פІ۞ݭၗᄃιࣇٙх Щࠎ DataSource1 ᄃ ClientDataSet1Ąࠎ˞၁ᅫͅߍ̮פആ΁ࣇົܮॡĂሀ௡ ଋ۞ྤफ़ሀ௡זٸᄃ˘࣎ྤफ़ܑ̮ІĞTClientDataSetğĄ༊ଋ૟఺ֱ̮Іᕚ ᄃ඀ёనࢍ͘Ίܝ8-24 ˢ ಏ˯Ăܑזٛٳ૟᛼ҜޢІ ӈ ΞĂన ؠ р DataSet পّ޽Ш ClientDataSet1Ą̝ ಏ݈Аؠཌྷрྤफ़໚ĂΪࢋᕚ˘࣎ TDataSource ܑ̮זٛ᛼Ҝٳଋ˵Ξͽд TClientDataSet1Ą నࠎ DataSource1Ą҃ྤफ़໚ົҋજ૟ DataSet পّనШྤफ़ሀ௡྆۞ ॾĄ֭૟ѩበᏭ஼۞ DataSource পّܑזЩ DataSource1ğΐפफ़໚̮ІĞ ҋજᑒଋາᆧ˘࣎ྤົܮ Ϗؠཌྷྤफ़໚ĞDataSourceğĂٙͽ IDEإЯࠎଋ ஼̮ІĄ ॾ˯Ąಶົ΍ன˘࣎በᏭܑזٛٳͽฟୁ᛼ҜበᏭጡĄᏴፄ˘࣎᛼Ҝ֭૟̝ ଋ۞ྤफ़ሀ௡˭Ăᗕᑝιזଋ̏གྷΐˢ TClientDataSet ̮ІڍᓝּֽᄲĂт (ညߏበᏭ஼̝ᙷ۞)Ą І̮טϲଠޙࠎ఺ֱ᛼Ҝົܮޢྤफ़ሀ௡ΐҌྍܑॾ۞ uses ̄ή̚Ă̝ ពϯ೩ϯĂࢋଋቁᄮߏӎຐ૟ྍົܮ ٛҌܑॾ̝˯ĄѩॡĂIDEٳ᛼Ҝ ׌˭Ăͽฟୁ᛼ҜበᏭጡ(Fields editor)Ąଂ᛼ҜበᏭጡ˯ĂЇຍ૟ߙֱ y ၆ྤफ़ऱ̮І҃֏Ăኛдྤफ़ሀ௡۞ܑॾ̮Іٕߏߤྙ̮І̝˯ాᜈ޷ ۞Еܑ̚ԯι߄Ᏼ΍ֽĄ y Ᏼፄ File|Use UnitĂତ඾Ꮾˢሀ௡۞ЩჍĂٕ۰ߏଂ Use Unit ၆ྖ஼ uses ̄ή̚Ą זሀ௡۞ЩჍΐ y д඀ёቅበᏭጡ̚Ăฟୁܑॾ۞ಏ̮ᑫĂ֭ͷд interface ߱ར̚૟ྤफ़ ĈזΞͽᏱౌڱк͞ޝҌܑॾ۞ uses ̄ή̚Ą ࡶ୬дྤफ़ሀ௡̚ᙯᓑҌܑॾ̚۞ෛᛇ̼̮ІĂࢵАĂଋυื૟ྤफ़ሀ௡ΐ फ़ሀ௡ྤפଂܑॾ̚х ё۞၁ү඀ёቅᑕྍ΍னдତ˭ֽ۞၁ү߱རĄב҃඀Ԕᄃ CustomerData: TCustomerData; var end; procedure LineItemsCalcFields(DataSet: TDataSet); { A procedure you add } Public declarations } } ёऱ 8-25בฟ൴ᑕϡ඀ёă̮Іᄃ ࣎૲ѣனҖ૞९ЩჍ۞ࢱ˘זItems ၆ྖ஼ॡ(File|New|Other)ĂӈΞ࠻ Іऱ̚Ą༊ଋฟୁ NewۏଋΞͽВֳ૞९྆۞ีϫĂݒ̙ᅮ૟఺ֱีϫΐҌ Вֳ૞९̚۞ีϫ І۞ણ҂ྤੈĄۏІऱᄃ New Items ၆ྖ͞๴˯ٙѣۏٺ̰ӣ΍ன BIN ϫᐂ˭)Ăιߏ࣎͛фݭၗ۞ᑫ९Ă ٺд delphi32.dro ఺࣎ᑫ̚(࿰నҜ Іऱ۞ྤफ़జჯ᜕ۏϲܑॾᄃ૞९)Ąޙ(wizardsĂਕጱֹ͔ϡ۰˘Վ˘Վг ͽ̈́ጱ͔ჟីۍј˞Гᖎಏ̙࿅۞ְଐĄιТॡ˵ࠎາ૞९೩ֻ˞ᇹ Іऱ(Tools|Repository)ֹ଀ܑॾă၆ྖ஼ă॰ߛăͽ̈́ྤफ़ሀ௡۞̶ֳۏ Іऱۏֹϡ ёķĄ ϲкลᑕϡ඀ޙѣᙯкลྤफ़ऱᑕϡ඀ё۞Հซ˘ՎྤੈĂኛણ҂ௐ 31 ౢĶ ಶྫྷᇾ໤ሀ௡˘ᇹĄڱĂ׎ֹϡ͞ޢд૟ྤफ़ሀ௡ΐˢ૞९ ֽୁજᅈბሀ௡ჟីĄ फ़ሀ௡ğྤٽ3 ᗕᑝᅮࢋ۞ሀ௡ݭၗĞCORBA ྤफ़ሀ௡ăᅈბྤफ़ሀ௡ăϹ 2 д New Items ၆ྖ஼྆Ᏼፄ Multitier ࢱѨĄ 1 Ᏼፄ File|New|OtherĄ ૞९̚ĂኛଋĈזࡶࢋΐˢᅈბྤफ़ሀ௡ Ąפྤफ़ሀ௡ٙ೩ֻ۞̬ࢬĂΞͽឰкลᑕϡ඀ё۞ϡ͗ბ౅࿅შྮх ጡ૞९̚Ąᅈბڇώ۞ Delphi ̯ధଋ૟ᅈბྤफ़ሀ௡ΐˢᑕϡ඀ёҨۍѣֱ ጡ̚ΐˢᅈბྤफ़ሀ௡ڇдᑕϡ඀ёҨ ሀёՀΐ୻຾ĄפΞͽឰଋ۞ྤफ़х ڱಶົ൴னበᏭ஼۞ DataSource পّ̏གྷనؠࠎ DataSource1ĄӀϡ఺჌͞ ᄃ඀ёనࢍ͘Ίܝ8-26 ˢ ଋٙ޽ؠ۞ϫᐂĄפ׎΁ဥฤ۞јࣶ࠰ѣᝋࢨх Іऱٙд۞ϫᐂҜཉĄ੃଀ቁؠۏ͛фበᏭ஼̚ĂᏮˢଋຐֹϡ۞Вֳ Ąତ඾д Directoryڕ2 д Preferences ࢱѨ˯ĂԱ΍ Share Repository ࢬ 1 Ᏼፄ Tools|Environment OptionsĄ Options ၆ྖ஼̚Ᏼፄ࠹Т۞ Share Repository ϫᐂĈ ІऱĂಶυืд Environmentۏ۞ဥฤјࣶĂࡶ୬ֹϡଋ̶ֳٙ΍ֽ۞ Іऱ̶ֳගଋٙણᄃ۞̍үဥฤٕߏฟ൴̈௡Ą҃׎΁ۏଋ˵ਕ౅࿅შྮ૟ ІۏдဥฤЪүᒖဩ̚Вֳ 6 Ᏼፄ OKĄ Іऱ྆۞΃ܑဦϯĄۏٺІ΍னۏ5 Ᏼፄ BrowseĂϡͽ߄Ᏼྍ ᑒଋயϠ˘࣎າ۞ࢱѨĄົܮІऱۏ ҰᏮˢ۞ЩჍ̙хдĂڍࢱ۞ЩჍٕ۰д Page ኑЪ͞๴̚Ᏼ΍ྍࢱĄт 4 д New Items ၆ྖ஼̚ՙؠଋԓ୕ྍีϫ΍ன۞ࢱѨࠎңĂତ඾Ꮾˢྍ 3 Ꮾˢ׎ descriptionătitleăᄃ authorĄ RepositoryĄ дྍีϫ˯޷˭໣ဂ۞ΠᔣĂГᏴፄ Add Toܮॾٕߏྤफ़ሀ௡Ă֤ᆃ ߏܑ࣎ڍᏴፄ Project|Add To RepositoryĄтܮιߏ࣎૞९Ă֤ᆃڍ2 т ฟୁྍ૞९Ąܮߙ૞९̚Ă֤ᆃٺ1 ࣐ࡶྍีϫߏ࣎૞९Ăٕ۰Ҝ Іऱ̚ĂଋΞͽĂۏࡶࢋ૟ߙีϫΐҌ Іऱ۞ีϫ̚Ąۏזଋ˵ਕૉ૟ҋ̎۞૞९ăܑॾă॰ߛăͽ̈́ྤफ़ሀ௡ᆧΐ Іऱ̚ۏ૟ีϫΐҌ Ξͽҋனх۞ีϫ̚ࢉϠ΍˘࣎Бາ۞ีϫĂ֭ͷֶᅮࢋΐͽԼᄦĄ ѨĄдྍࢱ̚ĂЕ΍˞дѩ૞९྆۞ٙѣܑॾă၆ྖ஼ăͽ̈́ྤफ़ሀ௡Ąଋ ёऱ 8-27בฟ൴ᑕϡ඀ёă̮Іᄃ ˢ۞૞९̚ĄЯѩĂኛ˼༱͕̈ᖰຕֹϡĄ ၆ྍีϫٙઇ۞ՀજĂ૟ົТՎ΍னдֱ֤ͽ Inherit ٕ Use Ᏼี૟ีϫΐ ༊ଋԓ୕ϫ݈ٙᏴፄ۞ีϫតј૞९̚۞˘ొЊॡĂኛᏴፄ UseĄд૞९̚ ֹϡߊѣีϫ ߏ InheritĄܮІ۞Ķ઱˘ķᏴፄۏ࣎૞९̚Ăࢦᖬֹϡ ਕᚶ̝ٚγĂܑॾă၆ྖ஼ăͽ̈́ྤफ़ሀ௡࠰ΞֹϡĄдТ˘̙ۍ˞૞९ᇹ Іऱ྆۞ͭ΃ᙷҾĄੵۏᙷҾ̝˯Ăҭߏ၆ࢉϠ۞ᙷҾ۞Լត̙֭ົͅߍд Іऱ̝̚ีϫٙઇ۞ՀજĂ࠰ົͅߍҌٙࢉϠ۞ۏٙઇ۞ԼតĂٕЇң၆ྍ ҾĂ֭ͷ૟ѩາᙷҾΐҌଋ۞૞९̝̚ĄՏ༊ଋࢦາበᛌ૞९ॡĂд૞९̚ Іऱٙ̚Ᏼፄ۞ีϫĂ҃јࠎ˘࣎າ۞ᙷۏᏴፄ InheritĂΞͽᚶٚҋଋд ᚶٚߊѣีϫ ਕֹϡ Copy ఺࣎ᏴีĄ่ۍ૞९ᇹ Іऱ̚۞ีϫĄۏࣧАдז̈́گኑᄦݡٙઇ۞ՀજĂ˵Тᇹг̙ົٺ၆ Іऱ۞ีϫٙઇ۞ՀજĂ࠰̙ົͅߍҌଋٙᄦ۞ኑᄦݡ˯Ą҃ͷĂۏٺ၆ྍҜ ޢᏴፄ Copy Ξͽ૟ٙᏴፄ۞ีϫĂԆБኑᄦ˘ЊĂΐҌଋ۞૞९̝̚Ą͟ ኑᄦߊѣีϫ y Use(ֹϡ) y Inherit(ᚶٚ) y Copy(ኑᄦ) ளĂ౵кົѣˬ࣎ᏴีᏴፄтң૟ีϫΐҌଋ۞૞९̝̚Ĉ ΍னĂ֭ͷពϯ΍ٙѣΞϡ۞ีϫĄᐌ඾ଋٙຐֹϡ۞ีϫ҃ົܮ၆ྖ͞๴ Іऱ̚۞ีϫĂኛᏴፄ File|New|OtherĄତ඾ New Itemsۏפຐࢋхڍт Іऱ྆۞ีϫۏд૞९ֹ̚ϡ ϲĄޙΐͽົܮ дЩࠎ delphi32.dro ۞ᑫ९Ă֤ᆃ Delphi д Share Repository ٙ޽ؠ۞ϫᐂ˭̙хڍІऱॡĂтۏ༊າ۞ีϫజΐҌ ᄃ඀ёనࢍ͘Ίܝ8-28 ˢ Ξͽ૟ι̶ֳග׎΁۞ฟ൴۰Ąܮ̮Іٕߏ DLLĂ֤ᆃଋ ϲ۞˜ߏޙăٕߏ॰ߛĄ࣐ࡶଋٙۍϲ̮ІăDLLă̮Іᇹޙy ଂྍีϫ Іऱ̚Ąۏˢ ͽΩ˘̙࣎Т۞ЩჍΐ̖ޢy ૟ྍีϫኑᄦҌனҖ૞९̚Ăତ඾࣒ԼĂ౵ y ኑᄦྍีϫĂ֭ͷΪдଋ۞னҖ૞९̚ΐͽ࣒ԼĄ ͞९Ĉ ೀ჌ആ΃פ׎ι۞૞९ĂଋΞͽଳז̈́گྍีϫ۞૞९Ąࠎ˞ᔖҺѩՀજז ϡֹޢٙѣ͟זUse ٕߏ Inherit Ᏼีΐˢྍีϫ۞ߊѣ૞९ĂТॡ˵ົᇆᜩ ͽזІऱ̚۞ߙ˘ีϫĂ֤ᆃଋٙઇ۞Լត่̙ົᇆᜩۏٺ઄тଋ࣒Լ˞Ҝ ࣒ԼВֳีϫ ᇆᜩĄזצЯଋٙઇ۞Լត҃ົ̙֭ۍώ۞૞९ᇹ ޽ؠ۞ϫᐂ˭ĂଋΞͽд֤࣒྆Լ૞९Ąࣧז࠹ᙯᑫ९ኑᄦ۞ۍDelphi ૟ᇹ ཉ۞ϫᐂĄٸ4 д Select Directory(Ᏼፄϫᐂ)၆ྖ஼̚Ă޽ؠາ૞९̚ᑫ९ Ᏼፄ OKĄޢĂ൒ۍ3 Ᏼፄଋຐֹϡ۞૞९ᇹ 2 Ᏼፄ Projects ࢱѨĄ 1 Ᏼፄ File|New ͽពϯ New Items ၆ྖ஼Ą யϠ˘࣎າ۞૞९Ă֤ᆃ̚ۍຐࢋଂᇹڍؕᕇĄт ߏ˘჌࿰Аనࢍр۞૞९ĂΞͽઇࠎฟ൴̍ү˯˘̙࣎᏾۞ୁ˜ۍٙᏜ۞ᇹ ϡֹ۞ۍ૞९ᇹ ॾă၆ྖ஼ăͽ̈́ྤफ़ሀ௡࠰ΞᏴϡѩᏴีĄܑ ёऱ 8-29בฟ൴ᑕϡ඀ёă̮Іᄃ І̚Ą ಏ̮ů˵ಶߏᄲĂ૟ྍಏ̮ӣ߁дଋ۞૞९̚Ă̙҃ߏ૟ιాඕҌ VCL इ Ξͽֹϡ VCL ٙ̚ӣ۞ WinHelpViewerܮᘭඕ۞͞ё۞ྖĂCLX ᑕϡ඀ё ଳϡᐖڍCLX ݋ᅮࢋᑕϡ඀ёฟ൴۰೩ֻҋ̎۞၁үĄд Windows ˯Ăт ၁ү˞࠹ᙯ̬ࢬĂ֭ͷ೩ֻ˘࣎ాඕĂ૟ᑕϡ඀ёᄃ WinHelp ాඕ੓ֽć VCL ೩ֻ˘࣎ TWinHelpViewer ۞ᇹּගՏ˘࣎ᑕϡ඀ёĂTWinHelpViewer ШБા۞ Help Manager ොΊĄޢ۞˘࣎)Ă൒ ICustomHelpViewer ̬ࢬ(҃ͷĂΞᏴፄّг၁үࢉϠҋѩ̬ࢬ۞к̬࣎ࢬ̚ ϲ˘࣎ᙷҾĂѩᙷҾυื၁үޙІְଐĂᑕϡ඀ё۞ฟ൴۰υืࢋ ఺זĂ૟ Help ࢋՐ็ᅍගк࣎γొ Help ᕱᜓጡ̚۞˘࣎Ąҭߏຐઇڱ͞۞ ІࠎૄᖂۏVCL ᄃ CLX ౌ͚೯ଂᑕϡ඀ёពϯ Help ۞ΑਕĂ఺Αਕ౅࿅ͽ χฟᑕϡ඀ё̚۞ Help Αਕ 4 ޷˭ OKĄ ๴Ą͞פMain Form ८ פາ૞९࿰న۞͹ܑॾĂ݋Ᏼ ๴Ąࡶຐ޽ؠ۞ߏ͞פNew Form ८ פॾ(File|New |Form)Ă֤ᆃኛᏴ ߄Ᏼд Objects ̝˭۞ีϫĄ҃ࡶຐ޽ؠ۞ߏ࿰న۞າܑޢForms)Ă൒ Ᏼፄ˘ Repository ࢱѨ(ּтܮ3 ࡶߏຐ޽ؠ۞ߏ࿰న۞ܑॾĂ֤ᆃ ๴Ą͞פNew Project ८ פГᏴޢд Objects ̝˭۞ีϫĂ൒ ଋຐࢋ޽ؠ࿰న۞૞९̰टĂ֤ᆃኛᏴፄ Projects ࢱѨĂତ඾߄Ᏼڍ2 т 1 Ᏼፄ Tools|Repository Іऱ௡ၗ۞͞ёĂֽԼត఺჌ҖࠎĈۏؠ ពϯ˘࣎ԆБ۩Ϩ۞ܑॾĄ̙࿅ĂଋΞͽ౅࿅ࢦາనົܮ |Form ॡĂDelphi д࿰న۞ଐԛ̝˭ĂՏ༊ଋᏴፄ File|New Application ٕߏ File|New ࿰న૞९ăາܑॾăͽ̈́͹ܑॾ۞޽ؠ ᄃ඀ёనࢍ͘Ίܝ8-30 ˢ IHelpManagerĄ Ξͽᒔ଀ܮĄ༊ Help ᕱᜓጡොΊॡĂט఼ăซҖᗝγྤੈኛՐ۞፟ IHelpManager ݋೩ֻ˞ឰ Help ᕱᜓጡͅШ׶ᑕϡ඀ё۞ Help Manager ໛ ඀ё̖ົᅮࢋѩ˘̬ࢬĄ ᇾ໤ WinHelp ੈि۞ᑕϡܧณ̂זүѩ̬ࢬĂ҃ͷጐგтѩĂ˵่ѣֹϡ Windows ᒖဩ̚۞ᑕϡ඀ё̖ᅮࢋ၁ ٺͽ˘ਠ̼۞Ą˘ਠֽᄲĂΪѣྻү ΐٽĂ҃ͷ̙זWindows ̝˯۞ᑕϡ඀ёౌΞਕົତќ ٺᇹ۞ੈिĂેҖ ੫၆ WinHelp ੈि۞аᑕΑਕĄ఺ܝISpecialWinHelpViewer ೩ֻ۞݋ߏ૞ manipulation routines)ķݒΞਕߏᇾᗟ۞ЩჍ)Ą ࠎּĂιΞਕߏ Help ր௚̚۞ߙ࣎ᙯᔣфĂҭߏĶфҚ఍ந૱ё(string ёүࠎ੼ล۞ᙯᔣф(ͽĶIntToStrķבϯćд̂кᇴ۞ Help ր௚̚Ăͽᇾᗟ IExtendHelpViewer ݋೩ֻ˞ͽᇴфበЕ̝ Help ώ̰͛टĂͽ̈́ᇾᗟ۞ព ពϯߙপؠᕱᜓጡٙ̚ѣ̰ट̝ϫᐂЕܑ۞ΑਕĄ ᙯᔣф۞ Help ពϯΑਕĂТॡ˵೩ֻ˞ٺૄ˞ICustomHelpViewer ่̙೩ֻ Manager ώ֗۞၁үొЊĄ ఺ֱ̬ࢬБొౌؠཌྷд HelpIntfs.pas ̚Ăѩᑫ९Тॡ˵ӣ߁˞ Help Help ր௚Ă̯ధଋ۞ᑕϡ඀ё౅࿅˘րЕ۞̬ࢬᄃ Help ᕱᜓጡซҖ໛఼Ą Help ր௚̬ࢬ ϯௐ˘࣎аᑕ Help ր௚۞ᕱᜓጡĄ ඀ё۞ֹϡ۰ΞͽҋҖՙؠտౣ֤ຐϡ֤˘࣎ Help ᕱᜓጡĄӎ݋Ăιົព ពϯ˘࣎Ᏼፄ஼Ăឰᑕϡົܮ Info ౌොΊјࠎᕱᜓጡĂ֤ᆃ Help Manager Ăрͧߙ˘ᑕϡ඀ё૟ Manăځ࣐ࡶѣ˘࣎ͽ˯۞ᕱᜓጡ೩ֻྍᙯᔣф۞ᄲ ᕱᜓጡĄ۞ځჍιѣਕ˧೩ֻᄲކՏ˘࣎ Ăତ඾૟ Help ኛՐ็ᅍගځপؠ۞ Help ᙯᔣфٕߏώ̰͛ट(context)۞ᄲ ͽ׌ล߱۞඀Ԕ็ᅍගιࣇĈࢵАĂιົྙયՏ˘࣎ᕱᜓጡߏӎ೩ֻ˞ߙ˘ ኛՐĂ۞זHelp Manager ჯ᜕඾˘ҚགྷොΊ࿅۞ᕱᜓጡĂТॡ˵ົ૟ٙќ ёऱ 8-31בฟ൴ᑕϡ඀ёă̮Іᄃ ᓝּ҃֏Ă࣐ࡶྍᑕϡ඀ёజࢋՐពϯٙѣ)זΨײ྽ᕱᜓጡ۞ЩჍॡజ y ICustomHelpViewer.GetViewerName : String ົд Help Manager ຐࢋۢ ёĈבΨ˯ࢗ۞ײ˭ڶHelp Manager ົд˭Е۞ଐ y SoftShutDown y ShutDown y NotifyID y GetViewerName ёĈ בёϡͽ׶ Help Manager Ϲೱր௚ྤੈ۞בICustomHelpViewer ೩ֻα࣎ ׶ Help Manager ໛఼ Ąڱϫᐂ۞͞ ćពϯ̰टڱពϯϤ Help Manager ٙ೩ֻ۞ᙯᔣф׎࠹ᙯ Help ̰ट۞͞ Ğᓝּ҃֏Ăྫྷপؠ۞ Help ࢋՐ൑ᙯ۞ྤੈğćϡͽڱϹೱր௚ᆸྤੈ۞͞ Ĉϡͽ׶Help ManagerڱICustomHelpViewer఺̬࣎ࢬĂΒӣ˞ˬ჌ᙷݭ۞͞ ICustomHelpViewer ۞၁ү ϒдֹϡ۞̬ࢬ̍׍ะ(widget set)ăٕߏᙷҾऱ҃ᇆᜩĄ צHelp Manager ̝̚Ăֹ଀ Help Manager ۞඀ёቅΞͽԆБг̙ ٺޙ̰ ତۡܧ֭˧೩ֻ̰टϫᐂ۞ពϯΑਕĄ఺ᇹ̄۞ពϯਕ˵ט˘࣎ĄТॡѩ፟ ᕱᜓጡ࠰ѣਕ˧఍நߙ˘ Help ኛՐ۞ॡ࣏ĂΞͽྙયֹϡ۰տౣࢋֹϡ֤ дТॡѣк࣎ܮĄͽטIHelpSelector ೩ֻ˞ឰ Help ր௚Ψϡֹϡ۰̬ࢬ۞፟ ՐĄ Ξͽдዋ༊۞ॡ፟Ăۡତ൴ਖ਼ Help ኛܮ˘ֽĂдᑕϡ඀ё̚۞׎΁඀ёቅ Іᇹּ(instance)Ă֭ͷϡপّ۞͞ёΐͽӔனćтѩۏIHelpManager ̬ࢬ۞ Ξᒔ଀˘࣎၁ү IHelpSystem ᄃܮ ր௚Ą༊ᑕϡ඀ёజྶˢĂTApplication ݋ߏឰ TApplication Ξ૟ Help ኛՐ็ᅍග HelpטIHelpSystem ٙ೩ֻ۞፟ ᄃ඀ёనࢍ͘Ίܝ8-32 ˢ ଀˯ࢗ Help ᑫ९۞ٙдྮशĄפy ኛՐ Іྤੈ۞ Help ᑫ९Ą̮טၗ̝ଠې active ٺϫ݈఍ ଀ Help ᑫ९۞ЩჍĂѩᑫ९˜ߏ Help Manager ٙᄮࠎᑕྍΒ߁פy ኛՐ І۞ෛ඄ handleĄ̮טၗ۞ଠې active ٺ଀ϫ݈ϒ఍פy ኛՐ ឰ Help ᕱᜓጡѣਕ˧׶ Help Manager ซҖαᙷ໛఼Ĉ ிᕱᜓጡШ Help Manager ොΊॡĂа็ᇹּග఺ֱᕱᜓጡĄIHelpManager Help ᕱᜓጡ౅࿅ IHelpManager ̬ࢬ׶ Help Manager ࠹໛఼Ąѩ̬ࢬົд Ш Help Manager ྙયྤੈ ᕱᜓጡĄྶעពϯ۞ Help ྤੈğ̙҃ࢋ Help ᕱᜓጡ૟ϫ݈ Help ր௚ѣពϯ۞ొ̶ගᙯౕĞᓝּֽᄲĂෛ඄ٙ ΨĂϡֽࢋՐײy ICustomHelpView.SoftShutDown ߏϤ Help Manager ٙ ΐͽેҖĄֽڱ˘࣎͞ જүౌ؎ࠁග఺۞ٸᛉଋ౵р૟ٙѣྤ໚ᛖޙଫĄٸѣྤ໚ౌᑕྍజᛖ Help ᕱᜓጡĂManager ϒд௣ඕેҖ̚Ă҃ͷ Help ᕱᜓጡٙ੨ཉ۞ٙ ΨĂϡͽ఼Әײy ICustomHelpView.ShutDown ݋ߏϤ Help Manager ΐͽ ׎΁൑ฆ۞ᕱᜓጡણ໰)Ą˞ٸਕᛖ ਕ೩ֻѩ΃ቅٕ۰ߏ೩ֻ˞᏾ᄱ۞΃ቅĂౌົֹ଀ Help Manager ѣΞ ٙѣ၆ྍᕱᜓጡ۞ણ໰Ą(Ϗٸ̎۞ᙊҾ΃ཱིĂͽֹ Help Manager Ξͽᛖ Help Manager ۞఼Әੈिॡ)ĂιυืӘۢ Help Manager ιҋ ٺֽҋ аᑕڱϡć઄ࡶᕱᜓጡҋҖ௣ඕ(҃൑ֹ۞ޢ૟ѩྤੈᐼх੓ֽĂͽ౯ൾ Ăϡͽ೩ֻᕱᜓጡ˘࣎፾˘൑˟۞ᙊҾ΃ཱིĄυืזΨײజޢΊજү̝ y ICustomHelpViewer.NotifyID(const ViewerID: Integer)݋ົĶღྫྷдķො ̮ะĞMultibyte character setğĄ а(఺ຍᏜ඾ྍфҚдᑕϡ඀ё۞ેҖॡഇ૟̙ਕԼត)Ą̙͚೯кҜ̮ф ොΊᕱᜓጡ۞Еܑॡ)Ą఺ᇹ̄۞ྤੈົͽទᏭ˯۞ᐖၗфҚԛёజ็̏ ёऱ 8-33בฟ൴ᑕϡ඀ёă̮Іᄃ y ShowHelp y GetHelpStrings y UnderstandsKeyword Ĉڱᙯᔣф۞ Help ˯Ă೩ֻ˞ˬ࣎͞ٺICustomHelpViewer д఍நૄ ώ̰͛ट̝ Help ኛՐĄٺIExtendedHelpViewer ˘ؠ଀͚೯၆ૄ ᙯᔣф̝ Help ኛՐĂ҃ٺICustomHelpViewer ۞၁үâؠ଀͚೯ૄ ᑕϡ඀ёֹ̚ϡĂЯࠎ̂кᇴ Linux ۞ Help ր௚ౌ̙ᄮ଀఺჌ԛёĄ ᛉд CLXޙ۞݋ߏ WinHelp ր௚ćᔵ൒ CLX ˵೩ֻ˞఺჌͚೯Ăҭߏ̙֭ ො ͽᇴфበЕ۞ Help ώ̰͛टߏ Windows ˯ᑕϡ඀ё۞࿰నԛёĂ׎ֹٙϡ िĄੈځᙊҾቅ۞ Help ᄲ ѩᇴфٺኛՐĄѩᙷ۞ኛՐ޽ؠߙ˘পؠ۞ᇴфᙊҾቅĂࢋՐᕱᜓጡ೩ֻᙯ ͛І̰टķ۞ HelpٺिĄΩ˘჌݋ߏٙᏜ۞Ķૄੈځᕱᜓጡ೩ֻ׎ Help ᄲ ф(keyword-based)ķ۞ Help ኛՐĄѩᙷ۞ኛՐ޽ؠߙ˘পؠ۞фҚĂࢋՐ ᙯᔣٺHelp ኛՐ఼૱ߏ౅࿅׌჌͞ё׶ Help ᕱᜓጡ࠹ତĄ˘჌ߏٙᏜĶૄ ᙯᔣф۞ Help ྤੈٺពϯૄ Manager ൴Ϡ˞̙Ξ࿰ഇ۞ᕝቢଐဩĄ ఼ۢ HelpٺICustomHelpViewer.ShutDown ۞ኛՐॡజΨϡćι่ਕజϡ ι׶ Help Manager ̝ม۞఼ੈĄιĶ̙ᑕྍķдаᑕ IHelpManager.ReleaseĂ݋ߏజ Help ᕱᜓጡ఼ۢ Help ManagerĂιϒд̚ᕝ ि۞ᑫ९ĄੈځٙᄮࠎΒӣ׎ᄲ І̮טၗ۞ଠې active ٺΨĄѩ Help ᑫ९˜ߏϫ݈఍ײΐͽົܮЩჍॡĂ IHelpManager.GetHelpFile: StringĂ༊ Help ᕱᜓጡԓ୕ۢ྽ߙ Help ᑫ९۞ ߏෛ඄۞ handleĄڍΨĄ็аඕײΐͽົܮІ׎ handle ॡĂ̮טၗ̝ଠې active ٺIHelpManager.GetHandle: LongIntĂд Help ᕱᜓጡᅮࢋۢ྽ϫ݈఍ Help ManagerĄ y ឰ Help ᕱᜓጡҋԧ௣ඕĞ̙ߏЯࠎ Help Manager ۞ᙯܼğॡਕૉ఼ۢ ᄃ඀ёనࢍ͘Ίܝ8-34 ˢ y ShowTableOfContents y CanShowTableOfContents ĈڱICustomHelpViewer дពϯ̰टϫᐂ˯Ă೩ֻ˞׌࣎࠹ᙯ۞͞ ពϯ̰टϫᐂ ΨĄײĂ̖ѣΞਕజޢΨ࿅̝ײᙋົд UnderstandsKeyword Аజ ć҃ͷܲڱΨ۞͞ײ࣎జ˘ޢĄ఺ߏፋ࣎࿅඀̚౵זΨײ జ Help Manager िॡĂੈځົд Help Manager ᅮࢋ Help ᕱᜓጡពϯߙ˘পؠᙯᔣф۞ᄲ ICustomHelpViewer.ShowHelp(const HelpString: String) Ąځᔣф۞ᄲ ࣎фҚĂՏ˘࣎࠰΃ܑ͘Ί̚۞˘༼Ă҃ͷдιࣇ۞ிкࢱࢬ̚ӣѣ၆ྍᙯ ߏ୮൑ຍཌྷ۞)ć҃ࡶߏ Man page ᕱᜓጡĂٙ็а۞фҚᙥඕ̚݋ົΒӣк р˘࣎фҚ(HyperHelp ೩ֻ˞ҋ֗۞৶͔ăͽ̈́ኑώĂѩኑώдι఍Ξਕ ߏ HyperHelp ᕱᜓጡ۞ྖĂιٙ็афҚᙥඕ̚Ă૟Ϊӣѣޫڍώ֗Ąт ᕱᜓጡٺՙפтңயϠ၆ᑕĂ݋Ξٺٙѣࠎྍᙯᔣфٙ೩ֻ۞ࢱࢬĂҌזᑕ Ąᕱᜓጡᑕϡ็а˘ TStringListĄдٙ็аᙥඕ̚۞фҚĂౌᑕྍ၆זΨײ ົдТॡѣк࣎ᕱᜓጡ࠰Ξ೩ֻߙ˘ᇾᗟ۞ Help ੈिॡĂజ Help Manager ICustomHelpViewer.GetHelpStrings(const HelpString: String): TStringList ώ̙֭ܲ̚ᙋтѩĄۍĂ̙࿅дϏֽ۞ޥ ۞͚೯Ă֤ᆃᕱᜓጡಶᑕྍ็а࿬Ą࢑ᇴࣃдϫ݈ົజྋᛖј׶࿬˘ᇹ۞ຍ ჯ᜕ҋ̎۞৶͔֭ͷΐͽຩವ۞͞ёֽ྿јĄ࣐ࡶᕱᜓጡ̙֭೩ֻྍᙯᔣф ңιҋ̎ຐϡ۞͞ёֽՙؠ఺࣎ඍ९Ǖд IDE ̚ĂHyperHelp ᕱᜓጡߏ౅࿅ ιࡶࢋពϯྍ Help ྤੈĂᅮࢋк̙͌࣎Т۞ Help ࢱࢬĄᕱᜓጡΞͽֹϡЇ ߏӎࠎྍфҚ೩ֻ˞͚೯ćᕱᜓጡநኢ˯ᑕྍࢋаᑕ˘࣎ፋᇴࣃĂϡֽ΃ܑ ΨՏ˘࣎̏ොΊ۞ Help ᕱᜓጡĂϡͽྙયྍᕱᜓጡײ˘гͽ࠹Т۞фҚֽ ĄHelp Manager ົు۞זΨײĂࢵАົజ Help Manager ٙ̚ڱߏˬ࣎͞ ICustomHelpViewer.UnderstandsKeyword(const HelpString: String): Integer ёऱ 8-35בฟ൴ᑕϡ඀ёă̮Іᄃ Ψײ༊ᑕϡ඀ё۞ֹϡ۰޷˭˞ F1 ॡĂHelp Manager ૟ົ ˞၆ᇾᗟ۞͚೯Ą ̰ट۞ Helpć҃׎ዶ۞׌࣎ůUnderstandsTopic ͽ̈́ DisplayTopicsů݋೩ֻ ώ͛ٺUnderstandsContext ͽ̈́! DisplayHelpByContentů࠰జϡֽ͚೯ૄ ёĄ׎̚۞׌࣎ůבIExtendedHelpViewer ၆γ೩ֻ˞α࣎ ጡົҋજࠎଋ఍நĄ WinHelp ᕱᜓ ۞ޙߙֱ੼ล۞ᇾᗟĂ̙҃ಏΪߏֹϡᙯᔣф۞ຩವĄ̰ז ր௚࠹໛఼ĄIExtendedHelpViewer ˵೩ֻ˞࠹ᙯ۞͚೯ĂֹଋΞͽۡତгྯ ώ̰͛ट Help ۞ٺϡૄֹטΞͽ׶ֱ֤ࢨܮү IExtendedHelpViewerĂᖣѩ ІĂֹιТᇹг˵၁ۏ̝ ᑕϡ඀ёΞͽؼҩ˘࣎̏၁ү ICustomHelpViewer Help ր௚υืҋҖᖼೱྍበཱིĄ ϡ඀ёυืͽώ̰͛टֽΨ੓ Help ր௚Ă̙҃ߏͽфҚֽΨ੓Ąтѩ˘ֽĂ ώ̰͛ट۞ Help ͞ёĄᑕٺᑕϡ඀ёĂ҃υื೩ֻૄ˞ט఺ᇹ̄۞ր௚ࢨ ࠎᑕϡ඀ёٙ଀ۢĄڱHelp ր௚̰ొĂЯѩ൑ ٺЪд˘੓Ą҃఺჌ҖࠎΪх ր௚(͍׎ߏ WinHelp)ྻү۞͞ёĂߏ૟ᇴф(ώ̰͛ट۞በཱི)׶ᙯᔣфඕ ᙯᔣф۞ Help ೩ֻ˞ۡତ۞͚೯Ąѣֱ HelpٺICustomHelpViewer ่ࠎૄ IExtendedHelpViewer ۞၁ү ShowTableOfContents ۞ኛՐĄ ர˞نд CanShowTableOfContents аᑕ˞ True Ăಶ̙ᑕྍ ICustomHelpViewer ۞၁үֽᄲĂࡶ ٺۡତг็ᅍග HyperHelpĄ൒҃Ă၆ HyperHelp ᕱᜓጡ݋೩ֻ˞၆̰टϫᐂ۞͚೯Ăιົ૟ពϯ̰टϫᐂ۞ኛՐ Man page ྻү۞͞ёć̙࿅Ă ז༊۞၆ᑕޫޝĂ̙֭ਕهटϫᐂ۞఺჌ໄ ѣ˘ᕱᜓጡ١඗೩ֻ̰टϫᐂ۞࠹ᙯኛՐĂϺᛳЪநĄЯࠎ̰ܮኛկ੃Ăӈ ICustomHelpViewer.ShowTableOfContents ֽಓ੓পؠ۞ Help ᕱᜓጡĄ ΨײBoolean Ăᖣͽྙયٙѣ۞ Help ᕱᜓጡĄତ඾ Ψ ICustomHelpViewer.CanShowTableOfContents:ײManager ࢵАົ ёߏ࠹Ҭ۞ĈHelpבᙯᔣф۞ Help ኛՐٺࣧந׶ૄ۞ޢ׎ྻү࿅඀ࡦ ᄃ඀ёనࢍ͘Ίܝ8-36 ˢ ჍѣކTStrings ̚۞̰टâ࣎ତ˘࣎ĂΞਕߏ௑Ъ۞ᙯᔣфĂ˵ѣΞਕߏ TStrings ઇࠎણᇴĂѩ צSelectKeyword ͽ̈́ TableOfContentsĄ఺˟۰ౌତ ёĈבොΊ˘Њ೩ֻ IHelpSelector ̬ࢬ۞၁үĄIHelpSelector ၆γ೩ֻ˞׌࣎ ࠎ˞д˯ࢗ۞ଐԛ̚ĂԼត Help Manager ۞ՙؠ͞ёĂᑕϡ඀ёҋ̎υื ҭߏͽ˯۞ҖࠎߏΞͽజᑕϡ඀ёԼត۞Ą ॡĂHelp Manager д࿰న۞ଐԛ̝˭Ă˵ົᏴፄௐ˘࣎аᑕ۞ Help ᕱᜓጡĄ Ⴭιѣਕ˧೩ֻ͚೯۞ᕱᜓጡĄҭࡶߏ൴Ϡдᙯᔣфٕ۰̰टϫᐂކ˘࣎ ΍ֽĄࡶߏ൴Ϡдώ̰͛टٕߏᇾᗟॡĂHelp ManagerĶυؠΪົķᏴፄௐ Ⴭιࣇѣਕ˧೩ֻ̰टϫᐂॡĂHelp Manager υืҋ׎̚߄Ᏼ˘۰ކٕߏ ჍιࣇΞͽࠎߙ˘ගؠ۞ᙯᔣфăώ̰͛टăᇾᗟ೩ֻ͚೯Ăކ۞ᕱᜓጡĂౌ IHelpSelector ˜ߏ׶ ICustomHelpViewer ˘੓ລ੨ֹϡ۞Ą༊ѣк࣎̏ොΊ IHelpSelector ۞၁ү ݋జϡֽΨ੓̏ොΊᕱᜓጡ̚Ăௐ˘࣎аಡਕૉ೩ֻྍᇾᗟ۰Ą IExtendedHelpViewer.DisplayTopic(const Topic: String) జϡֽు˘гྙયՏ˘࣎ Help ᕱᜓጡĂᑭෛιࣇߏӎ͚೯ߙ˘ᇾᗟĄ IExtendedHelpViewer.UnderstandsTopic(const Topic: String): Boolean ёĂ׎ྻү͞ёϺТĈב͚೯ᇾᗟ۞ dedHelpViewer. yHelpByContext(const ContextID: Integer; const HelpFileName: String) IExten Displa ΨĈײĂົޢHelp Manager дྙયԆٙѣ̏ොΊ۞ᕱᜓጡ̝ ۞ᕱᜓጡົజΨ੓ֽĄ ࣐ࡶѣк࣎ͽ˯۞ᕱᜓጡ࠰͚೯˞ߙ˘পؠ۞ώ̰͛टॡĂ่ѣௐ˘࣎ොΊ ጡĂ఺˘ᕇߏ׶ ICustomHelpViewer.CanShowKeyword ˘ᇹĄҭ̙Т۞ߏĂ ᙯᔣф۞ HelpĄHelp! Manager ົు˘гྙયٙѣ̏ොΊ۞ Help ᕱᜓٺ ૄܧ҃ ώ̰͛ट۞ Helpٺ͚೯ૄົܮІ̮טၗ۞ଠې active ٺ֤ᆃϫ݈఍ const HelpFileName: String): Boolean IExtendedHelpViewer.UnderstandsContext(const ContextID: Integer; ёऱ 8-37בฟ൴ᑕϡ඀ёă̮Іᄃ HelpSystemĂᖣͽซҖ Help selector ۞ොΊĈ І۞পّۏ ߱རυื౅࿅Бા۞ Application̼ؕܐ҃၁үಏ̮۞ Әд၁үಏ̮۞ var ߱ར̚Ąކ۞ᇹּυืజ ІۏHelpIntfs ͽ̈́ QFormsĄྍ זІ၁ү̰ट۞ಏ̮(unit)υืֹϡۏΒӣ ොΊ Help Selector IHelpManagerĄѩ IHelpManager ᑕྍజᐼх˭ֽĂͽઇࠎϏֽ̝ϡĄ ࣎ݭၗࠎ ICustomHelpViewer ۞ણᇴĂ֭ͷ็а˘צёĂιତב఼ ёĄRegisterViewer ߏϤ HelpIntfs.pas ٙ၆γ೩ֻ۞೼בRegisterViewer ఺࣎ ߱རυื޽ࠁྍᇹּតᇴ̝ࣃĂ֭ͷ૟ι็ᅍග̼ؕܐ҃၁үಏ̮۞ Әд၁үಏ̮۞ var ߱ར̚Ąކ І۞ᇹּυืజۏHelpIntfsĄྍ זІ၁ү̰ट۞ಏ̮(unit)υืֹϡۏΒӣ ොΊ Help ᕱᜓጡ y ොΊ Help Selector y ොΊ Help ᕱᜓጡ ІĂଋυืۏࡶࢋ׶ Help Manager ොΊ఺ֱ Help ۞ր௚ ืШ Help Manager ොΊĄ Іౌυۏ۞ IExtendedHelpViewerăISpecialWinHelpViewerăᄃ IHelpSelector ࠎ˞׶ Help Manager ࠹໛఼Ăٙѣ၁ү ICustomHelpViewer ă І۞ොΊۏHelp ր௚ Ⴝ࠰εΝड़ϡĄ Ă̝݈ٙѣᖞ۞ selectorޢHelpSelectorć༊ߙ˘࣎າ۞ selector ซҖොΊ IHelpSelector ۞၁ү۰౵р̙ࢋ఺ᆃઇĄHelp ր௚ТॡมΪ͚೯Ķಏ˘࣎ķ ᛉޙ׎̚۞фҚజࢦາщଵ࿅۞ྖĂHelp Manager Ξਕົຣ஄ćЯѩڍො т ̚)ĂϡͽܑϯజᏴፄ۞фҚĄ ਕ˧೩ֻ̰टϫᐂ͚೯̝ᕱᜓጡ۞ЩჍĄ၁ү۰υื็а׎৶͔(д TStrings ᄃ඀ёనࢍ͘Ίܝ8-38 ˢ পّࣃĈHelpTypeăHelpFileăHelpContextăͽ̈́ HelpKeywordĄ α࣎۞זІĂ࠰၆γ೩ֻ˞జ Help ր௚ٙϡ̮טٙѣࢉϠҋ TControl ۞ଠ ఍ந Help ۞͞ёีטVCL ଠ Ą۞פх ր௚۞ྤफ़јࣶ็ᅍ΍ΝĂ఺࣎ྤफ़јࣶߏΞͽ౅࿅ HelpSystem পّٙۡତ ౅࿅ TApplication ϡֽܑϯ Helpޢ଀็ᅍ࿅ֽ۞ྤफ़Ă൒פົౌڱ఺α࣎͞ HelpJump ࢋՐពϯপؠ͹ᗟ۞HelpĄ ᙯᔣф۞HelpኛՐಓ੓Helpր௚ĄٺHelpKeyword ͽૄ ώ̰͛ट۞HelpኛՐಓ੓Helpր௚ĄٺHelpContext ͽૄ ၁үĄ ٙ็ᅍ۞HelpࢋՐΪਕ็ගIspecialWinHelpᕱᜓጡ۞ט౅࿅఺ᙷ፟ ଀Windows Help ݭၗ HELP_COMMAND֭ͷர࿅WinHelpĄפ HelpCommand ڱܑ8.5 дTApplication྆۞Help͞ ĈڱVCL ྆۞ TApplication ೩ֻα࣎Ξឰᑕϡ඀ёቅֹϡ۞͞ TApplication тң఍ந VCL Help y ֹϡ IHelpSystemĄ Ψ Help ր௚Ąײy ۡତ тң఍ந HelpĄีטy VCL ଠ y TApplication тң఍ந VCL! HelpĄ ˭ࢬ۞ೀ༼ྋᛖтңд VCL ᑕϡ඀ёֹ̚ϡ HelpĄ д VCL ᑕϡ඀ёֹ̚ϡ Help ѩ඀Ԕ̙֭ົ็аЇңࣃĄ Application.HelpSystem.AssignHelpSelector(myHelpSelectorInstance) ёऱ 8-39בฟ൴ᑕϡ඀ёă̮Іᄃ ᙯᔣф۞ Help ኛՐಓ੓ Help ր௚Ąٺy KeywordHelpĂͽૄ ώ̰͛ट۞ Help ኛՐಓ੓ Help ր௚Ąٺy ContextHelpĂͽૄ ගᑕϡ඀ё̚۞඀ёቅֹϡĈڱTApplication ೩ֻ˞׌࣎͞ TApplication ఍ந Help ۞͞ё y IHelpSystem ۞ֹϡ Ψ Help ր௚ײy ۡତ Ітң఍ந Help̮טy CLX ଠ y TApplication тң఍ந Help ତ˭ֽ۞ೀ༼૟ྋᛖтңд CLX ᑕϡ඀ёֹ̚ϡ HelpĄ д CLX ᑕϡ඀ёֹ̚ϡ Help Ψ InvokeHelpĄײĂົ̚ڱ͞ ҋજயϠ Help ੈिĂ఺ߏЯࠎ TWinControl ۞ KeyDownົܮޢ д޷˭ F1 ĄڱІ͚ٙ೯̝ Help ݭၗ۞̮͞טІ྆௑Ъྍଠۏ ΨБા ApplicationײιΞ૟ኛՐ็ᅍග Help ր௚Ąι̙ื็ˢણᇴĂ҃ͷົ ΨײĂӈ InvokeHelpĄڱІ˵၆γ೩ֻ˞˘̮࣎͞טੵ˞఺ֱপّ̝γĂଠ পّࣃ۞̰टĄ ώ̰͛ट۞ HelpĂ҃ͷΪົдͼ HelpContextٺІᑕྍֹϡૄ̮טᄮࠎྍଠ HelpType జనј htContextĂ֤ᆃ Help ր௚ົ ڍপّࣃ۞̰टĄ࠹ͅ۞Ăт ᙯᔣф۞ HelpĂ֭ͷ Help ր௚˵Ϊົдͼ HelpKeywordٺІᑕྍֹϡૄ̮ טHelpType జనј htKeywordĂ֤ᆃ Help ր௚ົᄮࠎྍଠ ڍёֽ྿јĄт ώ̰͛ट۞͞ٺᙯᔣф۞ԛёĂԺٕߏ౅࿅ૄٺ୕ѩ̮І۞ Help ߏ౅࿅ૄ І۞నࢍ۰ԓ̮טHelpType পّΒӣ˞ߙ࣎Еᓝݭၗ۞ᇹּĂϡͽܑϯѩଠ ᄃ඀ёనࢍ͘Ίܝ8-40 ˢ Ąѩ˘পّ˜ߏ IHelpSystem ̬ࢬ۞˘࣎၁үᇹּĄIHelpSystem ᄃפ TApplication ೩ֻ˞˘࣎઱᝝۞পّࣃĂ̯ధԧࣇ၆ Help ր௚ซҖۡତ۞х ೩ֻĄࠎѩĂט̪൒ѣֱ Help ր௚۞ΑਕĂ֭ϏϤ VCL ٕ CLX ۞፟ Ψ Help ր௚ײۡତ Ψ InvokeHelpĄײĂົ̚ڱ͞ ҋજயϠ Help ੈिĂ఺ߏЯࠎ TWidgetControl ۞ KeyDownົܮޢ д޷˭ F1 ĄڱІ͚ٙ೯̝ help ݭၗ۞̮͞טІ྆௑Ъྍଠۏ ΨБા ApplicationײιΞ૟ኛՐ็ᅍග Help ր௚Ąͦื็ˢણᇴĂ҃ͷົ ΨײĂӈ InvokeHelpĄڱІ˵၆γ೩ֻ˞˘̮࣎͞טੵ˞఺ֱপّ̝γĂଠ ώ̰͛ट۞ HelpĂ҃ͷΪົдͼ HelpContext পّࣃ۞̰टĄ ٺІᑕྍֹϡૄ̮טHelpType జనј htContextĂ֤ᆃ Help ր௚ົᄮࠎྍଠ ڍ֭ͷ Help ր௚˵Ϊົдͼ HelpKeyword পّࣃ۞̰टĄ࠹ͅ۞Ăт ᙯᔣф۞ HelpĂٺІᑕྍֹϡૄ̮טhtKeywordĂ֤ᆃ Help ր௚జᄮࠎྍଠ HelpType జనј ڍιĄтזёֽ྿јĄ׎ዶ۞׌࣎পّࣃ࠰ົాඕ ώ̰͛ट۞͞ٺᙯᔣф۞ԛёĂԺٕߏ౅࿅ૄٺ୕ѩ̮І۞ Help ߏ౅࿅ૄ І۞నࢍ۰ԓ̮טHelpType পّΒӣ˞ߙ࣎Еᓝݭၗ۞ᇹּĂϡͽܑϯѩଠ পّࣃᑕྍ঻ϨĄ ௚̚Ă҃ѩր௚ॲώಶ̙நົᑫ९۞ЩჍॡ(ּтĂMan page ր௚)Ă֤ᆃѩ γд۞ Help րٺІ̝ Help ٙд̝ᑫ९۞ЩჍć࣐ࡶྍᑫ९Ҝ̮טӣѣྍଠ ّࣃĈHelpTypeăHelpFileăHelpContextăͽ̈́ HelpKeywordĄHelpFile ᑕྍ α࣎প۞זІĂ࠰၆γ೩ֻ˞ Help ր௚ٙϡ̮טٙѣࢉϠҋ TControl ۞ଠ Ітң఍ந Help̮טCLX ଠ ఺ֱྤफ़јࣶĄפଂ HelpSystem ఺࣎઱᝝পّ̚ĂΞۡତ᝝ ёТॡ౅࿅΃ܑ Help ր௚̝ TApplication ۞ྤफ़јֽࣶᖼϹѩኛՐĂב࣎ ࣎ણᇴĂ˵ಶߏ૟జ็ᅍ۞ώ̰͛टٕߏᙯᔣфĄ఺׌˘צё࠰ତב఺׌࣎ ёऱ 8-41בฟ൴ᑕϡ඀ёă̮Іᄃ y Hook y ShowTableOfContents y ShowTopicHelp y ShowContextHelp y ShowHelp help ྤੈĈ ёĂϡͽࢋՐ Help Manager ពϯבIHelpSystem ၆γ೩ֻ˞α࣎඀Ԕᄃ˘࣎ ଀Հк۞ણ҂ྤੈĄפ֍ௐ 8 ౢ̚۞ĶIHelpSelector ۞၁үķొЊĂ૟Ξͽ ֻ help ྤੈॡĂ̙υϤ Help Manager Ᏼፄտౣࢋឰ֤˘ֽ࣎఍நĄኛଋણ ۞̍ү؎Ї΍ΝĄ˵ಶߏ༊к࣎γࠧ۞ Help ր௚ౌਕૉࠎТᇹ۞ᙯᔣф೩ Help selector ۞޽ؠĂֹ଀ Help Manager Ξͽԯՙؠֹϡࣹइ Help ր௚ ᕱᜓጡࢋՐॡ̖ົШγ็ᅍ΍ΝĄğ ѩ˘ྤੈĄĞѩྤੈΪѣд Helpז଀ֽڱ͞ IHelpManager ۞۞ GetHelpPath ౅࿅ڱ೩ֻѩ˘ྤੈĄ఺ֽ࣎͞ڱ͞ IHelpSystem ۞ ProvideHelpPath ቁᄮ Help ᑫ९Ҝཉ۞γొ Help ր௚ٙ೩ֻॡĂ֤ᆃಶυื౅࿅ڱ࣎൑ ᑕϡ඀ё࿰ഇ Help ߏϤ˘ڍቁᄮ Help ᑫ९۞ҜཉĄтڱր௚൑ᙯĂٙͽ൑ ࢦࢋ۞ĂЯࠎHelp Manager׶πέिि࠹ᙯĂҭ׶Helpޝྮशྤੈ۞೩ֻߏ y ࢋՐ Help Manager ពϯ Help ྤੈĄ y ೩ֻາ۞ Help selectorĄ y ࠎ Help Manager ೩ֻྮशྤੈĄ ᇹְଐĈˬזIHelpSystem ֹᑕϡ඀ёਕ夠ઇ IHelpSystem ۞ֹϡ Manager ໛఼Ą ඀ё଀ͽ׶ Help Manager ໛఼â۰݋ϡֹֽ Help ᕱᜓጡ଀ͽ׶ Help Іٙ၁үĂΪ̙࿅˘۰ϡֽឰᑕϡۏIHelpManager ఺׌̬࣎ࢬĂ࠰ϤТ˘࣎ ᄃ඀ёనࢍ͘Ίܝ8-42 ˢ 1 ቁؠ၁ү Help ᕱᜓጡ۞ಏ̮(unit)̚ĂΒӣ˞ Helpintfs.pas ఺࣎ᑫ९Ą ࡶࢋШፋЪฟ൴ᒖဩොΊҋ̎ࢎᄦ۞ Help ᕱᜓጡĂ׎ՎូߏĈ ICustomHelpViewerĄ ଋٙᏴፄ۞γొᕱᜓጡĂତ඾ଋГШፋЪฟ൴ᒖဩොΊྍ ᅮࢋ۞ྖĂ˵ኛ၁ү IExtendedHelpViewer) ֽ૟ Help ኛՐᖼϹගڍͷĂт І (҃ۏ۞ ѣ̦ᆃ׌ᇹĄ઱˘۞मҾߏĂଋࢋᇤᆷ˘၁ү ICustomHelpViewer ׶఍ந CLX ᑕϡ඀ё՟ڱࡶຐдፋЪฟ൴ᒖဩщ྅າ۞ Help ᕱᜓጡĂ׎͞ 始碼可於範例目錄中尋得。 能運作,所以不能加以移除;Man page 瀏覽器是附在另一個套件中,其原 ፟ጡ˯۞ Man ր௚ĄЯࠎ၆ Kylix ۞ Help ֽᄲâؠࢋѣ HyperHelp 才 кᇴ Unix̂ٺщ྅פᑫ९ਕૉజᑭෛĄ҃ Man page ᕱᜓጡ݋ឰଋ଀ͽх ۰݋ឰ Kylix ۞ HelpޢጡĄ݈۰ឰ Help ኛՐΞͽజᖼਖ਼ග HyperHelpĂ҃ ׌࣎ Help ᕱᜓጡĈHyperHelp ᕱᜓጡͽ̈́γొ۞ WinHelp ሀᑢ˞ܢ IDE VCL ֹϡТ˘࣎ WinHelpViewer Help Manager ݋ົ૟఺ֱኛՐᖼϹග̏൳੃ොΊ۞ Help ᕱᜓጡĄIDE ྫྷ ᑕϡ඀ё՟ѣ̦ᆃ׌ᇹĈιົ૟ Help ኛՐ؎ࠁග Help Manager ఍நĂ҃ Delphi ۞ፋЪฟ൴ᒖဩ˵͚೯˞к჌̙Т۞ Help ᕱ ᜓ ጡĂಶ ྫྷ VCL ٕ CLX ࢎᄦፋЪฟ൴ᒖဩ۞ Help ր௚ ૟ help ኛՐ็ᅍග Help ManagerĂ׎ड़˧࠹ඈҭݒՀ୻຾Ąڱ͞ InvokeHelp І۞̮טᇾᗟ۞ help ੈिĂӎ݋ֹϡଠٺࢋߤྙ۞ߏૄܧ˘ਠֽᄲĂੵ хд۞ Help ᑫ९ЩჍĄ ࣎ણᇴĈ୬ኛՐ۞ᙯᔣфăώ͛ᙊҾቅĂٕߏᇾᗟăͽ̈́࿰ഇ׎ help ྤੈٙ ࠰ତќ׌ڱᇾᗟ۞ Help ኛՐĄ׎ι۞͞ٺώ̰͛टăٕ۰ߏૄٺᔣфăૄ ᙯٺజ၆ᑕҌૄڱё̝̚ćιਕૉ఍ந WM_HELP ੈिĂҭѩᙷੈिݒ൑ CLX ᑕϡ඀ ٺHook ԆБߏࠎ˞׶ WinHelp ࠹ट҃న۞ĂЯѩ˵̙ᑕྍజϡ ёऱ 8-43בฟ൴ᑕϡ඀ёă̮Іᄃ ёĄבRegisterHelpViewer ఺࣎ 4 д఺࣎ಏ̮۞ initializaiton ߱རĂቁᄮѩᇹּ۞ቁజ็ᅍග 3 ቁᄮ Help ᕱᜓጡ۞ቁߏྍಏ̮۞БાᇹּĄ Help Manager ߏ׶ፋЪฟ൴ᒖဩٙϡ۞ Help Manager ࠹ТĄ) χฟેҖॡഇइІ۞͞ёֽΐͽበᛌాඕĄ(υืቁᄮྍಏֹ̮ٙϡ۞ ૟ྍಏ̮በᛌాඕј˘࣎ШፋЪฟ൴ᒖဩොΊ۞నࢍॡഇइІĂТॡͽ 2 8-44 ˢܝᄃ඀ёనࢍ͘Ί ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-1 ࠎٙѣᑕϡ඀ё۞੻຅ĄTApplication ᙷҾࠎᇾ໤۞ Linux ඀ё೩ֻ׎পّ ૞९Җࠎ۞͞ёĂјטTApplicationăTScreen ׶ TForm ఺ˬ࣎ᙷҾĂ౅࿅ଠ ᑕϡ඀ё۞Җࠎטଠ ăΐˢ၆ྖ͞๴ăͽ̈́௡ᖐΑਕܑᄃ̍׍Е۞જүĄۍϲ̮Іᇹޙ ೀ࣎д̬ࢬనࢍ˯۞͹ࢋ̍үĂּтܑॾ۞఍நăځдͽ˭ᇴ༼̚Ăࠎଋᄲ ۞௟༼Ą ᆸд඀ё˯غࢍॡഇপّĂ֭ͷࠎ׎ᇤᆷְІ఍ந඀ԔĄܑॾົࠎଋ఍நଫ Ξͽአፋ׎Ҝཉă̂̈ăͽ̈́׎΁۞నܮĂଋޢ˯ॾܑٺ༊ෛᛇ̼̮Іజཉ ෛ඄ăΑਕܑăͽ̈́၆ྖ͞๴ğ۞ҜཉĂᖣͽనࢍଋ۞ᑕϡ඀ёֹϡ۰̬ࢬĄ ॾ̚ăщଵ఺ֱෛᛇ̼̮ІĞּтܑזٸٳІă૟׎̮۞˯ۍͽᏴፄ̮Іࢬ д൪ࢬ˯ពϯ˘࣎۩Ϩ۞ܑॾĄଋΞົܮϲາ۞૞९ॡĂޙٕ ༊ଋฟୁ IDE ֹϡ̬ࢬ۞ฟ൴ ᑕϡ඀ё ᄃ඀ёనࢍ͘Ίܝ9-2 ˢ Windowsğ ٺy к൪ࢬҖࠎĞ่ዋϡ y ൪ࢬన౯Ξϡ۞Ч࣎фݭ y ᑕϡ඀ёેҖ̝ෛ඄۞̂̈ y ഫᇾ۞γ៍ ޽ؠĈ ၗĄϤ Screen ٙેҖ۞˘ਠّ̍үĂΒ߁˞ې྅˞ଋᑕϡ඀ёેҖ̝൪ࢬ۞ ދ ϲ૞९ॡజயϠ΍ֽĄScreenޙݭҾࠎ TScreen ۞Бાតᇴ Screen ົдଋ ఍ந൪ࢬ ౉᚜ၟְІĂТॡឰଋ౅࿅ፋЪฟ൴ᒖဩֽࠎ׎೩ְֻІ఍ந඀ԔĄ Application តᇴ׎পّᄃְІĂҭߏΩ˘࣎ TApplicationEvents ̮Іݒਕ̚ ϡፋЪฟ൴ᒖဩֽᑭෛБા۞ֹڱ᚜ၟ࠹ᙯ۞ְІĂඈඈĄᔵ൒ଋ൑ ᑕϡ඀ёยཉॡĂ଀ͽેҖࡦഀ఍நĂOnMessage ְІឰଋΞͽ̚౉ٺឰଋ ѨୁજॡેҖ࠹၆ᑕ۞જүĂOnIdle ְІ݋ܐᑕϡ඀ёٺOnActive ְІឰଋ ᑕϡ඀ё̝˯۞ְІĄּтĂٺТॡĂApplication Ϻົତќధкፋវүϡ ࢱࢬ̚Ăనؠ Application ۞఍நᏴีĄ ϲ૞९ॡĂ̪ᑕྍд Project|Options Applicationޙё۞൴ण۰Ą̙࿅༊ଋ ၆፾ϲᑕϡ඀ٺІᇤᆷ۰۞ࢦࢋّĂᅈ౼̮ٺTApplication ྻү۞͞ёĂ၆ ᑫĄᒢྋځΨᄲײᓝּֽᄲĂApplication ૟఍நтңֹϡ඀ё۞Αਕֽܑ ёĄב྅ଋ۞ᑕϡ඀ёĂТॡ೩ֻధк΍னд඀ёࡦഀ۞ދົ ̚ĄApplication Տ࣎ CLX ۞ᑕϡ඀ё̝ٺݭၗࠎ TApplication ۞ፋវតᇴ Application хд ᑕϡ඀ёᆸ৺ٺྻү ᖂ۞Ą ၹડ๴Ą̙გߏᑕϡ඀ё۞ෛ඄ٕ۰ߏ၆ྖ͞๴Ăౌߏͽ TForm ઇࠎૄޙ۞ ᄃΞពϯ۞фݭඈඈĄ҃ TForm ᙷҾ۞ᇹּ݋ߏᑕϡ඀ёֹϡ̬ࢬޘژ၌ྋ มĂ੃ᐂ̏ྶˢ۞ܑॾᄃྤफ़ሀ௡ĂТॡჯ᜕ր௚࠹ᙯ۞჌჌ྤੈĄּтᏈ Җഇેٺ྅׎ҖࠎĂ҃јࠎᑕϡ඀ё۞ૄϮĄTScreen ݋ϡދĂᖣͽڱᄃ͞ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-3 1 Ᏼፄ Project|View Source ͽពϯ͹૞९ᑫĄ ࡶຐдୁؕॡᔳᖟ͹ܑॾĂኛ Бા۞ Application តᇴ(д˭˘࣎͹ᗟ̚ົྎΐ੅ኢ)Ą ଋΞͽឰᑕϡ඀ё˘ฟؕેҖॡĂ̙ពϯ׎͹ܑॾĄࡶຐтѩĂଋυืֹϡ ͹ܑॾ۞ᔳᖟ ពϯ΍ֽĄົܮ֤ᆃĂ༊ଋેҖᑕϡ඀ёॡĂٙາᏴፄ۞͹ࢋܑॾ Ᏼፄ OKĄ ຐࢋүࠎ૞९͹ࢋܑॾ۞ܑॾĂତ඾פ2 д Main Form ௡Ъ͞๴̝̚ĂᏴ Forms ࢱࢬĄ פᏴޢ1 Ᏼፄ Project|OptionsĂ൒ ࡶࢋԼត૞९۞͹ࢋܑॾĂ ߏેҖᑕϡ඀ёॡĂٙពϯ۞ௐ˘ܑ࣎ॾĄົܮϲึԔĂӎ݋͹ܑॾޙܑॾ۞ ଋԼតܧгдેҖഇมΐͽീྏĄЯࠎĂੵٽटޝүࠎ͹ܑॾĂ˵Ξͽឰଋ Ξਕົຐ޽ؠ̙Т۞ܑॾֽүࠎᑕϡ඀ё۞͹ܑॾĄΩγĂ޽ؠ˘ܑ࣎ॾֽ ϲ۞ௐ˘ܑ࣎ॾĄдଋആ૞९ΐˢܑॾॡĂޙܑॾĄιТॡ˵ߏેҖഇมٙ ϲ֭ᐼх۞ௐ˘ܑ࣎ॾĂ૟јࠎ૞९۞͹ࢋޙд࿰నଐԛ̝˭Ăଋд૞९̚ ͹ܑॾ۞ֹϡ ΍னΞֻଋฟؕనࢍଋֹϡ۰̬ࢬ۞ܑॾĄົܮॡĂ ϲາ૞९ޙTForm ߏฟ൴ GUI ᑕϡ඀ёॡ۞ᙯᔣᙷҾĄ༊ଋฟୁ࿰న૞९ٕ ϲޙܑॾ۞ Screen ̮ІĂ֭૟ѩ̮І޽ࠁග ScreenĄ ϲޙCLX ᑕϡ඀ё۞࿰నҖࠎߏĂᑕϡ඀ёົֶፂϫ݈൪ࢬన౯۞ྤੈĂ Ăֹଋ଀ͽѣड़гგநଋֹϡ۰̬ࢬ۞ҶԊĄੈྤޘ఺ֱពϯጡͽ̈́׎ჯ ჯ᜕ົܮ к࣎ពϯጡ̝˯Ă֤ᆃ Screenٺଋ۞ Windows ᑕϡ඀ёેҖڍт ᄃ඀ёనࢍ͘Ίܝ9-4 ˢ 5 Ᏼፄ OKĄ ׎ܑॾಏ̮ЩჍĄפ4 ࠎజણ໰۞ܑॾᏴ 3 Ᏼፄ File|Use UnitĄ ᅮࢋણ໰ҌΩ˘ܑ࣎ॾ۞ܑॾĄפ1 Ᏼ Ω˘ܑ࣎ॾĂזࡶࢋ૟ܑॾాඕ ІĄ̮פాତҌྤफ़ሀ௡̚۞ྤफ़х ૱ົֹϡܑॾాඕĂֽୁϡ˘࣎Βӣྤफ़ຏۢ(data-aware)̮І۞ܑॾĂͽ ॾ̚۞̮ІĄּтଋΞਕགྷܑפ̝ٙͽࢋాඕܑॾĂ఼૱ߏࠎ˞ឰଋ଀ͽх linking)ķķĄ ι۞ણ໰ΐˢણ໰ܑॾ۞ಏ̮ᑫ̚Ą఺ӈٙᏜ۞Ķܑॾాඕ(formז૟޽ ૞९̚۞׎΁ಏ̮ΝĄдଋᇤᆷણ໰Ҍາܑॾ۞඀ёቅ̝݈Ăଋ଀זԯιΐ ૞९ᑫ̰Ă̙࿅̙֭ົזι۞ણ໰ΐז૞९̚ॡĂТॡ˵ົ૟޽ז૟ܑॾΐ ాඕܑॾ Manager)̝̚Ă҃Ұ˵ΞͽᏴፄ View|Forms ่ពϯܑॾЕܑĄ ̰ٙѣ۞ܑॾ׶ιࣇ۞࠹ᙯಏ̮ౌЕд Project Manager(View|Project ૞९זFile|New FormĄଋΞͽ࠻ פଋ۞૞९̚ĂኛᏴזࡶࢋ૟׎΁ܑॾΐ ΐˢ׎΁ܑॾ ̙҃υт˯ࢗдેҖॡഇΐͽనؠĄ ІᑭෛጡĂ૟ܑॾ۞ Visible পّనࠎ FalseĂۏො Ұ˵ΞͽдనࢍॡഇĂӀϡ Form1.Visible := False; { ົЯҰ͹ܑॾ۞ЩჍ҃ѣ̙ٙТ } Application.ShowMainForm := False; Ψ̝݈Ąײ۞ Application.Run ă၆ޢΨ̝ײ۞ ૟ͽ˭ೀҖΐдଋ၆ Application.CreateForm 2 ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-5 পؠ۞ᙝቡĄזܢҋજአፋ̂̈Ă֭ჯ޺ϒቁҜཉĂͽֹιࣇ෭ົܮ ีט׎˯۞ଠٺܢ๱႕ፋ࣎ϡ͗ડ(client area)Ą༊ͭᙷҾԼត̂̈ॡĂ෭ޢ ၆ᆅр̝ีטᙷҾ̝̚Ă˵Ξͽд׎΁ଠͭٺٸ඾পؠ۞ᙝቡཉڻีט࢝ଠ ᙷҾ۞Ҝཉ׶̂̈ĄAlign পّΞឰଋૻͭٺ࠹၆ีטѣ׌࣎পّᇆᜩ඾ଠ Ъјಏ˘࣎វĄ ឰЧ࣎ีϫፋܮΞͽనؠܑॾ۞γ៍Ăͽܮጡүҋજ۞አፋĄтѩ˘ֽĂଋ к׎΁۞পّĂֹ଀ιࣇΞͽॲፂҋ֗۞̰टٕटޝᔘѣีטੵѩ̝γĂଠ ཉ׶̂̈Ą Ҝ۞ีטّ̝˯ĄଋΞͽдેҖഇมԼត఺ֱᇴࣃĂ఺૟ΞͽԼតܑॾ̚ଠ TopăLeftăWidth ׶ Height ඈপ ۞ีטཉ͞ёĂ૟ͅᑕдଠٸ҃ଋٙᏴፄ۞ ϡ̬ࢬ۞γ៍Ąֹטॾ̚۞ҜཉĂֽଠܑٸజཉีטᖎಏֽᄲĂଋΞͽአፋଠ გந̮І۞ҶԊ дበᛌഇมயϠĶೈᒖણ໰ķ۞᏾ᄱĄົڱ჌ү дιࣇЧҋ۞ಏ̮ᑫ̚۞ interface ొ̶Ă఺ٸኛ̙ࢋ૟׌࣎ uses ̄ήౌ interface ొ̶Ą) ѩಏ̮۞ٺొ̶Ą(ଋೀͼ̙ົᅮࢋ૟Ω˘ܑ࣎ॾ۞ಏ̮ᙊҾфཉ implementation ٺinterface ొ̶Ă҃Ω˘࣎݋ཉ ٺy ૟˘࣎ uses ̄ήཉ ొ̶Ą(ѩӈ File|Use Unit ޽΄۞үϡĄ) дЧҋ۞ಏ̮ᑫ̚۞ implementationٸy ૟׌࣎ uses ̄ή׶ಏ̮ᙊҾф (circular reference)۞᏾ᄱĄࡶࢋᔖҺ఺ᙷ᏾ᄱĂኛֶ˭ЕՎូซҖĈ ѩ̢࠹ણ໰ॡĂ֤ᆃдଋበᛌ඀ёॡΞਕົౄјĶೈᒖણ໰ķك༊׌ܑ࣎ॾ ᔖҺಏ̮ೈᒖણ໰ ඕܑॾ۞ቑಛ̝̚ĄాٺߏϒҜ ˘ણ໰Ă҃ѩણ໰޽Ш˞׎ιܑॾಏ̮Ą఺ܑϯజాඕ۞ܑॾᄃ׎̮Іϫ݈ ඾âܑ࣎ॾಏ̮۞ uses ̄ήĂΒӣ˞ߙקΩ˘ܑ࣎ॾķຍז૟Ķܑॾాඕ ᄃ඀ёనࢍ͘Ίܝ9-6 ˢ Լត࿰న۞ྻү͞ёĄ ϲ׎ܑॾॡĂ̙֭ົᅮࢋޙё۞ેҖഇม޺ᜈгхд඾ĂЯѩ༊ଋࠎ͹ෛ඄ ଋٙ࿰ഇ۞ྻү͞ёĂЯѩଋ̙֭ᅮࢋઇක୮ԼតĄ˵ಶߏᄲĂ͹ෛ඄д඀ ϲд੃ጸវ̚۞ܑॾĄ఼૱Ă఺ົߏޙ(main entry)ΐˢ඀ёቅĂֽҋજг ϲܑॾॡĂDelphi ົᖣϤдᑕϡ඀ё۞͹ˢ˾఍ޙ༊ଋֹϡፋЪฟ൴ᒖဩֽ ܑॾ۞ֹϡ Іֽአፋҋ֗۞̂̈Ąۏॲፂ׎фݭĂٕٙΒӣ۞ี טĂ݋ѣ AutoSize পّĄѩপّΞֹଠีטӣѣΞਕԼត׎̝̰̂̈ट۞ଠ ѣ TControl ۞ࢉϠᙷҾĄ ׶ TPanel)ĄੵѩͽγĂ̮Іనࢍ۰Ξͽֹϡ఺ְ࣎Іٕ૟఺ְ࣎І̳ฟගٙ І̚(TFormăTScrollBoxăTControlBarۏटጡٺOnConstrainedResize ົ̳ฟ ᇴࣃ૟ͽ var ણᇴ็ˢĂЯѩΞдְІ఍ந඀Ԕ̚ΐͽԼតĄ۞ טĄࢨטॡĂТॡᖬᆷଫ၆̂̈۞ࢨ̈̂۞ีטѩ˘ְІឰଋ଀ͽдԼតଠ MaxWidth, MaxHeight: Integer) of object; TConstrainedResizeEvent = procedure(Sender: TObject; var MinWidth, MinHeight, TControl ͔ˢ˞ߙ࣎ݭၗࠎ TConstrainedResizeEvent ۞᜕ְܲІĈ ΨॡĂ֨ͤιΪдߙ࣎͞ШԼត̂̈Ąײజڱ͞ ChangeScale ۞ีט၆ᆅ̮̄ІĄConstraints ˵Ξͽдଠ۞טιΒӣ˞׍̂̈ࢨ І۞̂̈ĂЯࠎۏטࢨܮConstraints পّ۞ࣃົдͭ/̄۞ลᆸ̚็ᅍĂͽ ၗĄېІ˘ۡౌჯ޺дΞෛ۞ ۏІనؠ Constraints ۞ MinWidth ׶ MinHeightĂ૟ΞቁܲࢉϠۏଋആटጡ ͽည৵ࠎಏҜ)Ąּтࡶ)̈̂ޘ׶ᆵޘ੼۞ีטଠטĄనؠ఺ֱᇴࣃΞࢨޘ ă׶౵̈ᆵޘă౵̂ᆵޘă౵̈੼ޘ౵̂੼۞ีטConstraints Ξឰଋ޽ؠଠ ត଀͉ٕ͉̂̈ĂΞͽֹϡ Constraints পّĄٺҌ̙ีטଋԓ୕ቁܲଠڍт Ҍፋ࣎ᙝቡĂኛֹϡ Anchors পّĄܢឰι෭ܮ̈Ăͽ дͭᙷҾ۞পؠᙝቡĂҭ̙֭ԓ୕ιົᐌ඾Լត̂ٸਕีטଋԓ୕ଠڍт ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-7 Ω˘ᇹּٕ۰ߏੵΝྍᇹּ˞Ą ϲޙ՟ѣυࢋГΝܮ੃ጸវ̝̚Ă֤ᆃٺд఺჌ଐԛ̝˭ĂЯࠎܑॾ̏གྷх end; ResultsForm.ShowModal; begin procedure TMainForm.Button1Click(Sender: TObject); ੃ጸវ̰۞ܑॾĈ ٺĂֽពϯ̏хڱ͞ ពϯĂ֤ᆃĂܑॾ۞ְІ఍ந඀Ԕ݋Ξֹϡ ShowModal ϲܑॾĂТॡԓ୕඀ёેҖҌߙ࣎ॡมᕇॡĂ̖ΐͽޙ࣐ࡶଋᏴፄдୁજॡ ϲ۞ܑॾޙពϯҋજ ੃ጸវ̰Ąٺͷдᑕϡ඀ёેҖ۞ፋ࣎࿅඀̚Ă࠰х ϲ۞ܑॾౌົ΍னĄ҃ޙ༊඀ёజಓΨॡĂٙѣд૞९ಏ̮̚ͽ఺჌͞ёֽ ॾĄܑזפٙѣಏ̮ĂౌΞͽགྷϤѩតᇴ҃х uses ̄ή۞ ٺ඀ёેҖॡĂԧࣇΞͽ౅࿅ιֽણ໰ҌྍܑॾĄ૟ܑॾಏ̮ӣ ॾᙷҾᇹּ۞޽ᇾĂдᑕϡܑז࣎࠹၆ᑕ۞ፋវតᇴĄ҃ѩតᇴ˜ߏ˘࣎޽ ё૟யϠ˘ᄃܑॾТЩ۞ፋវតᇴĄЯѩᑕϡ඀ё̚۞Տܑ࣎ॾ࠰ѣ˘בѩ Application.CreateForm(TForm1, Form1); ϲᑕϡ඀ё۞͹ܑॾĈޙᖣͽд੃ጸវ̚ҋજг ᑕϡ඀ё۞૞९ࣧؕಏ̮̚Ăٺд࿰నଐԛ̝˭ĂDelphi ົ૟˭Е඀ёቅཉ ੃ጸវ̚۞ॡ፟ٺॾઃዸܑטଠ ඄ᄏҝăజֹϡ۰ᙯౕٕ۰౵̼̈ࠎͤĄ జ׎΁ෛז͞๴)ć҃ modalless ܑॾ݋ߏ˘ۡ޺ᜈពϯ۞ෛ඄Ăιࣇ૟ពϯ ׎΁ܑॾΝĄ (ּтࢋՐֹϡ۰Ꮾˢ۞၆ྖזĂ̖ਕ̷ೱޢ׶׎Ԇј̢જ̝ ܑॾΞ̶ј׌ᙷĈmodal ׶ modalessĄࡶߏ modal ܑॾĂ֤ᆃֹϡ۰่ਕд ϲ၆ྖ͞๴Ąޙᅮࢋιࣇ΍னॡĂ̖જၗгזͽඈ ଋ̙ԓ୕ٙѣᑕϡ඀ё۞၆ྖ͞๴Тॡ΍னд੃ጸវ̚ĂΞڍ̚ĄٙͽĂт ੃ጸវ̝ٺ࿅ଋΞਕ̙ԓ୕д඀ёેҖ࿅඀̚Ăٙѣᑕϡ඀ё۞ܑॾౌཉ̙ ᄃ඀ёనࢍ͘Ίܝ9-8 ˢ ॾܑڍϲྍܑॾĄтޙResultsFormĂಶ଀ࢦາг זᑕϡ඀ё۞׎΁гֹ͞ϡ ଋᅮࢋдڍϲӈΐͽӁੵĂЯѩтޢቑּ̚۞ְІ఍ந඀Ԕົдܑॾᙯౕ̝ ൴˞ּγĄ ଫĂӈֹܑॾ͔ٸд finally ̄ή̚ĂΞͽቁܑܲॾٙϡ۞੃ጸវ˘ؠົజᛖ ཉٸ;ιֹϡ try..finally ۞͞ёĄ૟ ResultsForm.Freeזд˯ּ̚Ăኛ঻ຍ end; end; ResultsForm.Free; finally ResultsForm.ShowModal; try ResultsForm:=TResultForm.Create(self) begin procedure TMainForm.Button1Click(Sender: TObject); Ąڱ͞ ResultsForm ߏ˘࣎ modal ܑॾĂЯѩ఍ந඀Ԕᑕֹϡ ShowModal ຍڦॾĂӈт˭ٙࢗ˘ਠгֹϡፋវតᇴĄኛܑڍΞͽϡֽಓ੓ѩඕڱ͞ ॾ۞ᇹּĂТॡ࢑యΐͽੵΝĄѣܑ࣎ڍϲඕޙ͹ܑॾ۞ְІ఍ந඀Ԕυื Ąڱ͞ ࠎሀёܑॾĂ݋ኛֹϡ ShowModal ćࡶڱ͞ ሀё۞ܑॾĂኛֹϡܑॾ۞ Showܧ8 ༊ଋᅮࢋಓ੓ܑॾॡĂ੫၆ Application.CreateForm(TResultsForm, ResultsForm); ؕቅ̚ொੵ˭ࢬ఺˘ҖĈ ಓ੓ྍܑॾĄΩγĂଋ˵ΞͽҋҖଂ૞९ࣧົ̙ܮтѩ˘ֽĂдୁજॡ ੵĄ 7 ૟ྍܑॾଂ Project Options|Forms ࢱࢬ۞ Auto-create ܑॾЕܑ̚ொ ϲາ۞ܑॾĄޙ Component ̍׍Е̚۞ File|New Form פ6 Ᏼ ϲܑॾĂଋΞͽĈޙࡶຐࢋֹϡፋЪฟ൴ᒖဩĂ҃ͷдેҖ࿅඀̚۞̙Тล߱ ੃ጸវ̰ĄזٸֽᄲĂΪѣ༊ֹϡ۰ࢋᄃ၆ྖ͞๴̢જॡĂྍ၆ྖ͞๴̖ᅮࢋ ϲĄᓝּޙߙֱܑॾॡĂ̖ΐͽזᅮࢋϡזഇมٙᅮ۞੃ጸវณĂଋΞͽඈ ੃ጸវ̰Ąࠎ˞ഴ͌ྶˢٺѣॡ࣏ଋΞਕ̙ԓ୕ᑕϡ඀ё۞ٙѣܑॾТॡх ϲܑॾޙજၗг ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-9 ॾ۞ፋវᇹּĄܑזώ̚۞ְІ఍ந඀ԔĂԆБ՟ѣֹϡۍኛ঻ຍ៍၅дѩ end; RF.Free; RF.ShowModal; RF:=TResultForm.Create(self) begin RF:TResultForm; var procedure TMainForm.Button1Click(Sender: TObject); ፋវܑॾតᇴĄѣт˭ּĈזёቅ̙֭ົણ໰ ୮൑ᇆᜩĄЯࠎдְІ఍ந඀Ԕ̚۞඀ܮResultsForm ߏӎࠎҋજயϠ˘ְĂ ଋֹϡ۞ߏડાតᇴĂ֤ᆃڍֹ̚ϡડાតᇴֽүࠎາᇹּ۞ણ໰Ąт ߏдְІ఍ந඀ԔܮࡶຐயϠ፾˘൑˟۞ modal ܑॾᇹּĂͧྵщБ۞͞ё ϲܑॾᇹּޙֹϡડાតᇴֽ Ҿ۞ፋវតᇴĄ Ә׎࣎ކТ)Ą઄ࡶଋ۞ᑕϡ඀ёᅮࢋܑॾ۞ᗝγᇹּĂ֤ᆃኛࠎՏ࣎ᇹּ࠰ ϲ۞ፋវણ໰តᇴ(តᇴ۞ЩჍޫр׶ܑॾ۞ЩჍপّ࠹ޙϡܑॾயϠॡٙ ፋវቑಛ̚Ąд̂кᇴ۞ଐԛ̝˭Ăଋυืֹٺ˵ಶߏᄲĂ఺ֱតᇴυืх ሀёܑॾ۞ણ໰តᇴ඗၆хдĄ఺ܧΪࢋߙܑॾϒдֹϡ̚Ăଋಶυืܲᙋ ሀёܑॾܧϲኜтෛ඄̝ᙷ۞ޙ ඀ё༊ଫĄ ଋЋဦֹϡྍፋវតᇴĂΞਕົֹ଀ᑕϡڍЇ˘ѣड़۞ܑॾĄٙͽĂтז޽ Ăፋវតᇴ૟̙Гޢι˞Ą༊ְІ఍ந඀ԔඕՁ̝זפхڱᑕϡ඀ёГ˵൑ Ω˘࣎జҋજயϠ۞ᇹּ۞ણ໰ĄҋજயϠ۞ᇹֶּᖞхдĂΪ̙࿅זଫ޽ ϲྍܑॾĂТॡ఺ְ࣎І఍ந඀Ԕ̪ົࠎྍܑॾயϠາ۞ᇹּĂͽᖬᆷޙॡ дୁજົܮ ϲາܑॾॡĂԞ˞୻ಏ̚ӁੵТЩ۞ܑॾĂ֤ᆃ Delphiޙࡶଋд ݈ Project Options|Forms ࢱࢬ۞ Auto-create ܑॾ୻ಏ̚ĄՀჟቁгᄲĂ࣐ ϲĂኛ੃଀ቁᄮྍܑॾ۞ቁ̙дϫޙёֽΐͽבၹޙଋ˜ߏ౅࿅ܑॾ۞ڍො т ၗĄېаॡĂܑॾ̪൒఍நฟୁ۞ܔ ਕдְІ఍ந඀Ԕ̚ΐͽӁੵĂЯࠎ Show̙ܮߏͽ Show ٙពϯĂ֤ᆃଋ˜ ᄃ඀ёనࢍ͘Ίܝ9-10 ˢ end; end; 3: ResultsLabel.Caption := 'You picked the third button.'; 2: ResultsLabel.Caption := 'You picked the second button.'; 1: ResultsLabel.Caption := 'You picked the first button.'; case whichButton of begin constructor CreateWithButton(whichButton: Integer; Owner: TComponent); Caption পّĄ ۞ีטёӀϡ whichButton ણᇴĂֽనؠܑॾ̚ Label ଠב ၹޙ˘ёĂι็ˢ˞ᗝγ۞͔ᇴ whichButtonĄѩבၹޙѩ˜͘જҋҖᇤᆷ۞ end; constructor CreateWithButton(whichButton: Integer; Owner: TComponent); public private procedure OKButtonClick(Sender: TObject); OKButton: TButton; ResultsLabel: TLabel; TResultsForm = class(TForm) ॾᙷҾ̝̚Ąܑזёΐבၹޙ఺࣎າ۞ ёĄଋΞͽ͘જг૟בၹޙ۞ ΩҖᇤᆷăͷ૲ѣΩ˘ᗝγ͔ᇴ whichButton ពϯ˞ܮёֽயϠྍܑॾ۞ᇹּĄд˭ּ̚۞ܑॾᙷҾĂבၹޙϡ఺࣎າ۞ ёĂТॡֹבၹޙϲΩγ۞ޙΞͽࠎιܮࡶࢋ૟׎΁۞͔ᇴ็ගܑॾĂ֤ᆃ ІĄ)Owner ̝ࣃΞͽߏ nilĄۏІܑٕॾۏᑕϡ඀ё۞ Ψײߏܮϲܑॾ۞ጾѣ۰Ą(ٙᏜ۞ጾѣ۰Ă޽۞ޙ͔ᇴ OwnerĂϡͽ΃ܑٙ ё่ѣ˘࣎בёĂѩבၹޙϲܑॾĂ֤ᆃܑॾ݋ົ׍ѣ˘࣎ޙͽ఺჌͞ёֽ ॾĄࡶߏܑ۞זϲᑕϡ඀ёٙ̚ົϡޙ˘ਠֽᄲĂଋົдፋЪฟ൴ᒖဩ̚Ă ็ˢᗝγ۞͔ᇴܑ̟ॾ ϲӈᗓฟҋ֗۞ቑಛĄົܮᇴĂྍડાតᇴ ଋֹϡ۞ߏડાតڍаĂٙͽтܔϲӈົܮ ĂShowޢ඾ĄЯࠎдܑॾฟୁ̝ υื׍ѣፋវቑಛĂͽቁܲдܑॾ۞ֹϡ࿅඀̚Ăྍܑॾ඗၆ົ޺ᜈгхд ༊൒Ăଋ̙ਕд modalless ܑॾ۞ְІ఍ந඀Ԕֹ̚ϡડાតᇴĂЯࠎιࣇ ё̚)Ă֤ᆃĂֹϡડાᇹּֽ఍நܑॾᑕྍߏ౵щБѣड़۞͞ёĄב ܑॾ۞າᇹּĂТॡ˵่дᑕϡ඀ё۞࣎Ҿ̈ડ๴ֹ̚ϡྍܑॾ(ּтдߙ࣎ ଋᅮࢋயϠ Modalڍॾ۞ፋវᇹּĄ̙࿅ĂтܑזਠֽᄲĂᑕϡ඀ёົֹϡ˘ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-11 ଀фҚĂ֭૟׎ࣃ޽ؠග CurrentColorĄפ̰ӣҒ૾ЩჍ۞Еϯ͞๴̚ నؠ CurrentColor পّ̝ࣃĄְІ఍ந඀ԔົଂົܮOnClick ְІ఍ந඀Ԕ ĂЕϯ͞๴ ColorListBoxClick ۞ޢ̝פՏ༊Еϯ͞๴̚ѣ˘າ۞ีϫజᏴ end; property CurColor:String read FColor write FColor; public FColor:String; private procedure ColorListBoxClick(Sender: TObject); ColorListBox:TListBox; TColorForm = class(TForm) ѣт˭ࢗĈܮӘ̰टކCurrentColor পّ̰Ąܑॾ۞ᙷҾ дٸҋજгхົܮາҒ૾ॡĂColorListBox ٙ̚Ᏼؠ۞Ғ૾ЩჍфҚ פѣЧ჌Ғ૾(ּтĶࡓҒķăĶქҒ」ăĶᖡҒķඈඈ)۞ЕܑĄՏ༊ֹϡ۰Ᏼ ሀёܑॾĂ྆ࢬѣ˘࣎Щࠎ ColorListBox ۞Еϯ͞๴Ă׎̚хܧ۞ ColorForm ĄᓝּֽᄲĂ઄నᑕϡ඀ё̚Βӣ˞˘࣎Щࠎੈྤפሀёܑॾ̚ᕜܧ гଂٽĂᅅڱёĂٕߤྙܑॾ۞পّඈ͞בΨܑॾ۞̳ϡјࣶײଋΞͽᖣ඾ ଀ྤफ़פሀёܑॾ̚ܧଂ ܑॾտౣࠎ modal ٕ modeless ҃ؠĄ ଀ྤੈ۞͞ё݋ֶפĄଂܑॾ̚זё۞ણᇴĂٕ۰ߏనؠܑॾ۞পّࣃֽᏱ בၹޙ̝มᅍਖ਼ྤੈĄࡶࢋ૟ྤੈ็ᅍගܑॾĂΞͽᖣϤ็ਖ਼ගତќܑॾ̝ ̂кᇴன၁Ϡ߿̚۞ᑕϡ඀ёౌϤкܑ࣎ॾٙ௡јĄ఼૱ଋᅮࢋдிкܑॾ ଀ྤफ़פଂܑॾ̚ end; rf.Free; rf.ShowModal; rf := TResultsForm.CreateWithButton(2, self); begin rf: TResultsForm; var procedure TMainForm.SecondButtonClick(Sender: TObject); ᗝγણᇴ۞ TResultsForm ᇹּĈז˞ֹϡ ϲޙΨ̝̚޷ต۞ OnClick ఍ந඀ԔĂײЪଋᅮՐ۰Ąрͧд˭ּ̚Ăܑॾ ౵̷פёॡĂଋΞͽᏴבၹޙϲ˘ܑॾĂ҃ͷѩܑॾТॡ׍ѣк࣎ޙ༊ଋຐ ᄃ඀ёనࢍ͘Ίܝ9-12 ˢ ׎΁۞ܑॾᅮࢋ ColorForm ۞ྤफ़ॡĂΪืᑭߤ CurrentColor ᇴࣃӈΞĄ ̙࿅Ăᖣ඾ֹϡপّ۞͞ёĂົឰ ColorForm ۞̬ࢬྵࠎᖎಏۡତĄ༊Їң MainColor := Items[ItemIndex]; with ColorForm.ColorListBox do Ғ૾Ĉ۞פ଀ ColorForm ϫ݈Ᏼפ׎΁ܑॾ ΞឰܮࣃĂפColorForm.GetColor;)Ąְ၁˯ĂΪࢋۡତᑭߤЕϯ͞๴۞Ᏼ ଀ϫ݈۞Ғ૾(ּтĂMainColor :=פΞܮᅮࢋֹϡ CurrentColor পّĂ ёĂ֤ᆃΩ˘ܑ࣎ॾ̙בColorForm ѣ˘࣎Щࠎ GetColor ۞̳ϡ ڍΩγĂт ColorForm ۞ CurrentColor পّĄ ଀פޢёֽቁᄮ ColorForm ̏གྷхдĂ൒ב ְІ఍ந඀ԔົАֹϡ Assigned end; end; {၆фҚ MainColor ઇֱ఍ந} MainColor := ColorForm.CurrentColor; begin if Assigned(ColorForm) then begin MainColor: String; var procedure TResultForm.UpdateButtonClick(Sender: TObject); UpdateButton ۞ OnClick ְІ఍ந඀Ԕົညߏ఺ᇹĈ ߙ˘޷ต(Щࠎ UpdateButton)జ޷˭ॡĂι଀Ա΍ϫ݈జᏴؠ۞Ғ૾Ą னд઄నᑕϡ඀ё̚ѣΩ˘࣎Щࠎ ResultsForm ۞ܑॾĂ༊ ResultsForm ˯۞ end; CurrentColor := ''; else CurrentColor := ColorListBox.Items[Index] if Index >= 0 then Index := ColorListBox.ItemIndex; begin Index: Integer; var procedure TColorForm.ColorListBoxClick(Sender: TObject); ռϡྤफ़јࣶ FColor ̚Ĉ זё SetColor ֽ૟၁ᅫ۞পّࣃхב(CurrentColor পّົֹϡనؠጡ(setter ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-13 фҚĄ фҚ̝ࣃࠎ۩̼ؕܐޢёົ૟޽ᇾхҌռϡ۞ྤफ़јࣶ FColorĂ൒בၹޙѩ end; String(FColor^) := ''; FColor := Value; begin constructor TColorForm(Value: Pointer; Owner: TComponent); ё۞၁үт˭ٙࢗĈבၹޙфҚĄѩ ۞זPointer ͔ᇴĄឰԧࣇ઄ؠୁજ ColorForm ۞ܑॾۢ྽఺࣎ Pointer ٙ޽ ёΒӣ˞˘࣎בёĂѩבၹޙຍĂѩᙷҾᆧΐ˞˘ֹ࣎ϡ۰ҋؠ۞ڦኛ ჍĂତ඾ᙯܑౕॾĄΩ˘࣎޷ต CancelButton ݋ΪົᙯܑౕॾĄ ༊ SelectButton ޷ตజ޷˭ॡĂι૟ົ੃ᐂ ColorListBox ϫ݈Ᏼؠ۞Ғ૾Щ ܑॾΒӣ˞˘࣎Щಓ ColorListBox ۞Еϯ͞๴Ăι྆ᐝѣЧ჌Ғ૾۞ЩჍĄ end; constructor CreateWithColor(Value: Pointer; Owner: TComponent); public FColor: Pointer; private procedure SelectButtonClick(Sender: TObject); procedure CancelButtonClick(Sender: TObject); CancelButton: TButton; SelectButton: TButton; ColorListBox:TListBox; TColorForm = class(TForm) ӘĈކߏ׎ᙷҾܮٙЕ ˭غ఺࣎યᗟĂԧࣇ૟ࣣࣣ۞ ColorForm ܑॾ࣒Լј modal ܑॾĄځࠎ˞ᄲ ็аࣃĂଋυืдιజӁੵ̝݈АҖܲ঻ٙѣࢦࢋ۞ྤੈĄ ቁ۞ځ׸ĉЯࠎܑॾ֭՟ѣڶېଂ੃ጸវ̰ӁੵĂ֤ᆃଋ˫ࢋтң఍ந఺჌ ॾ B дᙯౕॡᐌӈజܑڍྙĂт˯˘࣎ቑּ̚۞ modeless ܑॾ˘ਠĄҭт ёֽΐͽߤב੃ጸវ̚Ă֤ᆃଋΞͽ౅࿅পّٕјࣶٺॾ B ̪൒хܑڍт ਕՙؠтңᚶᜈ఍நܑॾ AĄ͞ޢۢ྽ֹϡ۰дܑॾ B ̚ઇ˞ְֱ֤ଐĂ൒ ߏĂܑॾ A ୁજሀёܑॾ BĄ༊ܑॾ B ᙯౕॡĂܑॾ A υืܮڶ౵૱֍۞ଐ ಶ׶ modeless ܑॾ˘ᇹĂmodal ܑॾ఼૱˵ົΒӣ׎΁ܑॾٙᅮ۞ྤੈĄ ଀ྤफ़פଂ Modal ܑॾ ᄃ඀ёనࢍ͘Ίܝ9-14 ˢ MainColor ז ϲ ColorFormĂ֭ ૟ ޽ޙё݋ົבёĂ҃ѩב ົజ็ˢ GetColor ϲ˘࣎Щࠎ MainColor ۞фҚĄMainColor ۞ҜӬ݋ޙົ UpdateButtonClick end; ColorForm.Free; ColorForm.ShowModal; ColorForm := TColorForm.CreateWithColor(PColor, Self); begin procedure GetColor(PColor: Pointer); end; ઇֱ఍ந }ڶ { ၆ϏᏴፄᗞҒଐ else {၆ MainColor фҚઇֱ఍ந } if MainColor <> '' then GetColor(Addr(MainColor)); begin MainColor: String; var procedure TResultsForm.UpdateButtonClick(Sender: TObject); ι۞ְІ఍ந඀ԔಶᑕྍߏтѩĈ ϡ ColorFormĄ֤ᆃĂୁົܮUpdateButton ޷ตజ޷˭ॡĂResultsForm ܑॾ ёĄᓝּֽᄲĂ઄నߙ࣎Щಓ ResultsForm ۞ܑॾ̚۞בၹޙᇾග ߊхфҚ۞޽זΨι۞ܑॾυื็ˢ˘࣎޽ײࡶࢋѣड़гֹϡ ColorFormĂ фҚĄ۞זё̝޽ᇾٙણ໰בၹޙԧࣇ็ග фҚ̚Ă҃ѩфҚϒߏ˘זຍĂѩְІ఍ந඀Ԕົ૟Ᏼؠ۞Ғ૾ЩჍхڦኛ end; Close; end; String(FColor^) := ColorListBox.Items[ItemIndex]; if ItemIndex >= 0 then with ColorListBox do begin procedure TColorForm.SelectButtonClick(Sender: TObject); ົညߏ఺ᇹĈ ᙯܑౕॾĄSelectButton ۞ OnClick ְІ఍ந඀ԔޢᖣͽᐼхᏴፄ۞ีϫĂ౵ ޷˭ SelectButtonޢ࣎Ғ૾Ă൒˘פдѩᑕϡ඀ё̚Ăֹϡ۰ଂЕϯ͞๴̰Ᏼ ੃ጸវ̚۞ॡ፟ķ˘༼Ąٺॾઃዸܑטࢱ̚۞Ķଠ ϲܑॾ۞͞Ąࡶᅮࢋซ˘Վ۞ྤੈĂኛણዦд9-7ޙдୁજᑕϡ඀ёॡҋજ ϲܑॾĂ̙҃ਕֹϡޙቁгځёĂଋυืבၹޙො ࡶࢋֹϡ˯Еֹϡ۰ҋؠ۞ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-15 ཉ࿰Аٸ˯ͽಏ˘ՎូдܑॾޢĂ൒ڕٙᐼх۞ᇹפᏴ˯ۍΞд̮Іࢬܮޢ Ą҃дൾڕΞͽ૟ιࣇᐼхࠎ̮ІᇹܮĂޢ׎পّă֭ആιࣇᇤᆷ඀ёቅ̝ Ą༊ଋдܑॾ˯ଵؠ̮ІăనؠڕଋΞͽயϠϤ˘ٕ࣎к̮࣎Іٙ௡ј۞ᇹ யϠ׶ֹϡ۞ڕ̮Іᇹ ϲ̮ІໄኢķĄޙҭݒਕ೩ֻ౵̂۞ᇅّĄኛଋણ҂ௐ 1 ౢĂĶ y யϠҋࢎ̮І۞఺࣎͞ёĂߏࢦኑྻϡ඀ёቅ۞͞ё̚౵ኑᗔ۞˘࣎Ă ˘༼Ą ҃ͷΞͽ̰ಷдܑॾٕ׎΁॰ߛ̰Ąኛଋણ҂д9-17ࢱ̚۞Ķྻϡ॰ߛķ Іऱ̚Ą॰ߛົӀϡܑॾᚶ̮ٕٚۍy ଋΞͽ૟॰ߛ(frame)ᐼхд̮Іࢬ Іऱķ˘༼Ąۏ۞࣒ԼĄኛଋણ֍ௐ 8 ౢ̚۞Ķֹϡ ˘࣎Ξࢦኑྻϡ̮І۞̚δྤफ़ऱĂ҃ͷឰଋΞϡܑॾᚶֽٚ็ᅍٙઇ ೩ֻ˞ܮІऱ̚ᐼхܑॾăྤफ़ሀ௡ă׶૞९Ąтѩ˘ֽĂ̮ٺy ଋΞͽ யϠ׶ֹϡķ˘༼Ą۞ڕి۞౉शĄኛଋણ҂д9-15ࢱ۞Ķ̮Іᇹ component templates)ࠎ̮Іཏ௡۞నؠᄃᐼхĂ೩ֻ˞ᖎಏăԣ)ۍy ̮Іᇹ ҰΞͽֹϡк჌̙Т۞͞ёᐼхăࢦኑྻϡ̮ІĈ ࢦኑྻϡ̮Іᄃ̮Іཏ௡ ૟ MainColor ۞࿰నࣃనј۩фҚ)Ą Ψ۞ܑॾۢ྽ Modal ܑॾߏӎ՟ѣүЇңԼតٕ۰ߏᏴፄಶᙯౕ˞(ּтײ ІĄҭኛ੃ҝĂଋυื೩ֻ˘࣎͞ёឰۏՀኑᗔ۞ז۞ᅮՐĂଋΞਕ଀ֹϡ ఺࣎ቑֹּϡ˞˘࣎фҚតᇴֽܲхሀёܑॾ̚۞ྤੈĄ༊൒ᝄĂॲፂ၁ᅫ Ғ૾ಶᗓฟ˞ ColorFormĄפΞͽᖣѩֽҿᕝֹϡ۰ߏӎ՟ѣᏴܮѩ˘ֽĂ Ғ૾Ă֤ᆃ MainColor ݋ົߏ࣎۩фҚĄтפ՟ѣᏴڍMainColor ̝̚Ąт ٺᖞхֶົܮ࣎Ғ૾Ă֤ᆃྍҒ૾۞ЩჍ˘˞פϡ۰ᏴֹڍҭߏĂт ёĄ˘ό ColorForm ᙯౕ˞Ăι˵ಶᐌ̝జӁੵĄבၹޙ޽ᇾүࠎ͔ᇴ็ග۞ ᄃ඀ёనࢍ͘Ίܝ9-16 ˢ Compponent|Configure PaletteĄ פĂኛᏴڕொੵᇹڕࡶࢋଂ̮Іࢬ 7 ޷˭ OK ޷ตĄ ဦԛ̙ਕ෹࿅ 24x24 ည৵Ą۞פChange ޷ตĄٙᏴ ௐ˘̮࣎І׎̮ІݭҾֹϡ۞ဦԛĄࢋᕱᜓ׎΁ဦԛĂኛଋ޷˭۞פ2 Ᏼ ဦԛĄ࿰న۞ဦԛߏдՎូ۞ڕ΃ܑѩᇹ˯ڕдࢬפ6 д Palette Icon ̚Ᏼ யϠາ۞ࢱࢬĄົܮॡڕңĄࡶߏ޽ؠ˞̙хд۞ࢱࢬĂдᐼхᇹ ࢱࢬࠎۍˢ۞̮Іࢬٸӈ૟ڕ5 д Palette Page በᏭ͞๴̚Ă޽ؠ఺࣎ᇹ ̙ࢋ׶னх۞̮ІЩჍ࠹ࢦኑĄ ຍڦ֤ᆃ࿰న۞ЩჍ૟ົߏĶTLabelTemplateķĄଋΞͽՀԼЩჍĂҭߏ ଋᏴፄ˞˘࣎͛фᇾ੃(label)Ăତ඾ГᏴፄ˘࣎በᏭ͞๴ĂڍּֽᄲĂт ௐ˘̮࣎І׎̮ІݭҾΐ˯ĶTemplateķ఺࣎фĄᓝ۞פՎូ 2 ٙ̚Ᏼ ЩჍĄ࿰న۞ЩჍߏд۞ڕ4 д Component Name በᏭ͞๴̚޽ؠ̮Іᇹ Component|Create Component TemplateĄ פ3 Ᏼ Іα֎ົ΍னѷҒ۞ԯ͘Ą̮۞פдՏ࣎Ᏼ Ѣ໣ဂĄٳߏд఺ֱ̮І˯ࢬܮк̮࣎І౵ᖎಏ۞͞ёĂפІĄᏴ̮פ2 Ᏼ Іᑭෛጡ̰Ăనؠ׎পّᄃְІĄۏཉ֭ଵЕ̮ІĄдٸ˯1 дܑॾ ĂኛଋڕࡶଋຐࢋயϠ̮Іᇹ ཉ఺ֱ̮І˘ᇹĄٸ֭யϠٕ࣒Լιࣇ۞ְІ఍ந඀ԔĂಶညߏ፾ϲг ఺ֱ̮Іăࢦన׎পّăٸΞͽ࣎ҾгࢦາଵܮĂޢॾܑ̝ٺཉٸڕдଋ૟ᇹ ૞९̝̚Ą నؠр۞̮ІĂ֤ᆃٙѣ࠹ᙯ۞পّ׶ְІ఍ந඀ёቅĂౌົТॡΐˢҰ۞ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-17 ९̝มซҖ̷ೱĄ View as Form ٕ View as TextĂಶ Ξ д Form Designer ׶॰ߛ۞.DFM ᑫ פ ពϯϫ݈૞९̰۞Їң॰ߛĄಶ׶ܑॾ׶ྤफ़ሀ௡˘ᇹĂ޷˭໣ဂΠᔣ֭Ᏼ Ξܮٙ޽ؠ۞॰ߛĂ֤ᆃפдనࢍॡഇĂଋΞͽдᏴፄ Views|FormsĂ֭Ᏼ ଀˭Ѩࢋֹϡ॰ߛ൴ϠЩჍ˯۞኏ࡎĄֹٽटޝᇹ ො ༊ଋᐼх॰ߛॡĂኛᔖҺֹϡ׎࿰న۞ Unit1ăProject1 ඈඈЩჍĂЯࠎ఺ File|New|Frame ֭ᐼхѩ˘૞९Ą פᏴޢΐͽᙯౕĂ౵ޢܑॾᄃಏ̮Ă൒ File|New|ApplicatinĂᏴፄ̙ᐼхາ۞ פӣ॰ߛݒ̙ӣܑॾ۞૞९ĂኛᏴ ϲޙ඗၆υࢋ)ĄࡶΪຐܧ֭˵఼૱౵р૟॰ߛᐼхјࠎ૞९۞˘ొЊ(ҭ఺ ൒˵Β߁׎΁۞॰ߛ)Ą Ξͽ૟׎΁̮ІٛҌາ۞॰ߛ̝̚(༊ܮֽ˭֭д Frame ̝˯ᕇᑝ׌˭Ąତ File|New OtherĂ פFile|New FrameĂٕߏᏴ פࡶࢋயϠ۩۞॰ߛĂኛᏴ ϲ॰ߛޙ ۞በᏭ᛼ҜĂ֭ͷ༊ଋຐࢋ૟ྤफ़ᏮˢҌܑॾॡΐͽֹϡĄ Ϊࢋӣ߁˘ЊҜ̮ဦԛӈΞĄଋ˵Ξͽϡֽೡࢗ˘௡జϡͽበᏭ॰ߛܑ̚ॾ дᑕϡ඀ё۞ྤ໚̚ޢߙ࣎॰ߛ̚Ă൒ٺॾ˯۞Ҝ̮ဦԛॡĂଋΞͽ૟ιཉ кܑ࣎ٺଋѣ࣎ϡڍཏ௡۞௡ᖐ˯Ă॰ߛໂࠎѣϡĄᓝּֽᄲĂтีטдଠ ιٙᚶٚ۞॰ߛ۞ԼតĂ̪ᖞົᚶᜈᚶٚĄٺ̚ॡĂ၆ ׎΁॰ߛܑٕॾ̝ٺٚιΒӣ۞̮І(Βӣ׎΁॰ߛ)۞ԼតĄ༊॰ߛజ̰ಷ Ăιᔘߏͽፋ࣎ಏ̮ྻүĂ֭ᚶޢІ̰Ąд॰ߛயϠ֭ᐼхۏٕߏ׎΁टጡ ॾ̰ă׎΁॰ߛ̚ăܑٺгࢦᖬֹϡĄТॡ˵ΞͽజཉٽజᅅޢĂ൒̰ڕІࢬ ࠻Ă॰ߛܑͧॾՀညߏҋࢎ۞̮ІĄ॰ߛΞͽᐼхдֽ̮ޘ̙࿅Ăଂߙֱ֎ Іপّ̝ТՎّ˯۞ͭ̄ᙯܼĂ˟۰˵࠹ТĄ ϲᄃঐໝд׎̝˯۞ிк̮ІĄѩγĂд̮ޙĂϡͽҋજгט࠹Т۞ጾѣ፟ ٙᏜ۞॰ߛ(TFrame)Ăಶ׶ܑॾ˘ᇹ˜ߏ׎΁̮І۞टጡĄιֹϡ˞׶ܑॾ ϡ॰ߛྻ ᄃ඀ёనࢍ͘Ίܝ9-18 ˢ ಷ۞̄ग˯ĄТ̰ז၆ࣧؕ॰ߛٙઇ۞Հજ݋ົГࢦາበᛌॡĂҋજг็ᅍ ࣒ϒΪᅮ࣒Լ˘࣎г͞ć۞ޢˢྤफ़ऱ̮ІĂ҃ൾٸΩ˘͞ࢬĂࡶд॰ߛ̚ ૞९Ą۞ڕಶυืа࿅ᐝΝĂ͘જгՀԼՏ࣎Βӣ఺ᇹ Ă˫ຐԼត఺ֱ̮І۞щଵĂ֤ᆃޢ̝ڕдฟֹؕϡ఺ᇹڍĄҭߏтڕІᇹ ߏĂќะ఺ֱ̮Іֹ׎јࠎ̮ڱк࣎ᑕϡ඀ё̝̚Ąѣ࣎Ᏹٺࢦᖬֹϡޢ͟ ІĂͽֻ̮טІᄃྤफ़ຏۢ۞ଠ̮פᓝּֽᄲĂ઄నଋຐࢋ௡Ъ˘௡ྤफ़х য়АᙷҾĄזಷ۞॰ߛ˯Ăҭߏ၆̰ಷ॰ߛ۞Լតݒ̙ົаᐝᇆᜩ̰זᇆᜩ ၆ࣧؕ(য়А)॰ߛٙү۞ԼតĂ࠰ົޢТᇹгࢉϠҋ TFormĄ)఺ຍᏜ඾Ă͟ Ә˘າᙷҾĂކົ ॰ߛĄ(Тᇹ۞Ă༊Ұд૞९ΐˢາܑॾĂDelphi۞פᏴ Ә˘࣎າᙷҾĂࢉϠҋҰٙކົ ˢ॰ߛॡĂDelphiٸ༊Ұдܑॾٕ׎΁टጡ OKĄ ׎̚˘۰֭޷˭פѣܑ࣎Е૞९ٙ̚ѣ॰ߛ۞၆ྖ͞๴΍னĂᏴົޢ൒ FramesĂତ඾޷˭ܑॾٕߏΩ˘॰ߛĄ פStandard ࢱࢬᏴ ۞ڕy ଂ̮Іࢬ ̚Ą ˢ૞९̝ٸдυࢋॡĂForm Designer ົྙયଋߏӎࢋ૟॰ߛ۞ಏ̮ᑫ ˢܑॾă׎΁॰ߛăٕߏ׎΁۞टጡ˯Ąٸ॰ߛĂԯιפᏴ˯ڕy ଂ̮Іࢬ Form Designer ೩ֻ׌჌૟॰ߛΐҌᑕϡ඀ё۞͞ёĈ ׶ଡજคඈ׎΁۞टጡ˯Ąڕॾă׎΁॰ߛăٕߏညࢬܑזٸͽۡତ૟॰ߛ ॾ̝˯ĄΞܑٺࡶࢋдᑕϡ඀ёֹ̰ϡ॰ߛĂଋυืۡତٕมତ۞૟॰ߛཉ ֹϡ׶࣒Լ॰ߛ ဦϯĄ۞ڕາᇹ ࢱࢬă̈́΃ܑѩۍ׎ЩჍăሀפTemplate Information ၆ྖ͞๴ฟୁॡĂᏴ Add to PaletteĄ༊ Component פд॰ߛ˯޷˭໣ဂΠᔣĂᏴޢ۞)Ă൒ జฟୁڱΩ˘̮І̰۞॰ߛߏ൑ٺኛд Form Designer ̚ฟୁ॰ߛ(̰ಷ ĂۍĄࡶࢋ૟॰ߛΐˢ̮ІሀڕĂ݋ົјࠎ̮Іᇹ̚ڕࡶ॰ߛజΐҌ̮Іࢬ ̚ڕ૟॰ߛΐҌ̮Іࢬ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-19 υื૟ιࣇฟୁјࠎ૞९۞˘ొЊĄ Ąҭࡶߏ॰ߛ̰̚ಷ˞׎΁॰ߛĂ΁ࣇಶ̚ڕІࢬ̮זֱᑫ९֭ͷ૟ιࣇΐ Ξͽฟୁ఺ܮ࣐ࡶଋ૟॰ߛ۞ಏ̮׶ܑॾᑫ็ਖ਼ග˞׎΁ฟ൴۰Ă֤ᆃ΁ࣇ Հк۞ણ҂ྤੈĄז˘༼ĂΞͽԱ ІऱķۏAdd to RepositoryĄણ֍ௐ 8 ౢ̚۞Ķֹϡ פ̚޷˭໣ဂΠᔣĂᏴ Іऱΐˢ॰ߛĂኛАฟୁЇ˘Βӣѩ॰ߛ۞૞९Ăд Form Designerۏࡶࢋд y ೸Ҷ॰ߛ۞ಏ̮(.pas)׶ܑॾ(.dfm)ᑫĄ Іऱ̚Ąۏy ૟॰ߛΐҌ ଋΞͽ౅࿅ͽ˭׌჌͞ё૟॰ߛ̶ֳ΍ֽē Вֳ॰ߛ ؕ॰ߛ۞ Image ಶΞԼតՏ࣎г͞۞ဦԛĄ ౅࿅఺࣎॰ߛĄтѩ˘ֽĂܑॾᑫ९ྵ̈Ă҃ͷΪࢋ࣒Լࣧܮࢋពϯဦͯॡ ˢ॰ߛĂྶˢဦͯĂдՏѨຐٸІۏ ߏ૟ Imageܮߏ˘ᇹ)Ąྵр۞ྋՙ͞९ ˵̰ڕІᇹ̮זІᐼх̮ט(ӈֹҰΪనؠ˘Ѩ TImage.Picture ֭૟ Image ଠ Іౌົֹ଀ܑॾ۞ྤ໚ᑫ९ΐˢΩ˘Њ˘ሀ˘ᇹဦͯĄۏ ˢ۞Տ࣎ Imageٸ дᑕϡ඀ё̚ࢦኑֹϡ˞кЊ࠹Т۞ဦͯĂ֤ᆃдܑॾٙ̚ڍপّĄҭߏт І۞ Picture̮ט඀ёֹ̚ϡဦԛٕ׎΁ဦͯĂଋΞͽ૟ဦͯྶˢҌ TImage ଠ Հѣड़தгֹϡྤ໚ĄּтĂࡶຐдᑕϡٺѣӄإੵ˞ᖎ̼ჯ᜕̝γĂ॰ߛ І׶ྤफ़ֽ໚̮І۞॰ߛ̮טဦ9.1 ѣྤफ़ຏۢଠ ߏů̙ਕ૟̮ІΐҌιࣇ̝̚Ąטಷ̄गĄд࣒Լ̰ಷ॰ߛ˯۞઱˘۞ࢨ ࣧؕ॰ߛٕߏ׎΁̰זॡĂଋ˵ΞͽҋϤг࣒ԼЇ˘̰ಷ॰ߛĂ̙҃ົᇆᜩ ᄃ඀ёనࢍ͘Ίܝ9-20 ˢ д̄ีϫ۞ OnClick ְІ̚ĈٸAction পّĂٕߏజ д Action ̚Ă֭ͷΞజాඕҌ TMainMenu ̄ีϫ۞ٸ˭ࢗ۞඀ёቅΞͽజ Ξͽֶᅮࢋֽΐͽ఍நĄܮTOpenDialog ۞ FileName পّ̚Ăଋତ඾ జᐼхдົܮ༊ֹϡ۰д၆ྖ͞๴̚Ᏼፄ OK ॡĂֹϡ۰ٙᏴؠ۞ᑫ९ ͞๴Ą ពϯ၆ྖֽڱ͞ ឰֹϡ۰޽ؠ୬ฟୁ۞ᑫ९ĄଋΞͽֹϡ Executeٺϡ౉д TOpenDialog ̮Іឰଋ۞ᑕϡ඀ёΞͽֹϡ Open ၆ྖ͞๴Ąѩ၆ྖ͞๴۞ ۞ᑫ९Ą ІĂਕૉឰଋֹϡ༱ϡф̮Ă֭ͷͽᕱᜓϫᐂ۞͞ёֽᏴፄፋ௡̮טӣ۞ଠ ͹Αਕܑ۞ File Ᏼี˭۞ New ٕ Open ΑਕܑีϫٙΨ੓۞Ą၆ྖ͞๴ٙ ჌၆ྖ͞๴̮Іಶߏ TOpenDialogĄ఺̮࣎І఼૱ߏϤܑॾ˘۞ז౵૱జϡ ֹϡฟୁ၆ྖ͞๴ Qt ၆ྖ͞๴ॡĂኛ૟ UseNativeDialog నࠎ TrueĄ ᑕϡ඀ёົેҖд఺ᇹ۞ᒖဩ̚Ă҃ͷଋԓ୕ֹϡࣧϠ၆ྖ͞๴ֹ̙҃ϡ ଋ۞ڍٕᗞҒ࣒Լğ۞үຽր௚ֽᄲĂଋΞͽֹϡ UseNativeDialog পّĄт ׍ѣࣧϠ၆ྖ͞๴Ăͽ఍ந˘ֱВ఼۞̍үĞּтᑫ९۞ฟୁٕᐼхĂфݭ ො ၆ CLX ᑕϡ඀ёֽᄲĂଋΞͽֹϡ QDialogs ಏ̮۞ٙ೩ֻ۞၆ྖ͞๴Ą၆ а็ FalseĄົܮ ٙઇ۞តજĂ֤ᆃ Execute ϡ۰Ᏼፄ Cancel ֽᗓฟ၆ྖ͞๴Ă̙҃ซҖٕᐼхֹڍа็ Truećтົܮ ၆ྖ͞๴ٙ̚ઇ۞ٙѣតજĂ֤ᆃ Executeצϡ۰Ᏼፄ OK ͽତֹڍࣃĈтڒ ฟୁĄExecute ົа็οົܮΨॡĂ၆ྖ͞๴ײజڱ͞ ༊၆ྖ͞๴۞ Execute ଀ྤफ़Ąפᑫ९ፆүĄ၆ྖ͞๴ਕૉពϯͽ̈́Ğٕߏğ ֹϡ۰̬ࢬĂֹ଀ֹϡ۰଀ͽેҖ˘ֱညߏᑫ९ฟୁăᐼхăЕОඈВ఼۞ ̙Т۞၆ྖ͞๴Ą఺ֱ၆ྖ͞๴ࠎᑕϡ඀ё೩ֻ˞ࠎˠٙሢଉă׍˘࡭ّ۞ ̮ІЕ˯ Dialogs ࢱѨ˯۞၆ྖ͞๴̮ІĂΞਕࠎଋ۞ᑕϡ඀ёᄦү΍Ч჌ ฟ൴၆ྖ͞๴ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-21 д˭ܑ̚Ă݋ؠཌྷ˞дనؠΑਕܑᄃ̍׍Еॡ࠹ᙯ۞ఙᄬĈ ٛҌֹϡ۰̬ࢬ̮৵̝˯Ąٳy ҋ Action Manager ૟જү TActionToolBar ̝ᙷ۞ ActionBand ̮І)Ą y ૟ֹϡ۰̬ࢬ̮৵ΐҌᑕϡ඀ё(ֹϡኜт TActionMainMenuBard ᄃ ManagerĂӈ TActionManager)Ą ᑕϡ඀ё̚۞જү( ֹϡ Actionٺϲજү୻ಏͽயϠ˘௡Ξϡޙ y ̬ࢬĈ action bandsĄ˘ਠֽᄲĂଋΞͽֹϡт˭۞͞ёֽயϠ ActionBand ֹϡ۰ ࠎ ActionBand ̍׍Ă҃ͷ౅࿅ιࣇٙயϠ۞Αਕܑᄃ̍׍ЕĂౌజჍࠎ ͞ёăͽ̈́ҋࢎΑਕܑůΒ߁˞నࢍॡഇٕેҖॡഇ۞̍׍Ą఺ֱ̍׍௚Ⴭ ؠཌྷă௡ᖐજүăயϠ̙ТଵЕٺܮд Windows πέ˯೩ֻ˞ధк̍׍Ă к࣎ UI ̮৵̝˯ĄٺΞϡܮࢋΐˢ˘ѨજүĂ Edit Αਕܑᄃ̍׍Е˯ĄଋΪ ٺCutăCopyăᄃ Past ׻΄఼૱ົТॡ΍ன кֹ࣎ϡ۰̬ࢬ̮৵Ă̙҃ಏΪߏ˘࣎ĄᓝּֽᄲĂٺ఼૱˘௡જүົజϡ ឰଋ଀ͽ௡ᖐ఺ֱજү۞ЕܑĄܮ൴˘ֱજү(action)Ă҃఺ֱΑਕ д̍׍Е˯޷˭޷ตăᏴፄΑਕܑ˯۞׻΄ăٕᕇᏴă޷˭ߙ࣎ဦϯॡĂ͔ ϲăࢎᄦăᄃჯ᜕Ąֹϡ۰ΞਕົޙѣధкΑਕਕૉᖎ̼Αਕܑᄃ̍׍Е۞ ௡ᖐ̍׍ЕᄃΑਕܑ۞જү ӘЩࠎ filename ۞ AnsiString តᇴĄކҌ̝݈ٙ Ă૟ᑫ९ЩჍኑᄦޢ఺˘߱඀ёቅົពϯ၆ྖ͞๴Ă֭дֹϡ۰޷˭ OK ต filename := OpenDialog1.FileName; jg!OpenDialog1.Execute uifo! ᄃ඀ёనࢍ͘Ίܝ9-22 ˢ ІTActionToolBardֹٕϡྭπέ۞TToolBard̮ІֽயϠ̍׍ЕĄ үĂּт૟ϫ݈۞͛ІගО΍ĄଋΞͽֹϡActionBand̍׍Е̮ ଀඀ёેҖߙֱજֹົܮពϯ˘ଵဦϯ۞޷ตĄ༊޷˭޷ตॡĂ (Toolbar) ̍׍Е ր௚ĄځரϫᇾĂТॡୁજቢ˯ᄲنົܮֽᄲĂᇾ໤۞helpજү ٙѣ۞જүౌ଀ѣϫᇾĄᓝּܧĄ֭ีטּт౯ො͞๴ٕྤफ़ଠ ĂีטҘĄϫᇾ఼૱ߏ࣎ଠڌ׎˯ซҖߙְֱଐ۞ٺ΃ܑજүΞ (Target) ϫ۞ TMainMenuٕTPopupMenu̮ІֽயϠΑਕܑĄ ActionBandΑਕܑᙷҾTActionMainMenuBardٕྭπέ۞ ΞͽΐͽેҖ۞׻΄ĄଋΞͽֹϡޢ̝˭Е΍ֹϡ۰д޷ (Menu) Αਕܑ ཏ௡Ă֭ΐͽ௡ᖐĄኛଋણ҂TActionManagerĄ ActionBand̮І˯۞જүԛјٺឰទᏭ˯Т˘௡ăΞజࢦኑྻϡ (Action Manager) જүგநጡ ۰۞ҖࠎĄ ჯ᜕˘Њજү۞୻ಏĄଋ۞ᑕϡ඀ёΞͽӀϡѩ୻ಏֽаᑕֹϡ (Action List) જү୻ಏ ࠹၆ᑕ۞જүĄؕ ୁົܮϡ۰۞׻΄ॡ(ּт޷˭໣ဂ޷ต)ĂιֹזϡତќމตĄ༊ ̂кϡֽ΃ܑତќ఼Әੈिă҃ୁؕѩજү۞ΑਕܑᏴีٕ޷ Action client)) ͗މજү ͽֹϡ఺ֱᙷҾ。 ٛҌaction bandֽ̚ΐٳᖣϤ૟఺ֱᙷҾҋCutomize၆ྖ᲏๴ જүᙷҾĂּтTEditCopyăTEditCutăᄃTEditUndoĄଋΞͽ ଋᑕϡ඀ё̚જү۞ᙷҾĄٙѣ۞ᇾ໤જү࠰జؠཌྷࠎٺેҖϡ (Action classes) જүᙷҾ ˘ѨΒӣ˞FindăFindFirstăFindNexxtăᄃReplaceજүĄ ܑᄃ̍׍Е˯ĄᓝּֽᄲĂߙ࣎ᇾ໤۞જү̶ᙷӈࠎSearchĂι Αਕٺឰଋ଀ͽឰк࣎જүԛјཏ௡Ă֭૟ιࣇͽཏ௡۞͞ёཉ (Action category) જү̶ᙷ TActionToolBar)ӈࠎaction bands۞౵ָּ̄Ą ̍׍Е۞ActionBand̮І(TActionMainMenuBarᄃ Action band ᙯᓑҌΞࢎᄦ̝Αਕܑᄃ̍׍Е۞˘௡જү۞टጡĄ͹Αਕܑᄃ ĄפAction Managerֽΐͽх ෛ඄જүĄଋ˵ΞͽҋҖᇤᆷࢎᄦ۞જүĂТॡֹϡજү୻ಏᄃ ă၆ྖ͞๴ăͽ̈́ځExit)ͽ̈́׎ιበᏭăॾё̼ăຩವăቢ˯ᄲ тĂᑫ९ፆү(ּтFile OpenăFile Save AsăFile Runăͽ̈́File ଋ۞ᑕϡ඀ё̝̚Ąּٺజֹϡ۞ᇾ໤۞જүĂౌ̏೩ֻ̟ଋϡ аᑕֹϡ۰ٙઇ۞ߙ࣎જүĂּт޷˭Αਕܑ̚۞ᏴีĄధк૱ (Action) જү ఙᄬ ؠཌྷ જүనؠ˯۞ఙᄬ 9.1ܑ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-23 І۞পّࣃĄᓝۏ͗މІůજү۞পّࣃົજၗгՀາۏ͗މזॡ˵ົᇆᜩ І͔൴જүॡĂજүົΐͽаᑕĄજүТۏ͗މજүů༊זІົᇆᜩۏ͗މ ࠎ࠹ᙯᓑ۞ྤफ़ะĄ ІԼតјۏ૟ϫᇾົีטІ˵Ξͽߏ̮࣎ІĄᓝּֽᄲĂྤफ़ଠۏϫᇾ ІĂ่่҃ಏ৷гฟୁ help ր௚Ąۏ˞ϫᇾ ІĄּтᇾ໤۞ help જүಶரΝۏٙѣ۞જү࠰ົֹϡϫᇾܧ̙࿅Ă֭ ۞જүĄТॡ૟఺ֱಏ̮௡྅੓ֽĂᖣͽயϠՀкሀ௡̼۞ᑕϡ඀ёĄ ϲ࠹၆ᑕޙᅮՐĂ۞ีט̮І۞ᇤᆷ۰Ξͽ੫၆΁ࣇٙనࢍăֹϡ̝ଠ ĄีטІ఼૱ߏଠۏІ̝˯Ă҃ϫᇾۏϫᇾٺІĈજү˜ߏүϡۏy ϫᇾ І۞ OnClick ְІ࠰ົజᙯᓑҌ׎ Execute ְІĄۏ͗މүĄ఼૱ֽᄲĂ ฟୁ࠹၆ᑕ۞જົܮϡ۰۞׻΄ॡ(఼૱ߏֹϡ۰޷˭˞໣ဂ)Ăιֹזќ Іତۏ͗މTMenuItemăTButtonăTCheckBoxăTRadioButton ඈඈ)Ą༊ Αਕܑีϫᄃ޷ต(ּт TToolButtonă TSpeedButtonăٺІం࿅ۏ ͗މІֹֽϡજүĄ౵૱֍۞ۏ͗މІĈົѣ˘ٕ࣎۰ߏк࣎۞ۏ͗މ y જүυื׶׎΁̮ІѣٙᙯᓑĂ఺ֱ̮І۞֎Ғ݋ѣĈ ΑਕܑีϫඈඈĄ˞פߏᏴ ൴ϠតજĂಶּтߏֹϡ۰޷˭˞޷ตăٕ۰ีטื࢑యаᑕĄ҃ٙᏜ۞ଠ ൴ϠតજॡĂιࣇυีטߏӎฟୁă(2)༊ߙଠีט۞В఼ّኳĂрͧߏߙଠ ܑ׻΄ăΑਕܑ޷ตඈඈĄજү۞Αਕѣ˟Ĉ(1)΃ܑிкֹϡ۰̬ࢬ̮̚৵ ϡ۰̬ࢬ̚۞ಏ˘ٕ࣎۰ߏк̮࣎৵ĂညߏΑਕֹٺߏ࠹༊ܮٙᏜ۞જүĂ ˯Ăٕߏ˘Ѩ˘࣎(ּт Tools|Customize)Ą Αਕܑ(ּт CutăCopyăᄃ Paste)ٺͽ૟ιࣇ̶ᙷĂֹ଀ιࣇΞͽјཏгజཉ Т UI ̮৵˯۞જүĄଋΞ̙ٺ༊ଋฟ൴ᑕϡ඀ёॡĂଋΞͽயϠ˘௡Ξϡ ңᏜજүĉ ˘༼Ą ଋ۞૞९ฟ൴଀ྭк࣎πέĂኛଋણ҂д9-32ࢱ̚۞Ķֹϡજү୻ಏķڍт ᄃ඀ёనࢍ͘Ίܝ9-24 ˢ ୻ಏķ˘༼Ą ࿅જү୻ಏ(TActionList)ֽΐͽ௡ᖐፋநĄኛଋણ҂д9-32ࢱ̚۞Ķనؠજү πέ۞૞९ฟ൴Ăଋ଀ֹϡ TToolBar ᄃΑਕܑ̮Іּт TMainMenuĂ֭౅ ො дώ༼̚۞̰टዋϡ Windows ᑕϡ඀ё̝̍׍ЕᄃΑਕܑ۞யϠĄࡶߏྭ யϠ̍׍ЕᄃΑਕܑ ֽҋࢎᑕϡ඀ё۞Αਕܑٕ̍׍ЕĄ ഇĂᑕϡ඀ё۞ֹϡ۰Ξͽ౅࿅׶ Action Manager በᏭጡᙷҬ۞၆ྖ͞๴ Ҍ action bandĄдેҖॡٸٳଋΞͽҋ Action Manager በᏭጡ˯Ă૟ีϫ ϲј௡۞જүĄдనࢍॡഇĂޙߏ޺ѣăܮaction bands ٙԷႊ඾۞֎ҒĂ y ֹϡ TActionToolbar ֽயϠ̍׍ЕĄ y ֹϡ TActionMainMenuBar ֽயϠ͹ΑਕܑĄ ϲ action bandsĈޙΞͽܮତ˭ֽĂଋ ϲଋপѣ۞າજүĄޙүĂٕ གྷϤજүგநጡ(TActionManager)ֽგநј௡۞જүĄଋΞͽֹϡᇾ໤۞જ ࠎ UI ̮৵Ăಶည̍׍ЕᄃΑਕܑ఺ᇹĄ ĄଋΞͽ૟જүயϠјีטĂឰଋ଀ͽ޽ؠҶԊྤੈͽ̈́˘௡ଠט೩ֻ۞፟ ਕૉᐼхѩ˘ྤफ़Ąaction bands ٙܮDelphi ೩ֻ˞ٙᏜ۞ action bandsĂ Яࠎજү̙֭ົჯ᜕Їң۞ĶҶԊ(layout)ķ(̙ኢγ៍ٕҜཉ)۞ྤੈĂٙͽ నؠ action bands ІΝĄ̮טଠ͗މజాତҌޢ఺ֱજү૟дൾ ޷׌Ѩӈົ΍ன)ֽΐˢăӁΝăࢦາ޷ଵજүĄా˯ۏeditorĂдજү୻ಏ ଋΞͽֹϡજүგநጡ(Action Manager)ٕજү୻ಏበᏭጡ(Action List ੵਕĂ҃តјѷҒĄ׀˘Іౌົజۏბ͗މFalse)Ă֤ᆃྍજү۞Տ࣎ ᄲĂ઄тдેҖഇมĂજүజੵਕ(disabled)˞(૟׎ Enabled পّనࠎּֽ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-25 ޷ตĂтဦ 9.2 ٙϯ)Ă֭ͷᏴፄĶNew Action…ķٕĶ New Standard x ޷˭ New Action ตय़۞˭ٛё቏ᐝ(Action ࢱចय़Π˯֎౵νᙝ۞ x ᗕᑝજүგநጡͽฟୁ Action Manager በᏭጡĄ 5 ૟જүΐҌ Action Manager በᏭጡ۞જү඄ॾ˯Ą Іᑭෛጡ̚ҋ Images পّᏴፄ ImgeList ۞ЩჍĄۏ ٺޢજүგநጡ˯Ă൒ٺ4 ૟ ImageList ాତҌજүგநጡĈА૟൏ᕇཉ నࢍ̍׍Е)ٺx TActionToolBar(ϡ నࢍ͹Αਕܑ)ٺx TActionMainMenuBar(ϡ Ҍܑॾ˯Ĉٸٳ Additional ࢱࢬ̚Ă૟˘ٕ࣎к࣎˭ࢗ۞ action bands ۞˯ۍ3 ҋ̮Іࢬ ٛ ImageList ̮ІҌܑॾ˯Ą(ଋ଀૟୬ϡ۞ᇆညΐҌ ImageList ̚)ٳ Win32 ࢱࢬ ۞ۍᇆညĂኛҋ̮Іࢬٸ2 ઄ࡶଋԓ୕дΑਕܑٕ̍׍Е˯ཉ ٛҌଋ୬யϠ̍׍ЕٕΑਕܑ۞ܑॾ˯Ąٳ (Additional ࢱࢬ̚Ă૟જүგநጡ̮І(TActionManager ۞˯ۍ1 ҋ̮Іࢬ ࡶຐֹϡ action bands ֽயϠΑਕܑᄃ̍׍ЕĈ ˭ࢗ۞඀Ԕ݋Հྎ௟гྋᄲ఺ֱՎូĈ Ҍᑕϡ඀ё۞̬ࢬ̚Ąٸٳy ૟જү y ࠎֹϡ۰̬ࢬயϠ action bands(˵ಶߏΑਕܑٕ̍׍Е)Ą y ૟જүΐҌજүგநጡ̚Ąજүგநጡົ૟ιࣇፋநјዋϡ۞જү୻ಏĄ Ҍܑॾ˯Ąٸٳy ૟જүგநጡ யϠΑਕܑă̍׍Еăͽ̈́׎ι action bands ۞˘ਠ඀ԔĂΒ߁˭ࢗ۞ՎូĈ જүีϫâтΑਕܑีϫٕ̍׍Е˯۞޷ตĄ ଋΞͽͽ఺ֱજүࠎૄᖂĂֽฟ൴ UI ̮৵Ą֭ͷֹϡ action bands ֽயϠ ᄃ͹ΑਕܑĄજүგநጡგந඾ᇾ໤۞જүĂͽ̈́ٙѣଋٙᇤᆷ۞ҋࢎજүĄ ኛଋֹϡજүგநጡֽҋજгֶፂଋᑕϡ඀ёٙ̚Βӣ۞જүĂயϠ̍׍Е ᄃ඀ёనࢍ͘Ίܝ9-26 ˢ Іᑭෛጡ̚Ăд Background পّ྆޽ؠᗞҒăᇹёăٕҜ̮ဦԛĄۏΞд File Αਕܑ̚ีϫ۞ࡦഀĄଋ ٺϫĄᓝּֽᄲĂᏴፄ File ឰଋ଀ͽԼត΍ன నؠΑਕܑ̚ีϫ۞ࡦഀĂኛдܑॾనࢍ̍׍̚޷˭ӣѣྍีϫ۞Αਕี ଋຐࢋڍІֽ૟ࡦഀᄃଵЕ͞ё޽ؠග̄ีϫĄтۏଋΞͽֶፂ׎જүϡ͗ ٕΠ͞۞ bannerĄ ٕ޷ต۞ᗞҒăᇹёăٕҜ̮ဦԛĄ఺׌࣎পّ˵ឰଋ଀ͽనؠΑਕܑν͞ ΑਕܑีϫٺଋΞͽֹϡ Background ᄃ BackgroundLayout পّĂֽ޽ؠϡ ૟ᗞҒăᇹёăٕဦͯΐҌΑਕܑă޷ตăᄃ̍׍Е ਕܑٕ̍׍ЕĂಶ׶ᇾ໤۞જү˘ᇹĄ ҌΑٸٳΞͽ૟ιࣇܮĂଋޢĶ༊જүᛈ൴ॡٙ൴Ϡ۞ְķĄдଋؠཌྷજү̝ ᇤᆷְІ఍ந඀ԔĂͽؠཌྷаᑕְІᛈ൴ॡ۞જүĄኛଋણ҂д9-33ࢱ̚۞ ࡶຐΐˢֹϡ۰ҋࢎ۞જүĂኛ޷˭ New Action ตֽயϠ TActionĂ֭ࠎ׎ ܑٕ̍׍ЕĄ Ҍଋຐࢋ۞Αਕٸٳ6 ૟ಏ˘જүٕજү̶ᙷҋ Action Manager በᏭጡ ׶˭ٛё޷ต New Action ޷ต ဦ9.2 Action ManagerበᏭጡ ҋ̎۞જү୻ಏ̚Ą үΐҌજүგநጡ۞જү඄ॾ̚Ąજүგநጡົ૟఺ֱજүΐҌι ពϯጡĄ૟˘ٕ࣎к࣎જүăٕ˘ᙷજېពϯ˘ፘົܮAction…ķĄ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-27 Іᑭෛጡ̚ҋ Images পّᏴፄᇆညЕܑ۞ЩჍĄۏٺޢ જүგநጡ˯Ă൒ٺ4 ૟ᇆညЕܑ(image list)ాତҌજүგநጡĈАჸ൏ నࢍ̍׍Е)ٺx TActionToolBar(ϡ నࢍ͹Αਕܑ)ٺx TActionMainMenuBar(ϡ Ҍܑॾ˯Ĉٸٳ Additional ࢱࢬ̚Ă૟˘ٕ࣎к࣎˭ࢗ۞ action bands ۞˯ۍ3 ҋ̮Іࢬ ฟॡĄ)ٸγ៍â۰ߏ޷˭ॡâ۰ߏ Files\Common Files\Borland\ Shared\Images ̚Ą(޷ตဦԛѣ׌჌ Program ٺ޷˭ OKĄߙֱᇹݡဦజཉޢ୬ֹϡ۞ဦԛĂԆல̝ 2 ૟୬ϡ۞ဦԛΐҌ ImageList ̚Ĉᗕᑝ ImageListĄ޷˭ Add ֭Ᏼᕱᜓଋ Ҍܑॾ˯ĄٸٳWin32 ࢱࢬ̚Ă૟ ImageList ̮І ۞˯ۍ1 ҋ̮Іࢬ ֽგநҜ̮ဦԛٕဦϯĄ ଀̍׍Е˯۞͛фĄଋΞֹϡ ImageListפଋΞ૟ဦϯΐҌΑਕܑีϫय़ٕ ૟ဦϯΐҌΑਕܑᄃ̍׍Е̚ ᗞҒăᇹёăٕҜ̮ဦԛĄ ፋ࣎̍׍ЕٕΑਕܑ۞ٺؠ Background ᄃ BackgroundLayout পّͽ޽ؠϡ Ᏼፄ TActionClientBarĄଋΞͽనޢband ะЪበᏭጡĂᏴፄ action band ൒ ࡶຐԼត action band ۞ࡦഀ(˵ಶߏд͹Αਕܑٕ̍׍Е˯)Ăኛ ౅ ࿅ action ᒺ̈Ąٕ̂ٸజ (blLeftBanner)ٕΠ͞(blRihtBanner)Ąଋ଀ቁܲ׎̂̈ϒቁĂЯࠎι̙֭ົ ϫ۞ν͞ีٺజཉົܮଋயϠ˞ bannerĂ֤ᆃ׎Ԇፋ۞ᇆညڍᄦĄт ёᘱ͞۞ځ׍ѣ blNormalăblStretchăٕ blTile ࡦഀ۞ีϫĂົజͽࡦഀ౅ ፋ࣎ડાĄ ͽ๱႕ีϫડાĂٕͽ᎑๴Ҭ۞ଵЕֽҶ႕̂ٸĂޢᇾᗟ̝ٺΞజϒ૱гཉ ࡦഀ۞͞ёĄᗞҒٕᇆညٸኛֹϡ BackgroundLayout পֽّೡࢗд̮৵˯ཉ ᄃ඀ёనࢍ͘Ίܝ9-28 ˢ ۞γ៍Ą Ӕனາ colormapົܮĂଋᑕϡ඀ё۞Αਕܑᄃ̍׍Еޢᇹё̝פ3 дଋᏴ Іᑭෛጡ̚ĂᏴፄ Style পّĄଋΞͽଂధк̙Т۞ᇹё̚ፄ˘ֹϡĄۏ2 д ٛҌܑॾ˯Ąٳ1 ଂ̮ІЕ˯۞ Additional ࢱѨ˯Ă૟ ActionManager ̮І ۞ Style পّĂࠎଋᑕϡ඀ё۞ΑਕܑᄃᏴಏĂ௚˘Ᏼፄ׎΁۞ᇹёĄ Ă̮І඀ёऱົֹϡ XP ᇹёĄኛֹϡ ActionManager ̮І˭ڶд࿰న۞ଐ ዋ۞ colormap ҋજгࠎଋ఍நଫٙѣ۞௟༼Ą ׍ѣధк௟຋۞ડҾĄIDE ົֹϡЪܮcolormap дΑਕܑᄃ̍׍ЕᙷҾ˯Ă ధк௟຋̝఍ĂΒ߁౵̈۞޷ตᙝቡٕߏΑਕܑ۞ౚᇆĄᓝּֽᄲĂXP ۞ ܑᄃ̍׍Е˯Ącolormap ˵ΞͽߏȈ̶ኑᗔ۞ĂԼតΑਕܑٕ̍׍Еγ៍۞ ߊѣ۞ΑਕזᗞҒΐ۞آٙᏜ۞ colormapĂΞͽߏȈ̶۞ಏ৷Ă่่Ϊ૟ዋ ĂIDE ົֹϡٙᏜ۞ colormap(Ғ૾ߍड)Ąڍ ֹϡ˘࡭Ғ૾ߛၹ۞ҋࢎӔன͞ёĄࠎ˞ኬ̟ଋᑕϡ඀ё˘࡭۞γ៍ᄃड़ ˞ᇾ໤۞ᇹё̝γĂଋ۞ᑕϡ඀ёΞͽӔன Windows XPăEncarta™Ăٕߏ Ąੵڍፄ̙Т۞Αਕܑᄃ̍׍ЕᇹёĂͽኬ̟ଋᑕϡ඀ёՀᖳಱ۞γ៍ᄃड़ ࣎Ҿ۞Αਕܑᄃ̍׍Е˘ᇹĂଋΞͽᏴזಶ׶ଋΞͽ૟̙Т۞ᗞҒăဦϯΐ ᏴፄΑਕܑᄃ̍׍Е۞ᇹё Αਕܑٕ̍׍ЕĄٺҋજг΍னົܮ8 ᇆည ࣎ีϫĂ֭ͷనؠ׎ Caption পّĄ ᗕᑝ׎ Items পّĄдะЪበᏭጡ̚ĂଋΞͽᏴፄ˘ٕ࣎кޢbandĂ൒ 7 ੫၆ଋΪຐιពϯဦϯ̙҃ពϯ͛ф۞̍׍ЕĈᏴፄ Toolbar action ܑٕ̍׍ЕĄ Ҍଋຐࢋ۞Αਕٸٳ6 ૟ಏ˘જүٕજү̶ᙷҋ Action Manager በᏭጡ ImageIndex পّనࠎဦԛдᇆညЕܑ̚۞በཱིĄ ϡ Action Manager በᏭጡ૟જүΐҌજүგநጡ̚ĄଋΞͽ૟׎ֹ 5 ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-29 3 ᗕᑝ Action Manager ͽฟୁ Action Manager በᏭጡĈ ଋ۞ action band ̮І(TActionMainMenuBarăTActionToolBar)Ąٸٳ 2 Ҍܑॾ˯Ąٸٳ1 ૟ Action Manager ̮І ଋ۞ᑕϡ඀ё̚ҋࢎ action bandĂଋΞͽĈٺࡶຐ̯ధᑕϡ඀ё۞ֹϡ۰Ă bands)Ą ֹϡ׶ Action Manager ᙷҬ۞ҋࢎ၆ྖ͞๴Ăֽҋࢎ̍׍ЕᄃΑਕܑ(action ᑕϡ඀ё۞ֹϡ۰̬ࢬ̚ĂٺΑਕܑĄдેҖॡഇĂଋᑕϡ඀ё۞ֹϡ۰Ξͽ ଋΞͽֹϡ action bands ລ੨ Action ManagerĂֽயϠΞҋࢎ۞̍׍Еᄃ யϠֹϡ۰Ξҋࢎ۞̍׍ЕᄃΑਕܑ ListsĂMRUs)Ą జֹϡ۞ีϫ୻ಏ(Most Recently UsedܕϏֹϡ۞ีϫăͽ̈́аᑕ౵ ϡ඀ёĄߙֱજၗֹϡ͞ё۞ቑּΒ߁˞ҋࢎ̍׍ЕᄃΑਕܑ۞γ៍ăᔳᖟ જၗ۞Αਕܑᄃ̍׍ЕĂਕឰֹϡ۰дેҖॡഇĂͽЧ჌̙Т۞͞ё࣒Լᑕ ϲજၗ۞Αਕܑޙ ҋࢎࣃĄ۞݈̝זϡ඀ё۞ኑώĂЯࠎѣΞਕົᅮࢋа Ξਕົԓ୕ᐼхଋᑕܮଋຐࢋ၁រЧ჌̙Т۞నؠࣃĂڍ᏷εĄтົܮؠࣃ ො ༊ଋҋࢎ colormap ॡĂኛॾγ۞͕̈Ą༊ଋᏴፄາ۞ colormap ॡĂᖞ۞న ܑ۞γ៍Ą Іᑭෛጡ̚Ăෛᅮࢋአፋ colormap ۞পّĂͽԼតଋ̍׍ЕᄃΑਕۏ3 д ІĄۏ colormap ٛҌܑॾ˯۞ٳ2 ԼតՏ࣎̍׍ЕٕΑਕܑ۞ ColorMap পّĂͽ޽ؠଋ Т۞ࣃĄ̙פధкϡͽአፋγ៍۞পّĂଂ˭ٛё୻ಏ̚ĂଋΞͽᏴז࠻ Іᑭෛጡ̚Ăଋົۏ˯ĞּтĈXPColorMap ٕ StandardColorMapğĄд ٛҌܑॾٳ1 ଂ̮ІЕ˯۞ Additional ࢱѨ˯Ă૟ዋ༊۞ colormap ̮І ĂኛଋĈڍγ៍ᄃड़ Ąࡶຐҋࢎ colormap ۞ڍଋΞͽֹϡ colormap ̮Іֽҋࢎᇹё۞γ៍ᄃड़ ᄃ඀ёనࢍ͘Ίܝ9-30 ˢ జᔳᖟĄPrioritySchedule ۞࿰నࣃт˭ܑٙЕĈົܮ֤ᆃีϫ PrioritySchedule ٙ̚ՙؠ۞ࣃĂ ٺ׎मࣃ̂ڍϡॡ۞ session በཱིͧྵĄт session ౵̂በཱིࣃĄ఺࣎ࣃົజोֽ׶ϫ݈ session በཱིͽ̈́ีϫ˯Ѩజֹ ۞ז۞ session በཱིĄUsageCount ̝ࣃజϡֽߤྙีϫдజᔳᖟ̝݈Ăົ྿ ёેҖ۞Ѩᇴ(ԧࣇᑕྍ૟ѩѨᇴჍࠎ session በཱི)ͽ̈́˯Ѩߙજүజֹϡ TActionClientItem ۞ UsageCount ᛼Ҝ̚ĄAction Manager ˵ົ੃ᐂᑕϡ඀ Ψ۞ѨᇴĂѩѨᇴᐼхд࠹၆ᑕ̝ײજүგந۰ົ੃ᐂજүజֹϡ۰ File Αਕܑ)̚۞ٙѣีϫăٕٙѣีϫĄ నҖࠎĂҭߏ఺࣎ҖࠎΞͽజԼតĂ̙҃ᔳᖟߙֱ࣎Ҿีϫăߙ࣎ะЪ(ּт ࣃĂֽаೇٙѣ action band ีϫ۞ΞෛّĄีϫᔳᖟߏ action bands ۞࿰ ĄТᇹ۞Ăֹϡ۰Ξͽдҋࢎ၆ྖ͞๴̚Ăࢦనֹϡத௚ࢍזజ࠻ޘΞГܮ ֹٙϡ۞ีϫĂ҃ᔳᖟ׎ዶีϫĄ༊ֹϡ۰޷˭˭ٛ޷ตॡĂజᔳᖟ۞ีϫ ൑ଂ଀֍Ąaction bands តјᑕϡ඀ёֹϡ۰ΞҋࢎĂ่ពϯ΁ࣇܮֹϡ۰ ߏĂϏֹϡ۞ีϫᄃ̶ᙷౌົజᔳᖟ੓ֽĂܮ˘ֹϡ ActionBands ۞р఍̝ ᔳᖟ action bands ̚Ϗֹϡ۞ีϫᄃ̶ᙷ ีϫĂ֭ͷֹϡଋ೩ֻග Action Manager ۞જүֽயϠ̍׍ЕĄ Αਕܑٸٳϯ׶ Action Manager በᏭጡᙷҬ۞ҋࢎ၆ྖ͞๴Ąֹϡ۰Ξͽ Customize ޽΄Ăѩ޽΄ົព פਕхܮĂֹϡ۰ޢ༊ଋበᛌ֭ેҖᑕϡ඀ё 4 በᛌଋ۞ᑕϡ඀ёĄ ΐҌ̍׍ЕٕΑਕܑ˯) Ҍ action band ̮І˯Ą(ኛቁᄮଋ̏૟ Customize જүٸٳx ૟જү хֹϡ۰ٙઇࢎᄦજү۞ᑫ९ЩჍĄ ActionManager পّĂ૟ιాତҌ Action Manager ˯ĄଋΞ޽ؠᐼ Ҍܑॾ˯ĂТॡֹϡ׎ٸٳx ૟ TCustomizeDlg ̮Іҋ Dialogs ࢱࢬ ბ۞ Customize જүĄغ ᇾ໤જү୻ಏٺᑕϡ඀ё̚۞જүΐˢĄТॡ˵ΐˢ΍னٺx ૟୬ϡ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-31 ଋણ҂ቢ˯ Help ۞ FindItemByAction ᄃ FindItemByCaptionĄ Ăኛڱ୻ಏ̚જү۞͞זMRU list ۞ซ˘Վྤੈăቑּ඀ёቅăͽ̈́Ա ٺᙯ Ąڱϫ۞͞ีזёĂ҃ߏӣѣ˘ֱΞͽ౅࿅જүٕᇾᗟֽԱ ԔгԼត৶͔۞ᇴࣃݭึԔĄTActionManager ֹ̙ϡણ҂ᇴࣃݭ৶͔۞͞ ֹϡ۰ΞਕົԼតีϫ۞ึԔĂٕࠤҌଂ action bands ̚ΐͽӁੵĂ఺ົֶ ̝ ActionBars পّ۞পؠᇴࣃݭ৶͔ણ໰ĂᆷѪд඀ёቅ྆ᐝĄдેҖॡഇĂ ϲ MRUs ॡĂ౵ࢋღ۞ְĂ̙֭ߏ૟၆ Action Managerޙдࠎଋ۞ᑕϡ඀ё MRU listĄ טёଠ ᑫ९Ąֹϡ action bands ॡĂଋΞͽдଋ۞ᑕϡ඀ё̚ᇤᆷ඀۞פٙхܕ౵ ϡ୻ಏ(Most Recently UsedĂMRU list)ͅᑕ˞ֹϡ۰дপؠᑕϡ඀ёֹܕ౵ ϡ(MRU)۞୻ಏֹܕϲ౵ޙ ׎ HideUnused পّనࠎ FalseĄ ІĂ֭૟ۏ ࠤҌ͹ΑਕܑЕజᔳᖟĂኛԱ΍ᙯᓑҌྍะЪ۞ TActionClients UsageCount నࠎ-1Ąࡶຐ֨ͤፋ࣎ะЪ̚۞ٙѣีϫ(ּт File Αਕܑ)ăٕ ІĂ֭ͷ૟׎ۏ ѣΒӣι۞ะЪ)జᔳᖟĂኛԱ΍׎ TActionClientItem ၗĄࡶຐ֨ͤߙ࣎পّ۞ีϫ(ͽ̈́ٙېдనࢍॡഇΞͽᙯౕ၆ߙีϫ۞ᔳᖟ 25ٕՀк 31 14-24 29 9-13 23 6-8 17 4, 5 12 3 9 2 6 0, 1 3 జᔳᖟົޢĂགྷк͌sessionsޢaction bandีϫజֹϡ۞session࣎ᇴ дีϫ˯Ѩֹϡ Action Manager̝PriorityScheduleপّ۞࿰నࣃ 9.2ܑ ᄃ඀ёనࢍ͘Ίܝ9-32 ˢ ޷˭ OKĄٕ۰ߏĂޢજү୻ಏ̚۞જүĂ൒זኛᏴፄٙѣҰຐࢋΐ ̙Т۞̶ᙷ̝̚(ּт DatasetăEdităHelpăᄃ Windows ඈඈ)Ą b д Standard Actions ၆ྖ͞๴̚Ă࿰Аؠཌྷр۞જүົజ̶дᇴ࣎ ፄ New Standard ActionĄ a ֹϡдበᏭጡٙ̚Е΍࿰Аؠཌྷр۞જүĈ޷˭໣ဂΠᔣĂТॡᏴ І˯ా޷׌˭Ăͽฟୁજү୻ಏበᏭጡĄۏ 2 д TActionList Standard ࢱࢬ˯Ą) ۞ڕІࢬ ІٛҌܑॾٕߏྤफ़ሀ௡̚Ą(ActionList ۞Ҝཉߏд̮ۏ 1 ૟ TActionList Ĉځͽ˭݋ߏՀྎ௟۞Վូᄲ Іତా˯જүĄۏ͗މy ૟ y నؠજү۞পّĄ જү୻ಏ̚Ąזy ૟જүΐ ϲજү୻ಏĄޙ y ᖎಏĂΪࢋଋਕ˞ྋ׎̚۞఺ೀีૄώՎូĈ૱ܧજү୻ಏ۞నؠ నؠજү୻ಏ ၗֽฟୁăᙯౕજүĄېಏ˘ăะ̼̚۞͞ёĂֶፂᑕϡ඀ё۞ ΞͽВϡેҖજүॡ۞඀ёቅĂ˵Ξͽ೩ֻܮਕගะ̚გநĄтѩ˘ֽĂଋ ІĂଋΞͽ૟ᑕϡ඀ёҋֹϡ۰̬ࢬٙેҖ۞Αۏ۰۞ҖࠎĄ౅࿅ֹϡજү જү୻ಏჯ᜕඾˘Њજү۞୻ಏĄଋ۞ᑕϡ඀ёΞͽӀϡѩ୻ಏֽаᑕֹϡ bands ᄃ Action Manager ۞ֹϡ͞ёĄ ኛଋણ҂ௐ9-21ࢱ̚۞Ķ௡ᖐ̍׍ЕᄃΑਕܑ۞જүķĂͽ˞ྋт action ͷ೩ֻՀк۞ᏴፄĄજү୻ಏົజ Action Manager ҋજ۞఍நଫĄ҃ٽࠎट Ą̙࿅Ăֹϡ action bands ݋Հڱ۞૞९ฟ൴Ăଋ˵Ξͽֹϡѩ఍ٙࢗ۞͞ πέฟ൴ॡ̍׍ЕᄃΑਕܑ۞నؠĄࡶߏ Windowsྭٺො дώ༼̚۞̰टዋϡ ϡજү୻ಏֹ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-33 ְІ̙ۢ྽тң఍நߙજүĂ֤ᆃ˫ົ͔൴Ω˘ҚְІĄ ༊˘ְІజᛈ൴ॡâాҚጱ࡭˘ਠજү۞ְІᐌӈົ͔൴Ą֤ᆃĂ࣐ࡶྍ ְІజᛈ൴ॡ͔ٙ൴۞ड़ᑕ ଋҋҖᇤᆷજүĂ֤ᆃଋ૟ᅮࢋՀ˞ྋજүజᛈ൴ॡĂົ͔൴̦ᆃְଐĄڍт ͛ІĂᖣͽ߄Ᏼ˘࣎౵௑Ъଋᅮࢋ۞ᇾ໤જүĄځଋΞͽᑭዦቢ˯۞ણ҂ᄲ ᇾ໤۞જүĂည TEditDeleteăTDataSetPostĂ࠰ͽଋٙ࿰ഇ۞Җࠎдྻү඾Ą x Ᏼፄଋຐࢋ۞જүĄ ّົЕ΍Ξϡ۞જүĄ Іᑭෛጡ̚ĂAction পۏĄдีטx дܑॾٕߏྤफ़ሀ௡˯ᕇᏴྍଠ ІĈۏ͗މ5 ૟જү୻ಏ̚۞જүତా˯ᅮࢋ۞ྍજү۞ ĄځϨ۞ᄲځ۞ĶְІజᛈ൴ॡ͔ٙ൴۞ड़ᑕķĂ֤׊Հ ඀ԔĂϡͽؠཌྷ༊જүజᛈ൴ॡĂιᑕ༊тңаᑕĄኛણ֍д9-33ࢱ̚ ᅮࢋࠎ׎ᇤᆷְІ఍நܮҋ̎۞જүĂ֤ᆃଋٺϲᛳޙଋߏڍёĄҭт 4 ࣐ࡶଋֹϡ˞࿰Аؠཌྷ۞જүĂ఺࣎જү݋ົҋજயϠᇾ໤۞аᑕ͞ ү۞ Checked পّݒߏ၆ᑕҌ TToolButton ۞ Down ᛳّĄ ၆ᑕҌ TToolButton ۞ Enabled পّĄ̙࿅Ăညજܮજү۞ Enabled পّ І࠹၆ᑕ۞পְّٕІ࠹ТĄּтĂۏ͗މ఺ֱপّᄃְІ۞ЩჍ׶ົ ඗၆)ĂܧІ۞পّᄃְІĄ఼૱(ҭ֭ۏ͗މᄃ Execute)݋̶Ҿ၆ᑕҌ׎ CheckedăEnabledăHelpContextăHintăImageIndexăShortCutăVisibleă જү۞ Name পّߏϡͽᙊҾྍજү۞Ă҃׎΁۞পّᄃְІ(Captionă ІĄ)ۏ͗މՏ࣎ྍજү۞זᜩ ૟ົᇆڍІ۞পّࣃĄ(҃Ұٙనؠ۞ඕۏІᑭෛጡ̚જүۏ3 నؠՏ࣎д Ᏼፄ New ActionĄޢϲଋҋ̎۞જүĈ޷˭໣ဂΠᔣĂ൒ޙ c ᄃ඀ёనࢍ͘Ίܝ9-34 ˢ ѩ௣ඕĄᓝּֽᄲĈזܮа TrueĂ҃ͷፋ࣎఍ந۞࿅඀Ă็ົܮ ޽ؠ˞఍ந඀ԔĂ҃ͷι˵఍ந˞ྍְІĂ֤ᆃѩ͔ᇴڍа FalseĄт็ ˭ڶ ٙѣજү୻ಏ۞ְІ఍ந඀Ԕ࠰ѣ˘Щࠎ Handled ۞͔ᇴĂ࿰నଐ ତ͘ĄົܮְІĂ֤ᆃᑕϡ඀ё 1 ࣐ࡶଋࠎજү୻ಏ೩ֻ˞ OnExecute ְІ఍ந඀ԔĂ҃ͷι˵఍ந˞ྍ Աವϡͽаᑕֹϡ۰۞͞ёĂӈߏֶೈ˭ࢗ۞ึԔֽซҖ̶ࠁĈ જүώ֗ĄՀ୻຾гֽᄲĂ DelphiזІ࠰Ϗΐͽ఍நĂ֤ᆃ̖ົ዇ۏϡ඀ё ࡶߏજү୻ಏᄃᑕޢІĄ౵ۏĂତ඾̖ߏᑕϡ඀ёڱ͞ ၆ᑕજү۞ Execute Ψ࠹ײॡĂDelphi ࢵАົॲፂજү୻ಏ۞̰टĂีטଠ͗މ༊ֹϡ۰޷˭ߙ y જү y ᑕϡ඀ё y જү୻ಏ ְІ఍ந඀Ԕ଀ͽаᑕְІ۞ึԔт˭ٙࢗĈ ҖѩҖࠎĄે ົܮҖࠎĂ༊ְІ൴ϠॡĂ۞ޙಶ̙υፉ͕ѩְĂЯࠎᇾ໤۞જү࠰׍ѣ̰ Аؠཌྷ۞ᇾ໤જүॡĂ̖ᅮࢋΐͽ҂ᇋĄࡶଋֹϡ۞˜ߏᇾ໤۞જүĂ֤ᆃ જүĂֹ̙҃ϡְ۞ޙ୻ಏăᄃᑕϡ඀ёĄ̙࿅Ă఺˵่ѣд˘ਠଋֹϡາ ଋΞͽдˬ჌̙Т۞ᆸѨ˯೩ֻϡͽаᑕ۞ְІ఍ந඀ԔĂӈĈજүăજү ְІ఍ந඀ԔķొЊĄ ІᄃְІ఍ந඀Ԕ۞˘ਠّྤੈĂኛଋણዦௐ 6 ౢ̚۞ĶྻϡְІᄃְٺො ᙯ end; ToolBar1.Visible := not ToolBar1.Visible; { Toggle Toolbar1’s visibility } begin procedure TForm1.Action1Execute(Sender: TObject); Լត˘̍׍Е۞ Visible পّࣃĈົܮԔĂдྍજүజેҖॡĂ ߙજү۞ְІ఍ந඀˞ځᄲܮ൴˘ాҚ۞ְІĄᓝּֽᄲĂ˭Е۞඀ёቅ͔ ົܮజ޷˭ٕ۰ߏүϡ˞Ăдଋਕΐͽаᑕ۞г͞ĂีטІٕߏଠ̮͗މ༊ І۞аᑕְ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-35 ĄۏΞ၆࿰Аؠཌྷ̝જүᙷҾ۞ϫᇾזңгԱ ᑕϡ඀ёт˞ځಓ੓ྍજүĄኛણ҂˭˘༼̚۞̰टĂдྍ͛̚ྎ௟гᄲົ ܮॡĂιۏ࣎ྍજүۢ྽тңΝΐͽؠӬ۞ϫᇾ˘˞זĄ༊ᑕϡ඀ёԱۏᇾ ྏ඾ΝԱ΍˘࣎ΞϡͽેҖ۞ϫົܮ࠹၆ᑕ۞ְІ఍ந඀ԔĂ֤ᆃᑕϡ඀ё дՏ˘ᆸౌ՟ѣڍĄт(ีטপؠ۞ϫᇾᙷҾ̝˯(ּтበᏭଠٺ྽тңүϡ ϲҋѣ۞જүᙷҾĂ҃఺ֱᙷҾώ֗ӈۢޙજүăٕ۰ߏ۞ޙଋΞͽֹϡ̰ జ͔൴Ąົܮ֗۞ OnExecute ְІ఍ந඀Ԕ ᑕϡ඀ё۞ OnExecute ְІ఍ந඀Ԕ֭Ϗ఍நྍְІĂ֤ᆃજүώڍ3 т ndled := True; end; Ha { ඕՁᑕϡ඀ёٙ̚ѣજү۞ેҖ } begin var Handled: Boolean); procedure TForm1.ApplicationExecuteAction(Action: TBasicAction; ҌѩࠎͤĄᓝּ҃֏Ĉܮ а TrueĄ҃ͷፋ࣎఍ந۞඀Ԕົ็ົܮ ˞జ͔൴۞ְІĂ֤ᆃ Handled ͔ᇴĂ࿰నϺ็а FalseĄ઄ࡶԧࣇ޽ؠ˞ְІ఍ந඀ԔĂТॡι˵఍ந ְІ఍ந඀Ԕ˘ᇹĂOnActionExecute ఍ந඀Ԕ˵ѣ˘࣎Щࠎ Handled ۞ Щࠎ OnActionExecute ۞ְІĄಶྫྷજү୻ಏ۞ OnExecuteזְІॡĂќ ІĂົдᑕϡ඀ё̚۞Їңજү୻ಏĂ՟ѣΐͽ఍நۏ Бા۞ᑕϡ඀ё ᚶᜈેҖĄົܮι఍ந˞Ă֤ᆃᑕϡ඀ёڍజ͔൴Ąҭтົܮ ந඀Ԕ֭Ϗ఍நྍְІĂ֤ᆃᑕϡ඀ё۞ OnActionExecute ְІ఍ந඀Ԕ 2 ઄ࡶଋ֭Ϗࠎજү୻ಏᇤᆷ OnExecute ְІ఍ந඀ԔĂٕ۰ߏྍְІ఍ ֶᖞ޺ᜈ˭ΝĄ ଋ՟ѣдજү୻ಏ̚૟ Handled నࠎ TrueĂ֤ᆃፋ࣎఍ந۞඀Ԕ૟ڍ т end; Handled := True; begin var Handled: Boolean); procedure TForm1.ActionList1ExecuteAction(Action: TBasicAction; ᄃ඀ёనࢍ͘Ίܝ9-36 ˢ end; (Sender as TAction).Checked := ToolBar1.Visible; { ޽ϯ ToolBar1 னдߏӎពϯ } begin procedure TForm1.Action1Update(Sender: TObject); ķߙ࣎જүĈפॡĂĶ८ ̍үĄಶည˭Е඀ёቅ̚۞ OnUpdate ְІ఍ந඀Ԕົд̍׍Еពϯ΍ֽ ඈඈ۞פঐ८פă׶פะ̚۞͞ёֽેҖ඀ёቅĂᖣͽેҖୁજ׶ᙯౕă८ ពϯ۞Αਕܑีϫ۞જү˯Ą఺೩ֻ˞˘࣎፟ົĂֹ଀ᑕϡ඀ёΞͽϡٕ̏ ีטՏ࣎ତాҌΞ֍ଠٺ༊ᑕϡ඀ёยཉॡĂι۞ OnUpdate ְІ૟ົ͔൴ Հາજү ߏ˘ּĄܮćည File Open ၆ྖ͞๴ۏ۞જү̙֭ົֹϫᇾ Ξͽ૟ѩְ؎੉ග࠹၆ᑕྤफ़௡̮ІĄТᇹ۞Ăѣֱ࿰Аؠཌྷрܮຏ̮ۢІ ຩವ۞જү؎੉ග࠹၆ᑕ۞̮ІćᓝּֽᄲĂྤफ़ۏΞͽ૟ϫᇾีטѣֱଠ Ă֤ᆃдְІజᛈ൴ॡĂ̦ᆃְଐౌ̙ົ൴ϠĄۏዋ༊ϫᇾזᔘߏԱ̙ޢࡶ౵ Ąۏઇࠎϫᇾีטд active ۞ܑॾ˯Աವ׎ι۞ଠົܮĂ֤ᆃᑕϡ඀ёۏ ၗ۞ܑॾ̙ዋЪઇࠎ˘ϫᇾې active ٺĈ࣐ࡶϫ݈఍ีט3 ܑॾ˯۞ଠ ၗ۞ܑॾĄې active ٺԱವ൪ࢬ˯ϫ݈఍ົܮᑕϡ඀ё Ă֤ᆃۏઇࠎ׎ϫᇾڱ൑ีטၗ۞ଠې active ٺĂٕ۰ߏ఍ีטၗ۞ଠ ې active ٺЇңϫ݈఍זၗ۞ܑॾĈ઄тᑕϡ඀ё֭ϏԱې active ٺ2 ఍ ĄۏĂֽઇࠎΞਕ۞ϫᇾีטଠ ၗ۞ې active ٺĈᑕϡ඀ёࢵАົຩವϫ݈఍ีטၗ۞ଠې active ٺ1 ఍ Ĉۏᑕϡ඀ёົֶт˭ٙࢗ۞ึԔֽԱವ׎ϫᇾ ІĄۏ׎˯۞ϫᇾٺྏ඾ΝԱ΍ྍજүΞ߉ϡҋ̎ົܮϡ඀ё І఍ந඀Ԕ۞ྖ(̙გߏдજү୻ಏăᑕϡ඀ёăٕߏજүลᆸ˯)Ă֤ᆃᑕ үॡĂፋ࣎఍ந඀Ԕ۞ેҖฉഇĄ࣐ࡶ՟ѣЇңజ޽ؠϡͽаᑕྍજү۞ְ д9-33ࢱ۞ĶְІజᛈ൴ॡ͔ٙ൴۞ड़ᑕķ˘༼Ăೡࢗ˞༊ֹϡ۰͔൴˘જ ё͞۞ۏજүವԱϫᇾ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-37 ϫĄี۞̚ีטგந୻ಏពϯଠٺજү ϡีט୻ಏଠ ࣎ķ޷ตĄ ЧࢱѨมொજĂּтჟី̚۞Ķ݈˘࣎ķăĶ˭˘۞ีטдࢱចଠٺજү ϡีטࢱចଠ टॡĂٙᑕ׍౯۞В఼ҖࠎĄ ̰۞̚ีט҃ͷֹϡ۰д׎˯ࣣрਕૉᔣˢຩವфҚͽຩವበᏭଠ ሀё၆ྖ͞๴జពϯĂܧຩವᏴี˯ĂTSearchAction၁ү˞ٙѣٺຩವજү ϡ ᑫ९۞ፆү̝˯ĂּтFile OpenăFile ExitĄٺᑫ९જү ϡ үMDĪܑॾ۞ଵЕăࢦᝑពϯăᙯౕă֭ଵă౵̼̈Ą ၁ܮĂͽڱᙷҾ۞ࢉϠᙷҾĂՏ˘࣎ౌົᖬᆷ׎ExecuteTarget͞غૄ ĄͽTWindowActionࠎۏᇾ໤۞ෛ඄જү дMDIᑕϡ඀ё̚Ăͽܑॾүࠎ఍ந۞ϫᇾ Ăᖣͽ૟׻΄็ᅍගHelpր௚ĄڱҾĂ࠰ᖬᆷ׎ExecuteTarget͞ ᙷҾ۞ࢉϠᙷغĄٙѣͽTHelpActionࠎૄۏ఍நЇңϫᇾٺᇾ໤Helpજү Ξϡ Ăͽ၁үॾё̼ϫᇾ۞̍үĄڱExecuteTargetᄃUpdateTarget͞ ᙷҾ۞ࢉϠᙷҾĂՏ˘࣎ౌົᖬᆷ׎غTRichEditActionࠎૄ ቢăᄃ৔ԶቢඈॾёĄͽغ఍ந͛ф۞௖វă୆វăٺᇾ໤ॾё̼જү ϡ ગ˭׶෭˯ඈ̍үĄ ϡગ෭ᘨֽ၁үኑᄦăֹܮĂͽڱՏ˘࣎ౌົᖬᆷ׎ExecuteTarget͞ ᙷҾ۞ࢉϠᙷҾĂغ఍நĄͽTEditActionࠎૄ۞ۏϫᇾטበᏭଠٺᇾ໤۞በᏭજү ϡ ̶ᙷ ೡࢗ ܑ9.3 જү̶ᙷ ΐͽፋநĈ ІĄ࿰న۞જүͽ˭ࢗ۞̶ᙷֽۏăົҋજгેҖજү۞ޙүߏ Delphi ̰ٙ ពϯĂ֭Е΍࿰నؠཌྷр۞̶ᙷĂͽ̈́࠹၆ᑕ۞ᇾ໤જүĄ఺ֱજົܮ͞๴ ૟࿰Аؠཌྷр۞જүΐҌଋ۞ᑕϡ඀ёĄNew Standard Action Classes ၆ྖ Action Manager ̝˯޷˭໣ဂΠᔣ֭Ᏼፄ New Standard Action ֽ ٺଋΞ ࿰Аؠཌྷ۞જүᙷҾ ࢦгᇆᜩፋ࣎ᑕϡ඀ё۞ड़ਕĄ кॡมĂ૟ົᚑ͉˞܅І఍ந඀ԔְڍёยཉॡĂౌົેҖ఺ֱ඀ёቅĄт OnUpdate ְІ఍ந඀Ԕ̰ĂЯࠎՏѨᑕϡ඀ זٸਈॡ۞඀ёቅޝᛋӘ ኛ̙ࢋ૟ ᄃ඀ёనࢍ͘Ίܝ9-38 ˢ ёķ˘༼Ą͞۞ۏ9-36ࢱ۞ĶજүವԱ׎ϫᇾ ІĄኛણዦۏІӈࠎϫᇾۏҖĄTarget͔ᇴٙ΃ܑ۞ેآ఺˘Ѩߏӎዋ ιҋ̎ځІܑۏឰજүڱΨĄHandlesTarget͞ײజҋજгົܮॡĂι І(ּт̍׍޷ตăΑਕܑีϫ)ۏHandlesTarget ༊ֹϡ۰ಓ੓ߙ࣎ତాҌྍજү۞ ೡࢗ ڱ͞ ೡࢗт˭Ĉ۞ڱϡͽેҖপঅ۞̍үĄ఺ֱ͞ Ą׎ࢉϠᙷҾ఼૱݋ົᖬᆷ ExecuteTargetڱ͞۞˯І̝ۏপؠᙷҾٺטࢨ ۏ఼૱࠰ᖬᆷ˞ HandlesTargetăUpdateTargetăͽ̈́׎΁ϡͽ૟જү۞ϫᇾ ҖࠎĄ఺ֱགྷপঅ̼̝જү۞ૄᖂᙷҾ(TEditActionăTWindowActon ඈඈ) ߏ̮І၁ү΍׎পؠ۞ٕีטᖣͽࢉϠ΁ࣇٙ૞ϡ۞જүᙷҾĂֽࠎߙֱଠ ̮І۞ᇤᆷ۰Ξͽֹϡд QStdActns ᄃ DBActns ಏ̮۞ᙷҾֽઇࠎቑּĂ Ą˯̝ۏϫᇾٺΞͽүϡܮᇤᆷЇң۞ְІ఍ந඀ԔĂι Ă҃ͷ̙ᅮࠎιีטଠ͗މ˘Ξͽᖎಏг૟ѩજү޽ࠁ̟ܮϫᇾᙷҾॡĂଋ ٺᙷҾ˘ਠгֹϡଋٙࢎᄦ۞જүĄѩӈĂ༊જүਕૉజᙊҾТॡүϡҋ֗ ΞͽтТֹϡ࿰Аؠཌྷ۞જүܮߙֱϫᇾᙷҾ̝˯Ąତ඾Ăଋٺͽֹ׎ેҖ ଋ˵Ξͽχౄҋᛳ۞࿰АؠཌྷજүᙷҾĄ༊ଋᇤᆷҋ̎۞જүᙷҾॡĂଋΞ ᇤᆷજү̮І ͽ˞ྋιࣇྻү۞͞ёĄ Ąኛણዦ HelpזԱ̚ځІౌΞͽֶ׎ЩჍдቢ˯۞ણ҂ᄲۏٙѣ˯ࢗ۞જү bandsពϯҋࢎ၆ྖ͞๴Ą ̍׍જү ̍׍Ĉᗝγ۞̍׍ĂּтTCustomizeActionBarsਕҋજгࠎaction Ąۏᕱᜓ֭በᏭϫᇾ ܮĂͽڱᄃUpdateTarget͞ڱࢉϠᙷҾĂ࠰ົᖬᆷ׎ExecuteTarget͞ ᙷҾ۞غĄٙѣͽTDataSetAction ߏࠎૄۏྤफ़ะજү ϡֽ఍நྤफ़ะ̮Іϫᇾ Internetᕱᜓă˭ྶăᄃฎІ൴ਖ਼۞ΑਕĄٺInternetજү ϡ ҖࠎĄՏ࣎ࢉϠᙷҾౌ΃ܑߙ࣎পؠ۞၆ྖ͞๴Ą ၆ྖ͞๴̮ІĄTDialogAction၁ү˞ેҖॡពϯ၆ྖ͞๴۞В఼ٺ၆ྖ͞๴જү ϡ ᙷ ೡ̶ࢗ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-39 ޢॾ̰Ă൒ܑזଋ۞ܑॾ̰ĄଋΪࢋ૟Αਕܑ̮Іΐזٕҋࢎ۞ΑਕܑǕΐ Αਕܑనࢍ̍׍(Menu Designer)ឰଋᅅᗫг૟ΑਕܑǕ̙გߏ࿰Аనࢍ۞ Т˘ཏ௡۞޽΄ĄٺΑਕܑ೩ֻ˞˘࣎ᖎಏ۞͞ёĂឰֹϡ۰ેҖទᏭ˯ᛳ ϲ׶გநΑਕܑޙ Г˵̙ົ΍னдજү୻ಏበᏭጡ̚ĄܮΨ UnRegisterActions ॡĂજүײ༊ଋ TWindowTileVertical, TWindowMinimizeAll, TWindowArrange], TStandardActions); RegisterActions('Window', [TWindowClose, TWindowCascade, TWindowTileHorizontal, RegisterActions('Edit', [TEditCut, TEditCopy, TEditPaste], TStandardActions); RegisterActions('', [TAction], nil); { ᇾ໤જү۞ොΊ } ШፋЪฟ൴ᒖဩොΊᇾ໤۞જүĈົܮᓝּֽᄲĂ˭Е۞඀ёቅ ௡ᖐଋ۞જүĄ˵Ξͽࠎ׎೩ֻ Resource ણᇴĂᖣѩనؠ࠹ᙯ۞࿰నপّࣃĄ ̝̚Ă҃ͷΞࠎଋ۞ᑕϡ඀ёٙϡĄଋΞͽࠎ׎೩ֻ˘̶ᙷЩჍĂᖣͽԁච જү୻ಏበᏭጡٺΨ˞ RegisterActions ॡĂଋٙොΊ۞જүӈົ΍னײ༊ଋ procedure UnRegisterActions(const AClasses: array of TBasicActionClass); TBasicActionClass; Resource: TComponentClass); procedure RegisterActions(const CategoryName: string; const AClasses: array of ঐොΊĈפበᏭጡ̚ĄଋΞͽֹϡд Actnlist ಏ̮۞Бા૱ёֽซҖොΊᄃ જү୻ಏٺ༊ଋᇤᆷҋѣ۞જүॡĂଋΞͽොΊ఺ֱજүĂᖣͽֹιࣇ΍ன ොΊજү Іజᛈ൴ॡ͔ٙ൴۞ड़ᑕķ˘༼Ą ΃OnExecuteĄኛણዦ9-33ࢱ̚۞ĶְפΨĄιజϡͽײజҋજгົܮ ۰ߏ޷˭˞ߙ˘̍׍޷ตĂ҃఺ֱ̮І࠰ତాҌѩજүॡ)ॡజᛈ൴Ă ExecuteTarget ༊જүдаᑕֹϡ۰۞Җࠎ(ּтĂֹϡ۰Ᏼፄ˞ߙ˘Αਕܑีϫăٕ ኛણዦ9-36ࢱ۞ĶՀາજүķ˘༼Ą ၗՀາιࣇҋ̎Ąኛϡιֽ΃ആOnUpdateActionĄېΞͽॲፂϫ݈۞ ܮΨĄ఺ᇹ̄˘ֽĂજүײజҋજгົܮڱUpdateTarget ༊ᑕϡ඀ёยཉॡĂѩ͞ ೡࢗ ڱ͞ ᄃ඀ёనࢍ͘Ίܝ9-40 ˢ Standard ࢱࢬ̰Ą ۞ۍІࢬ̮ٺଋ۞ܑॾ̚Ą఺׌࣎Αਕܑ̮ІౌҜזTPopupMenu ̮Іΐ ଋΞֹϡΑਕܑనࢍ̍׍ֽనࢍଋ۞ΑਕܑĄኛА૟ TMainMenu ̮Іٕ ฟୁΑਕܑనࢍ̍׍ ଀Հк۞ણ҂ྤੈĄפ̚۞Ķ૟ְІ఍ந඀ԔᙯᓑҌΑਕְܑІķ˘༼̚Ă ΑਕܑᏴีдజᏴፄॡĂтңг׶඀ёቅ࠹ඕЪҚాĂଋΞͽдௐ 6 ౢٺᙯ ԣଥᔣ ̶࿣ቢ ΐిᔣ Αਕܑ୻ಏ˯۞Αਕܑีϫ ΑਕܑЕ˯۞Αਕܑีϫ ဦ9.3 Αਕܑఙᄬ y ૟ᇆညΐˢΑਕܑีϫ̚ ۍy ૟Αਕܑхјᇹ ۍy ֹϡΑਕܑᇹ y ֹϡΑਕܑనࢍ̍׍۞̰टຏᑕё(context)ΑਕܑĄ Іᑭෛጡ̚በᏭΑਕܑีϫۏy д ϲΑਕܑޙ y y ฟୁΑਕܑనࢍ̍׍ ଣ੅тңͽ˭Е͞ёĂឰଋдనࢍഇม׶ેҖഇม఍நΑਕܑĈ ώౢ૟ିଋтңֹϡΑਕܑనࢍ̍׍ֽనࢍΑਕܑЕ׶ᇅ΍ёΑਕܑĄι૟ ྤੈٕᏴีගֹϡ۰Ą ညдેҖഇม˘ᇹĄଋ۞඀ёቅ˵ΞͽдેҖഇมԼតΑਕܑĂͽ೩ֻՀк Ǖଋ۞నࢍ૟ϲӈពϯдܑॾ̰ĂಶڍඕזଋࠤҌ̙ᅮࢋેҖ඀ёಶΞͽ࠻ дనࢍഇมࢦଵιࣇ۞ึԔĄܮͽٸٳଋΞͽາᆧٕӁੵΑਕܑีϫĂٕߏ ฟୁΑਕܑనࢍ̍׍Ă֭ۡତ૟ΑਕܑีϫᔣˢΑਕܑనࢍ̍׍ෛ඄ӈΞĄ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-41 ฟؕĄۍΑਕܑᇹ ϲՏ࣎ΑਕܑඕၹĂٕଂߙ࣎࿰Аనࢍ۞ޙܑ࣎ॾ̰ĄଋΞͽԆБଂᐝฟؕ ٕ࣎к˘זଋΞͽ੫၆Տ࣎ຐࢋΐˢᑕϡ඀ё̰۞ΑਕܑĂ૟Αਕܑ̮Іΐ ϲΑਕܑޙ ཉ ۞ពϯҜ ਕܑีϫ ௐ˘࣎Α ဦ9.5 ֹϡΑਕܑనࢍ̍׍ֽనࢍᇅ΍ёΑਕܑ ĄޘܪІᑭෛጡ̚۞ Caption পّ˵ົӔ੼ۏĂ҃ޘܪӔ੼ Αਕܑనࢍ̍׍૟ົ΍னĂ֭ͷనࢍ̍׍̚۞ௐ˘࣎(۩Ϩ)Αਕܑีϫົ ĶValueķ᛼̚۞ [Menu]Ăٕ޷˘˭Ķ...ķ޷ตĄ ޷׌˭ాޢItems পّĂ൒ פІᑭෛጡ۞ĶPropertiesķࢱࢬ̚Ᏼۏy д ٕ y ా޷׌˭Αਕܑ̮ІĄ Ĉ˘̝ڱ͞ Ᏼፄ˭Еޢ࣎Αਕܑ̮ІĂ൒˘פࡶࢋฟୁΑਕܑనࢍ̍׍Ăኛдܑॾ̰Ᏼ ̙֭ᅮࢋѣ˘࣎ΑਕܑЕĄ ᐌӈ΍ன۞ΑਕܑĂᇅ΍ёΑਕܑܮϲֹϡ۰ͽ໣ဂΠᔣ޷˘˭ܑॾॡޙΞ ॾᇾᗟЕ۞ΑਕܑĄPopupMenu ̮Іܑזܢϲ˘࣎෭ޙMainMenu ̮ІΞ PopupMenu ̮І MainMenu ̮І ဦ9.4 MainMenu̮ІᄃPopupMenu̮І ᄃ඀ёనࢍ͘Ίܝ9-42 ˢ File File1 ொੵ && ځ̮Іᇾᗟ ጱ΍ЩჍ ᄲ ܑ9.5 ቑּᇾᗟ׶ιࣇ۞ጱ΍ЩჍ னдТ˘࣎ΑਕܑЕ̝̚Ą ˭Еܑॾϯቑ˞˘ֱ࣒Լ۞ቑּĂι઄న˞ٙѣពϯ۞Αਕܑีϫౌ΍ ᗟਕૉͽᇴфฟؕĂDelphi ົдᇴф̝݈݄˯фֽ̮ଯጱ΍ Name পّĄ ॲፂιֽ࣒Լ Name পّĄּтࡶଋԓ୕ᇾົܮ Ξֹϡ۞ф̮ĂDelphi ѣड़۞ Object Pascal ᙊҾфܧଋд Caption পّ̚Ꮾˢ۞ф̮Ă֭ڍො т ͤĄ ଋᔣˢЩჍࠎזؠ Name পّĂDelphi ົឰ Caption পّܲ঻۩ϨĂۡ ଋдనؠ Caption পّ̝݈ĂАనڍܑีϫ۞ Name পّనࠎ File1Ąт ૟Αਕົܮ ּтĂࡶଋ૟Αਕܑีϫ۞ Caption পّࣃనࠎ FileĂDelphi ّĄ ឰ Delphi ଂᇾᗟ̰ଯጱ΍ Name পޢy Ад Caption পّ̚ᔣˢᇴࣃĂ൒ y ۡତд Name পّ̰ᔣˢЩჍĄ ቁгആιࣇ׻ЩĄଋΞͽֹϡ˭ࢬ׌჌͞ё̝˘ֽેҖ׻ЩĈځॡĂ ॾܑזΑਕܑีϫ۞ЩჍ׶Αਕܑ̮Іώ̙֗ТĂଋᅮࢋд૟Αਕܑีϫΐ ആΑਕܑีϫ׻Щ ୻ಏ̰Ą ྍΑਕܑЩჍ૟ົ΍னд̮ІޢӘ̰Ă̝ކॾ۞ݭၗܑזΑਕܑЩჍົజΐ ຍཌྷ۞ЩჍĄ ࣎ՀѣפЩჍĈּт MainMenu1ĄଋΞͽॲፂ඀ёᄬ֏۞׻ЩၚּആΑਕܑ ॾॡĂܑॾົኬ̟ι˘࣎࿰నܑז׶ٙѣ۞̮І˘ᇹĂ༊ଋ૟Αਕܑ̮Іΐ ആΑਕܑ׻Щ ķĄۍੈĂኛણዦдௐ9-51ࢱ۞ĶֹϡΑਕܑᇹ ซ˘Վྤ۞ۍĄѣᙯΑਕܑᇹهϲΑਕܑ۞ૄώ៍ޙώ༼૟੅ኢдనࢍഇม ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-43 ΑਕܑЕ̚ĄזEsc а ϲ۞Տ࣎າีϫ۞ Name ׶ Caption পّᏮˢЩჍĂٕ޷ޙ4 ᚶᜈആຐࢋ ّĄ(ኛણዦдௐ9-42ࢱ۞ĶആΑਕܑีϫ׻ЩķĄ) ᇾᗟ̚۞ЩჍֽ๱ᆷ Name পזϫĄଋ૟൴ன Delphi ̏གྷॲፂଋᏮˢ ଋࣣࣣᏮˢ۞ΑਕܑีזଋАᏮˢ Caption পّĂኛֹϡ͞Шᔣаڍт Αਕܑีϫ۞˭˘࣎Ҝཉડ(placeholder)૟ົజᏴ੓ֽĄ 3 ޷˘˭ EnterĄ ˢЩჍĄ ᏮޢCaption পّĂ൒ פᏮˢЩჍĄ఺ॡ࣏ଋᅮࢋࢦາᏴޢෛጡ̝̚Ă൒ Іᑭۏזٸߏ૟ഫᇾڱ2 ଋΞͽฟؕᏮˢᇾᗟĂٕАᏮˢ Name পّĂү ଋࣣࣣ̖ฟୁΑਕܑనࢍ̍׍ĂΑਕܑЕ۞ௐ˘࣎Ҝཉ૟ົజᏴ੓Ąڍт ϲΑਕܑีϫ۞г͞Ąޙפ1 Ᏼ ࡶࢋдనࢍഇมΐˢΑਕܑีϫĂ ୁ˞Αਕܑనࢍ̍׍۞ෛ඄Ą ϲΑਕܑඕၹٙᅮ۞ૄώ̍үĄՏ࣎඀Ԕౌ઄నଋ̏གྷฟޙځ˭Е඀Ԕ૟ᄲ າᆧă೧ˢ׶ӁੵΑਕܑีϫ ̚Ă఺ֱЩჍ૟΍னд Component ୻ಏ̰Ą Әކॾ۞ݭၗܑזಶ׶Αਕܑ̮І˘ᇹĂDelphi ົ૟ٙѣΑਕܑีϫЩჍΐ ᇾ໤ф̮۞ᇾᗟௐ˟Ѩ΍னॡ۞ᇴࣃึԔܧ- (hyphen) N2 Βӣ ึԔ ᇾ໤۞ф̮Ăΐˢ݈ཉф̮׶ᇴࣃܧ$@@@# N1 ொੵٙѣ 1234 (ௐ˟Ѩ΍ன) N12342 ΐˢᇴфͽડ̶ጱ΍ЩჍ 1234 N12341 ΐˢ݈ཉф̮׶ᇴࣃึԔ File (ௐ˟Ѩ΍ன) File2 ആࢦኑีϫΐˢᇴࣃึԔ& ځІᇾᗟ ጱ΍ЩჍ ᄲ̮ ᄃ඀ёనࢍ͘Ίܝ9-44 ˢ ពϯҜཉ Αਕܑีϫ۞ ཉෟĄ)ޢΐ˯ᇴࣃઇࠎ ф̮֭۞ڱ(љଫֱ֤̙Ъ Caption পّٙ޽ؠ۞̰ट ׎ Name পّనࠎଋд ІĂۏ ϲ˘࣎ TMenuItemޙ ΑਕܑЕ І۞ Name পّ) ົពϯ WYSIWYG Αਕܑีϫ ᇾᗟЕ(ពϯΑਕܑ̮ ϲΑਕܑॡΑਕܑనࢍጡޙдଋ ဦ9.6 ૟ΑਕܑีϫΐҌ͹Αਕܑ ࢬ۞ҜཉડĄ఺࣎ҜཉડдેҖഇม̙֭ົ΍னдΑਕܑ̰Ąޢϫีޢ̚౵ ࿰నҜཉડĂٕΑਕܑЕ۞˭غΑਕܑ୻ಏ̚۞ีϫזᏮˢޢො ଋ̙ਕӁੵ౵ 2 ޷˘˭ Del ᔣĄ ຐࢋӁੵ۞Αਕܑีϫ˯Ąזٸ1 ૟ഫᇾ ࡶࢋӁੵΑਕܑีϫٕ޽΄Ă ؠีϫ˯͞Ą Αਕܑีϫ૟ົ೧ˢΑਕܑЕ̰Ᏼؠีϫ۞νᙝĂ֭дΑਕܑ୻ಏ۞Ᏼ 2 ޷˘˭ Ins ᔣĄ Αਕܑีϫ̚Ąזٸ1 ૟ഫᇾ ࡶࢋ೧ˢາ۞۩ϨΑਕܑีϫĂ ΑਕܑЕĂኛ޷ Esc ᔣĄזજć޷ Enter ΞԆјྍજүĄࡶࢋа д୻ಏ̰۞ีϫ̝มொޢΑਕܑĂ൒זଋΞͽֹϡ͞ШᔣଂΑਕܑЕொ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-45 ࢋҋҖቁؠι۞ቁߏ፾˘൑˟۞Ą ຍ ԣిᔣᄃΐిᔣ̙˘ᇹ۞ߏĂι̙֭ົᑭߤߏӎѣࢦኑ۞ԣిᔣĂЯѩଋᅮڦ ༊ଋΐˢԣిᔣॡĂιົ΍னдΑਕܑีϫ۞ᇾᗟय़ᙝĄ ௡ЪᔣĄ఺࣎୻ಏΪߏΞֻᔣˢ۞ѣड़௡Ъ۞˘ొЊĄפ̚Ᏼ ІᑭෛጡᏮˢ ShortCut পّ̝ࣃĂٕଂ˭ٛё୻ಏۏࡶࢋ޽ؠԣిᔣĂֹϡ ᅮᔣˢԣిᔣ௡ЪӈΞĄ ԣిᔣΞͽឰֹϡ۰д̙ۡତֹϡΑਕܑ۞ଐԛ̝˭ֽેҖજүĂֹϡ۰Ϊ ਕܑ޽΄Ă֭ͽ S ઇࠎΐిᔣĂኛᔣˢ&SaveĄ ࡶࢋ޽ؠΐిᔣĂኛдዋ༊۞фϓ݈ࢬΐˢĶōķĄּтĂࡶࢋΐˢ Save Α ΪࢋనؠΑਕܑ AutoHotkeys পّనࠎ maManualĄ ගᙯౕଫĂטٙѣ۞Αਕܑีϫౌົѣ࣎ΐిᔣĄଋΞͽ૟ѩҋજ۞ᑭߤ፟ ϲ۞Αਕܑ̰Ă̙ົӣѣࢦኑ۞ΐిᔣĄ҃ͷĂޙͽቁܲдેҖॡഇٙજၗ Delphi ົҋજгᑭߤࢦኑ۞ΐిᔣĂ֭ͷдેҖॡഇΐͽአፋĄ఺࣎જүΞ ቢĄغົΐˢ ࢬ۞фϓдΑਕܑ̚ޢܑ޽΄Ă఺д඀ёቅ̚ߏͽ݄˯ĶōķֽܑϯĄĶōķ Αਕפΐిᔣ(Accelerator keys)Ξឰֹϡ۰ᖣ඾޷ Alt ΐ˯ዋ༊۞фϓֽх ޽ؠΐిᔣ׶ԣిᔣ ̶࿣Е(|)ٕాф௑ཱི(-)Ą ࡶ୬૟̶࿣ЕΐҌ TActionToolBarĂኛ޷˭೧ˢᔣ֭ͷ૟າีϫ۞ᇾᗟనࠎ Αਕܑ˯۞ҜཉॡТॡ޷˭ాфᔣ(-)Ąٺԓ୕̶࿣Е΍ன ଋٺࡶࢋ૟Αਕܑีϫតј̶࿣ЕĂആᇾᗟᔣˢాф௑ཱི(-)Ăٕߏдഫᇾཉ ᙷĂٕд୻ಏ̚೩ֻෛᛇ˯۞̶࿣Ą ̶࿣ЕົдΑਕܑีϫ̝ม೧ˢ˘ЕĄଋΞͽֹϡ̶࿣Еֽ૟Αਕܑีϫ̶ ΐˢ̶࿣Е ᄃ඀ёనࢍ͘Ίܝ9-46 ˢ னѣ۞Αਕܑඕၹ̚Ăιٙѣ۞זϲઘΑਕܑĄ༊ଋ૟Αਕܑொޙϫ̰Ăֽ ΑਕܑีϫĂ೧ˢ୻ಏ۞Αਕܑี۞(ۍଋΞͽᖣ඾૟ΑਕܑЕ(ٕΑਕܑᇹ ϲઘΑਕܑޙ૟னѣ۞Αਕܑࢫ৺ֽ ᆸΑਕܑ̚Ą˘˯ז6 ޷ Esc а ϲ۞Տ࣎ีϫࢦኑՎូ 3 ׶ 4Ąޙ5 ആຐࢋдઘΑਕܑ̚ ϲ˭˘࣎ҜཉડĄޙֽ↓ٕ 4 ޷ Enter ఺࣎ҜཉડĄזѢٳ3 ᔣˢઘΑਕܑีϫ۞ЩჍĂٕ૟னѣ۞Αਕܑีϫ SubmenuĄ Ᏼፄ Createޢϲௐ˘࣎ҜཉડĂٕ޷˘˭໣ဂΠᔣĂ൒ޙ2 ޷ CtrlƖֽ ϲઘΑਕܑ۞ΑਕܑีϫĄޙຐࢋפ1 Ᏼ ϲઘΑਕܑĂኛଋޙࡶࢋ Αਕܑีϫې૰ ۞Αਕܑีϫ дΑਕܑᏴಏ̚ Αਕܑีϫ дΑਕܑЕ̚۞ Αਕܑඕၹ۞ېဦ9.7 ૰ ᇅ΍ёΑਕܑĂଋ౵кΪਕֹϡ˘࣎ઘΑਕܑĄ)ٺ(၆ ָ۞నࢍϡ౉҃֏Ă౵р̙ࢋд̬ࢬనࢍֹ̚ϡ׌ᆸٕˬᆸͽ˯۞ΑਕܑĄ ଋΞͽֹϡ఺჌͞ёֽፋநΑਕܑඕၹĂͽ༼࠷ݬۡ۞Ꮘ၌۩มĄ̙࿅ಶ౵ ϲкᆸઘΑਕܑĄޙ୻ಏĄDelphi Ξॲፂଋ۞ᅮՐĂдΑਕܑ̚ ͽ೩ֻᗝγ۞࠹ᙯ޽΄ĄΑਕܑีϫΠᙝࡶ΍ன቏ᐝĂಶܑϯιΒӣ˞఺ᙷ кᑕϡ඀ё۞ΑਕܑౌΒӣ˞˭ٛё୻ಏĂιົ΍னдΑਕܑีϫय़ᙝĂޝ ϲઘΑਕܑޙ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-47 ѣϡ۞ԫμĄޝᇆည୻ಏ̚ߏ࣎ٺϡ˞ᇴ࣎̂̈࠹Т۞ᕇੱဦĂ૟ιࣇཉ Αਕܑีϫ̚Ą઄ࡶଋдᑕϡ඀ёֹ̚זಏĂତ඾Г૟ιࣇҋᇆည୻ಏ̚ΐ ᇆညјࠎᇆည୻۞ז(bitmap)ҌΑਕܑีϫăٕ۰ߏፋЪଋᑕϡ඀ё̚ϡ Αਕܑ̰Ă఺ֱᇆည׶̍׍ЕᇆညᙷҬĄଋΞͽΐˢಏ˘࣎ᕇੱဦٺજ ᖣϤᄃΑਕܑีϫજү࠹ᙯ۞ဦည(glyphs)׶ᇆညĂֹϡ۰ΞͽՀԣిгொ ૟ᇆညΐˢΑਕܑีϫ າ۞ҜཉĄז ٸฟ໣ဂ޷ตӈΞ૟Αਕܑีϫٸ୻ಏ̰ĂଋΪࢋזѢٳ2 ૟Αਕܑีϫ າ۞ҜཉĄזѢٳឰଋ૟ีϫܮ఺ົֹΑਕܑฟୁĂͽ າ۞ΑਕܑĄזഫᇾ۞቏ᐝыბ޽זѢΑਕܑีϫĂۡٳ඾ΑਕܑЕڻ 1 Αਕܑ୻ಏĂזࡶࢋ૟Αਕܑีϫொ າ۞ҜཉĄזٸฟ໣ဂ޷ตӈΞ૟Αਕܑีϫٸ 2 າ۞ҜཉĄזഫᇾ۞቏ᐝыბ޽זѢΑਕܑีϫĂۡٳ඾ΑਕܑЕڻ 1 ඾ΑਕܑЕֽொજΑਕܑีϫĂڻࡶࢋ Їңีϫౌົྫྷ඾ொજĄ۞˭غҜཉ˯Ą༊ଋொજΑਕܑีϫॡĂι າ۞זٸԼតĂͽ޽΍ଋߏӎ૟ΑਕܑีϫົېѢॡĂഫᇾ۞ԛٳ༊ଋซҖ Т۞Αਕܑ̰Ă̙გιࣧώ۞ҜཉࠎңĄ̙ז̰Ą̙࿅ଋΞͽ૟Їңีϫொ ιҋ̎۞ઘΑਕܑזιҋ̎۞Αਕܑ̚ć˵̙ਕ૟Αਕܑีϫொזϫࢫ৺ ఺࣎͞ё۞઱˘ּγߏĂଋ଀ჯ޺ล৺ߛၹĈଋ̙ਕ૟ΑਕܑЕ۞Αਕܑี ਕܑ̰Ą Αਕܑ୻ಏ۞׎΁ҜཉĂٕߏԆБ̙Т۞ΑזֽொજΑਕܑีϫĂ˵Ξͽொ ඾ΑਕܑЕڻёֽொજΑਕܑีϫĄଋΞͽ͞ٸٳдనࢍഇมĂଋΞͽᖣϤ ொજΑਕܑีϫ ܑĄ ϲ˘ᆸઘΑਕޙனѣ۞ઘΑਕܑॡĂ૟ົкז˵˘ᇹǕ༊ଋ૟Αਕܑีϫொ ϲԆፋ۞ઘΑਕܑĄ఺၆ઘΑਕܑ҃֏ޙ࠹ᙯีϫౌົ׶ι˘੓ொજĂЯ҃ ᄃ඀ёనࢍ͘Ίܝ9-48 ˢ ຐࢋᑭෛ۞ΑਕܑĄ פॾ۞Αਕܑ̙Ϊ˘࣎Ăኛдܑॾ۞ Menu পّ˭ٛё୻ಏ̚Ᏼܑڍ2 т Αਕܑ۞ܑॾĄ ॾĂኛ޷˘˭ܑॾĂٕд View Αਕܑ̚Ᏼፄຐࢋᑭෛܑזଋ࠻଀ڍ1 т ࡶࢋᑭෛΑਕܑĂ ҖĄଋΞͽֹϡΑਕܑనࢍ̍׍Ăдనࢍഇมᑭෛᇅ΍ёΑਕܑĄ) ॾ̰ĂΞߏᇅ΍ёΑਕܑώ֗݋ܑ̙ٺ΍ёΑਕܑ̮ІΞдనࢍഇมពϯ ଋΞͽۡତдనࢍഇมᑭෛܑॾ̚۞ΑਕܑĂ̙҃ᅮࢋАҖેҖ඀ёቅĄ(ᇅ ᑭෛΑਕܑ ၆ᆅ׶˘࡭ّ۞યᗟĄ 16x16 ည৵۞ᇆညΞਕົயϠ ٺٕ̈ٺ΁̂̈۞ᇆညүࠎΑਕܑ۞ᇆညĂ̂ Αਕܑ̰Ąᔵ൒ଋ̪Ξֹϡ׎ٺϒቁгពϯܮො ኛֹϡ 16x16 ည৵۞ᇆညĂͽ ពϯᇆည)Ą నј ImageList ̚࠹၆۞ᇆညበཱི(ImageIndex ۞࿰నࣃࠎ–1Ă఺̙֭ົ ຐࢋΒӣᇆည۞ΑਕܑีϫĂ֭૟ ImageIndex পّפІᑭෛጡ̚Ᏼۏ7 д ϲଋ۞Αਕܑีϫ׶ઘΑਕܑีϫĄޙ6 ॲፂ˯ࢗ͞ёֽ ImageListĄ ϲ۞ޙІ۞ Images পّనјଋࣣࣣۏ 5 ૟ TMainMenu ٕ TPopupMenu Αਕܑ̰۞ᕇੱဦٕᕇੱဦཏ௡Ą޷˭ OKĄٺຐࢋϡפ4 ޷˭ Add ֽᏴ Іֽฟୁ ImageList በᏭ඀ёĄۏ 3 ా޷׌˭ TImageList ॾ̰ĄܑזѢٳІۏ 2 ૟ TImageList ॾ̰ĄܑזѢٳІۏ 1 ૟ TMainMenu ٕ TPopupMenu Αਕܑีϫ̰ĂኛଋĈזࡶࢋ૟ᇆညΐ ΑਕܑٕΑਕܑีϫ̚۞ЩჍĄٺؠјࠎྍᕇੱဦϡ Αਕܑٕ۰ߏΑਕܑีϫ̚Ăኛ૟׎ Bitmap পّనזຐ૟ಏ˘ᇆညΐڍт ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-49 ˭ܑЕ΍˞Αਕܑనࢍ̍׍۞̰टຏᑕёΑਕܑ۞޽΄Ą ̰टຏᑕёΑਕܑ̚۞޽΄ Αਕܑనࢍ̍׍ෛ඄̰ॡ޷ Alt+F10Ąٺ༊ഫᇾҜ ࡶࢋពϯ̰टຏᑕёΑਕܑĂኛͽ໣ဂΠᔣ޷˘˭Αਕܑనࢍ̍׍ෛ඄Ăٕ ķĄ)ۍ˘ՎྤੈĂኛણዦдௐ9-51ࢱ۞ĶֹϡΑਕܑᇹ ซ۞ۍᏴีĄ(ѣᙯΑਕܑᇹۍֹϡ̝Αਕܑనࢍ̍׍۞޽΄Ăͽ̈́Αਕܑᇹ ౵૱פΑਕܑనࢍ̍׍۞̰टຏᑕёΑਕܑ(context menu)Ξឰଋԣిгх ֹϡΑਕܑనࢍ̍׍۞̰टຏᑕёΑਕܑ ĄפࡶࢋበᏭΩ˘࣎ΑਕܑีϫĂኛଂ Component ୻ಏ̚ΐͽᏴ ІᑭෛጡĂଋΞͽдѩᚶᜈበᏭᏴؠΑਕܑีϫ۞পّĄۏჸ൏۞඀ё̪ࠎ 2 ͽ˘ਠ͞ёᙯౕΑਕܑనࢍ̍׍Ą ෛጡĄ ІᑭۏଂΑਕܑనࢍ̍׍ෛ඄̷ೱаܮІᑭෛጡ۞পّࢱĂͽۏ˭˘1 ޷ ࡶࢋᙯౕΑਕܑనࢍ̍׍۞ෛ඄Ă֭ᚶᜈበᏭΑਕܑีϫĂ ۞পّĂ̙҃ϡฟୁΑਕܑనࢍ̍׍Ą በᏭιޢΑਕܑีϫĂ൒פІᑭෛጡ۞ Component ୻ಏ̚Ᏼۏଋ˵Ξͽд ᚶᜈд֤྆በᏭΑਕܑีϫ۞পّĄޢІᑭෛጡĂ൒ۏෛጡ̰ĄଋΞͽ̷ೱа Іᑭۏ༊ଋֹϡΑਕܑనࢍ̍׍ֽበᏭΑਕܑีϫॡĂι۞পّ̪ົពϯд ShortCut পّĂಶ׶఍நܑॾ̚Ᏼؠ۞Їң̮І˘ᇹĄ ІᑭෛጡĂ̚నؠΑਕܑีϫ۞পّĂּтۏώ༼˵ົ̬௜тңۡତд ֽనؠ Name ׶ Caption পّĄ дώ༼̚૟੅ኢтңనؠΑਕܑีϫ۞˘ֱপّǕּтֹϡΑਕܑనࢍ̍׍ Іᑭෛጡ̚በᏭΑਕܑีϫۏд Αਕܑ૟ົ΍னдܑॾ̰ĂಶྫྷଋેҖ඀ёॡԆБ˘ᇹĄ ᄃ඀ёనࢍ͘Ίܝ9-50 ˢ ពϯĄົܮତ඾ Select Menu ၆ྖ͞๴ Select MenuĄ פ1 д Menu Designer ޷˭໣ဂΠᔣĂᏴ ࡶࢋֹϡ̰टຏᑕёΑਕ̷ֽܑೱܑॾ۞ΑਕܑĂኛଋ Αਕܑ֭дιࣇ̝ม̷ೱĄפІᑭෛጡĂᅅᗫгᏴۏᑕёΑਕܑٕ ΞͽֹϡΑਕܑనࢍ̍׍۞̰टຏܮଋ̏གྷആܑॾనࢍ˞к࣎ΑਕܑĂڍт дనࢍഇม̷ೱΑਕܑ ϫ݈۞ܑॾ̰Ąٺฟୁܮፄ˘࣎.mnuᑫĂͽ Insert From Resource ฟୁInsert Menu from Resource file၆ྖ͞๴ĂଋΞͽдѩᏴ Ąۍ۞ᇹ Delete Templates ฟୁDelete Templates၆ྖ͞๴ĂଋΞͽд఺྆ӁੵЇңனѣ ֹϡĄ ࢦኑֽۍ࣎ᇹ˘פឰଋᏴܮInsert From Template ฟୁInsert Template၆ྖ͞๴Ăͽ ϡĄֹޢᐼхΑਕֻܑ͟ܮSave As Template ฟୁSave Template၆ྖ͞๴Ăͽ ྍΑਕܑฟୁనࢍ̍׍ෛ඄Ą Select Menu дϫܑ݈ॾ̚ฟୁ˘࣎Αਕܑ୻ಏĄా޷׌˭ΑਕܑЩჍΞആ ˢ˘࣎቏ᐝĄ ϲ˘࣎ҜཉડĂ֭дᏴؠ۞ΑਕܑีϫΠᙝΐޙCreate Submenu дइᝑᆸ৺̚ Ӂੵ)Ą׀˘˵Delete ӁੵᏴؠ۞Αਕܑีϫ(ࡶѣ̄ีϫ۞ྖĂ Insert дഫᇾ۞˯ࢬٕνᙝ೧ˢ˘࣎ҜཉડĄ Αਕܑ޽΄ જү Αਕܑనࢍ̍׍۞̰टຏᑕёΑਕܑ޽΄ 9.6ܑ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-51 ĂᔘΞͽଂܑЕ̚ӁੵιĄۍГᅮࢋߙ࣎Αਕܑᇹ ĂಶΞͽညЇңְАనࢍ۞Αਕܑ˘ᇹ۞ΐͽֹϡĄࡶߏҰՙؠ̙ޢ̝ۍᇹ Ąдᐼхࠎۍଋ˵Ξͽֹϡ Menu DesignerĂ૟Ї˘ΑਕܑᐼхࠎΑਕܑᇹ д࿰న۞щ྅˭ߏᐼхд BIN ̄ϫᐂ˭۞.dmt ᑫ९̚ĄۍΑਕܑᇹ ӣְІ఍ந඀Ԕ۞඀ёቅ۞Ą ߏ̙Βۍ࣒ࢎјଋٙഇ୕۞ᇹ̄ĄΑਕܑᇹޢϡĂٕߏͽιࣇઇࠎૄᖂĂ൒ ଋΞͽ̙ΐͽ࣒Լ(̙࿅ᔘߏ଀ࢋᇤᆷ඀ёቅ)ಶдҰ۞ᑕϡ඀ё̰ΐͽֹ ׻΄Ą۞זĂΒӣ˞གྷ૱జϡۍѣೀ࣎࿰Аؠཌྷр۞ΑਕܑĂ˵ჍࠎΑਕܑᇹ ۍֹϡΑਕܑᇹ ˭࠷ர޷ตĂٕߏᕇ˟˭[Menu]Ą ޷ޢItems পّĂ൒ פІᑭෛጡ۞ Properties ࢱ˯Ăଂ఺ΑਕܑᏴۏ3 д ଋຐበᏭ۞ΑਕܑĄפ2 ଂ Component ܑЕ̰ĂᏴ Αਕܑ۞ܑॾĄפ1 ૟Ꮾˢ൏ᕇொҌࢋᏴ Іᑭෛጡ̷ೱܑॾ˯۞ΑਕܑĂۏࡶࢋֹϡ ҰຐᑭෛٕበᏭ۞ΑਕܑĄפ2 ଂ Select Menu ၆ྖ͞๴۞ܑЕĂᏴ Menu Designer ̰Ą ٺฟୁגܑѩ ఺࣎၆ྖ͞๴ܑົЕ΍˞ٙѣ׶ѩܑॾ࠹ా۞ΑਕܑĂ఺ܑ࣎ॾ۞Αਕ ဦ9.8 Select Menu၆ྖ͞๴ ᄃ඀ёనࢍ͘Ίܝ9-52 ˢ ୻ಏ׶ർჄ̚ӁੵĄۍଂᇹۍDelphi ົ૟ᇹ ޷ DelĄޢĂ൒ۍຐࢋӁੵ۞Αਕܑᇹפ2 Ᏼ ୻ಏĄۍDelete Templates ၆ྖ͞๴૟ົฟୁĂពϯΞϡ۞ᇹ Ą)פᏴ ڱĂ̰टຏᑕёΑਕܑ۞ Delete Templates ޽΄૟൑ۍ՟ѣЇңᇹڍ(т Ᏼፄ Delete TemplatesĄޢ1 ͽ໣ဂΠᔣ޷˘˭Αਕܑనࢍ̍׍Ă൒ ĂۍࡶࢋӁੵΑਕܑᇹ ഫᇾνᙝĄٺ૟೧ˢۍΑਕܑЕ˯ĂΑਕܑᇹٺଋ۞ഫᇾҜڍ͞Ąт Ᏼؠีϫ۞˯ٺ૟೧ˢۍ୻ಏ۞Αਕܑีϫ̰ĂΑਕܑᇹٺ۞ഫᇾҜ ૟Αਕܑ೧ˢഫᇾٙдҜཉ۞ܑॾ̚ĄᓝּֽᄲĂࡶଋົܮтѩ˘ֽĂ ޷ Enter ٕᏴፄ OKĄޢĂ൒ۍຐࢋ೧ˢ۞Αਕܑᇹפ2 Ᏼ ဦ9.9 Αਕܑ۞Insert Template၆ྖ͞๴ቑּ ୻ಏĄۍInsert Template ၆ྖ͞๴૟ົฟୁĂពϯ΍Ξϡ۞Αਕܑᇹ Ą)פᏴڱ൑ Ă̰टຏᑕёΑਕܑ۞ Insert From Template ޽΄૟ۍ՟ѣЇңᇹڍ(т Ᏼፄ Insert From TemplateĄޢ1 ͽ໣ဂΠᔣ޷˘˭Αਕܑనࢍ̍׍Ă൒ ଋ۞ᑕϡ඀ё̚Ăזΐۍࡶࢋ૟Αਕܑᇹ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-53 Menu Designer ۞ෛ඄̰Ą זаޢSave Template ၆ྖ͞๴૟ົᙯౕĂ֭ᐼхଋ۞ΑਕܑనࢍĂ൒ Ᏼፄ OKĄޢ Ă൒ځ3 ኛд Template Description በᏭ͞๴̚ᔣˢ၆ѩΑਕܑ۞ᖎࢋᄲ ဦ9.10 Αਕܑ۞Save Template၆ྖ͞๴ Save Template ၆ྖ͞๴૟ົ΍னĄ Ᏼፄ Save As TemplateĄޢ2 ͽ໣ဂΠᔣ޷˘˭Αਕܑనࢍ̍׍Ă൒ ਕܑĄ ϫ݈Αਕܑనࢍ̍׍ෛ඄̰۞ٙѣีϫౌົజхј˘࣎Ξࢦኑֹϡ۞Α ଋΞͽֶ໰ᅮࢋĂឰΑਕܑΒӣЧ჌ଋԓ୕۞ีϫă޽΄׶ઘΑਕܑć 1 నࢍਕૉࢦኑֹϡ۞ΑਕܑĄ Ăۍࡶࢋ૟Αਕܑхјᇹ д BIN ̄ϫᐂ̚۞.DMT ᑫ९Ąٸ૟хۍଋᐼх۞Αਕܑᇹ ឰᑕϡ඀ё׍ѣ˘࡭۞γ៍Ăٕͽιࣇүࠎซ˘Վҋࢎ۞ૄᖂĄֽۍᇹ Ϗֽ۞ࢦኑֹϡĄଋΞͽֹϡΑਕܑܮĂͽ͞ۍଋనࢍΑਕܑౌΞͽхјᇹ ۍ૟Αਕܑхјᇹ ᄃ඀ёనࢍ͘Ίܝ9-54 ˢ ̚۞ĶᙯౕΑਕܑีϫķ˘༼Ą ѣᙯֹϡΑਕܑีϫ۞ Visible ׶ Enabled পّ۞඀ёቅቑּĂኛણዦௐ 7 ౢ ϫӔѷҒĂ̙҃ࢋᔳᖟιĂኛֹϡ Enabled পّĄ Αਕܑ̰ĄࡶࢋឰΑਕܑีٺีϫĄVisible পّՙؠ˞Αਕܑีϫߏӎពϯ ೧ˢΑਕܑีϫĂ˵Ξͽᖣ඾Լត Visible পֽّᔳᖟٕពϯΑਕܑ̚۞ֽڱ ͞ ͽ೩ֻՀкྤੈٕᏴีගֹϡ۰ĄଋΞͽֹϡΑਕܑีϫ۞ Add ٕ Insert னѣ۞Αਕܑඕၹ̰Ăזѣॡ࣏ଋᅮࢋдᑕϡ඀ёેҖॡĂ૟Αਕܑีϫΐ дેҖഇม఍நΑਕܑีϫ ԔķĄ Հྎ௟۞ྤੈĂኛଋણ҂ௐ 6 ౢ̚۞Ķ૟ְІᙯᓑҌߊѣ۞ְІ఍ந඀ٺᙯ ϲᙯᓑĄޙOnClick ְІ఍ந඀Ԕ ϫ׶ܑॾ̚னѣ۞ี۞̚ۍг૟Αਕܑᇹٽ఍ந඀Ԕ۞ЩჍĄଋΞͽᅅ ϫயϠາ۞ְІ఍ந඀ԔॡĂDelphi ̪ົயϠְІีۍ̰Ą༊ଋആΑਕܑᇹ າ۞ܑॾٺְІ఍ந඀ԔĂЯࠎ՟ѣЇң͞ёΞീྏ඀ёቅߏӎΞͽइϡ ॡĂ̙֭ົᐼхᄃΑਕܑ࠹ᙯ۞Їң OnClickۍ༊ Delphi ૟Αਕܑхјᇹ Щࠎ File2Ąפ݋ົആι ଋ૟ι೧ˢ˘࣎̏གྷΒӣ File1 Αਕܑีϫ۞Αਕܑ̰ĂDelphiڍFile1Ąт Щࠎפ೧ˢາ۞Αਕܑ̰ĂDelphi ົആιۍଋ૟ι༊үᇹڍMyFileĄт Ăдࣧώ۞Αਕܑ̚ଋ૟ι׻ЩࠎۍᓝּֽᄲĂ઄నଋ૟ File Αਕܑхјᇹ ົആι׶ι۞ีϫயϠາ۞ЩჍĄ ೧ˢາ۞ܑॾ̰ॡĂDelphii ૟ۍ༊ଋֹϡΑਕܑనࢍ̍׍૟Αਕܑ༊үᇹ ਕܑдι۞ጾѣ۰(ܑॾ)۞ቑಛ̝̚ౌυื׍ѣ˘࣎፾˘൑˟۞ЩჍĄ̙࿅ ॡĂDelphi ̙֭ົᐼхι۞ Name পّĂЯࠎՏ࣎Αۍ༊ଋ૟Αਕܑхјᇹ Αਕܑีϫ׶ְІ఍ந඀Ԕ۞׻Щၚּۍᇹ Templates ၆ྖ͞๴̰Ąι׶Αਕܑ۞ Name ٕ Caption পّ֭՟ѣᙯܼĄ Ϊົ΍னд Save TemplateăInsert Template ׶ Deleteځො ଋᏮˢ۞ᄲ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-55 GroupIndex ᇴࣃĄ ΃͹Αਕܑ̚۞ีϫĂኛ૟̄Αਕܑ۞ีϫనؠТᇹ۞פy ࡶࢋ ̂۞ᇴࣃ(ᇴࣃ̙ᅮࢋߏాᜈ۞)Ăּт Help ΑਕܑĄ ּт File ΑਕܑĄТᇹгĂଋΞͽആԓ୕΍னд౵Πᙝ۞Αਕܑ޽ؠྵ ᓝּֽᄲĂଋΞͽ૟΍னдνᙝ۞Αਕܑ۞ GroupIndex পّనࠎ 0(࿬)Ă y ྵ̈۞ᇴࣃົА΍னдΑਕܑ̚(౵νᙝ)Ą GroupIndex ۞࿰నࣃࠎ 0Ąдആ GroupIndex ޽ؠᇴࣃॡ૟इϡ˭Еఢ݋Ĉ ΃͹ΑਕܑЕ̚۞ีϫٕͽ೧ˢ۞͞ёཉˢĄפΑਕܑีϫॡΞͽ׀ Αਕܑีϫ΍னдВϡΑਕܑЕ̚۞ึԔĄЪ۞׀GroupIndex পّՙؠ˞Ъ ԔĈGroupIndex পّึ׀ՙؠΑਕܑีϫ۞Ъ Form1.Menu := SecondMenu; дેҖഇมԼតֹϡ̚ΑਕܑĄּтĂܮMenu পّĂͽ ॾΒӣ˞˘࣎ͽ˯۞Αਕܑ̮ІĂଋΞͽд඀ёቅ̚నؠܑڍΑਕܑĄт ϡֹ̚זፆүΪਕྻϡ׀Menu পّົആܑॾ޽ؠֹϡ̚ΑਕܑĄΑਕܑЪ ޽ؠֹϡ̚ΑਕܑĈMenu পّ y GroupIndexĂ఺ߏΑਕܑ̰۞Αਕܑีϫ۞পّ y MenuĂ఺ߏܑॾ۞পّ ϡĂኛ޽ؠ׌࣎পّࣃĈ̝׀ࡶࢋ໤౯ΑਕܑͽүࠎЪ πέ۞඀ёనࢍĄྭٺϡڱϡд Windows ᑕϡ඀ёĂ҃൑ ຍĂOLE ԫఙΪਕڦΑਕܑĄኛ׀ІତќΑਕܑีϫĄ఺࣎જү఼૱ჍࠎЪ ۏጡڇ඀ё҃֏Ăଋ۞ᑕϡ඀ё۞͹Αਕܑυืਕૉଂ׎΁ܑॾٕଂ OLE Ҩ MDI ᑕϡ඀ёĂּт͛३በᏭ඀ё۞ቑּᑕϡ඀ёĂ׶ OLE ϡ͗ᑕϡ ٺ၆ Αਕܑ׀Ъ Ҍனѣ۞ΑਕܑЕĄ˭˘༼૟Հྎ௟г੅ኢ఺࣎͹ᗟĄ׀ܑีϫЪ Іాඕᄃ̰ಷ(OLE)۞ᑕϡ඀ё̰ĂଋΞͽ૟Αਕۏдкࢦ͛І̬ࢬ(MDI)׶ ᄃ඀ёనࢍ͘Ίܝ9-56 ˢ ࣎Αਕܑхј࣎Ҿ۞ྤ໚ᑫ̖ҖĄ ଋ۞ྤ໚ᑫ̚Βӣ˞˘࣎ͽ˯۞ΑਕܑĂଋ଀дᏮˢΑਕܑ݈ĂА૟Տڍො т Αਕܑ૟΍னдΑਕܑనࢍ̍׍۞ෛ඄̰Ą Ᏼፄ OKĄޢຐࢋྶˢ۞ྤ໚ᑫĂ൒פ3 ኛд၆ྖ͞๴̚Ᏼ Ꮾˢ۞ΑਕܑΞͽߏϒдనࢍ۞Αਕܑ˘ొЊĂٕߏፋ࣎ΑਕܑĄ Ᏼፄ Insert From ResourceĄޢ2 ޷˘˭໣ဂΠᔣĂ൒ Ꮾˢ۞ΑਕܑΞͽߏϒдనࢍ۞Αਕܑ˘ొЊĂٕߏፋ࣎ΑਕܑĄ ԓ୕Αਕܑ΍ன۞г͞Ąזٸ1 д Menu Designer ̚Ă૟ଋ۞ഫᇾ ࡶࢋྶˢߊѣ۞.RC ΑਕܑᑫĂ Αਕܑ۞ॡม׶ჟ˧Ąޙ̚Ăͽ༼࠷ࢦ ϲ఺ֱΑਕܑĄଋΞͽ૟఺ᙷΑਕܑۡତᏮˢ Delphi ૞९ޙ΁۞ᑕϡ඀ёֽ Ξͽ౅࿅׎ܮΪࢋΑਕܑߏͽᇾ໤۞ Windows ྤ໚(.RC)ᑫ९ॾёܑϯĂଋ ๗ˢྤ໚ᑫ నࠎ 1ď2ď3 ׶ 4Ă఺ᇹଋಶΞͽ૟ιࣇ೧ˢĄ ּтଋΞͽ૟͹Αਕܑ۞ีϫᇴࣃనࠎ 0 ׶ 5Ă֭૟̄Αਕܑ۞ีϫᇴࣃ ଂܑ̄ॾ̚Ķ೧ˢķ(plug in)ᇴࣃĄޢቑಛ̰࿰঻۩มĂ൒ ΃͹Αਕܑ̚۞ีϫĂኛд͹Αਕܑีϫ۞ᇴࣃפࡶࢋ೧ˢีϫĂ̙҃ ͹ΑਕܑॡĂึԔܲ޺̙តĄ ז׀y ૟̄Αਕܑ̰к࣎ีϫ۞ GroupIndex ᇴࣃనј࠹ТĂΞឰιࣇдЪ ߏ૟ιࣇ۞ GroupIndex ᇴࣃౌనј 1Ąڱ΃ιĂүפк࣎ีϫֽ ีϫĂ׎ GroupIndex ᇴࣃࠎ 1ĂଋΞͽֹϡܑ̄ॾ۞Αਕܑ̰۞˘ٕ࣎ ௡ٕ࣎Ҿ۞ีϫĄּтࡶଋ۞͹ܑॾΒӣ˞ Edit Αਕܑ˘ז఺Ξͽइϡ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-57 ͽ˭ᇴ༼૟͔ጱଋтңĈ COMCTL32.DLLĄ̍׍Еᄃ coo bar ֭Ϗజ WinNT 3.51 ᑕϡ඀ё͚ٙ೯Ą זІཆд˘๴Ăଋ۞ᑕϡ඀ёົᅮࢋϡۏౌ׶ Windows ̚۞В఼ ѣٙԼតĂଋ۞ᑕϡ඀ёϺਕᐌ̝ԼតĄТᇹ۞ĂЯࠎ̍׍Еᄃ cool barีט Ą઄ࡶ૟ֽ఺ֱүຽր௚ଠีטĂЯࠎଋֹϡ۞ߏࣧϠ۞ Windows ଠڍड़ ౅࿅̍׍Е̮І۞ֹϡĂଋΞͽቁܲ Windows ᑕϡ඀ё׍ѣ˘࡭۞γ៍׶ ׍Е۞γ៍׶ຏᛇĄ̍טଠ І۞р఍ߏଋΞͽБࢬг̮ۍ၁ү̍׍Е۞͞ё݋ᐌᑕϡ඀ё҃ؠĄֹϡࢬ ϯдΞ࣎Ҿொજ׶አፋ̂̈۞ bands ˯Ą ពีטĄcool bar ົ૟ଠีטy ֹϡ cool bar(TCoolBar)̮І,֭ആιΐˢଠ ᏴีĄ TToolBar Ξឰଋᅅᗫг૟ᙷҬΑਕ۞޷ต௡Ъ੓ֽĂ֭೩ֻ׎΁۞ពϯ Ăีטଋд̍׍Еֹ̚ϡ̍׍޷ต(TToolButton)ଠڍ̈׶ҜཉĄт Ă֭૟ιࣇፋᆅଵЕĂТॡҋજአፋιࣇ۞̂ีטΞგந޷ต׶׎΁ଠ ĄTToolBarีטആιΐˢଠޢTPanelĂ൒ ܧ y ֹϡ̍׍Е̮І(TToolBar)Ă҃ ఼૱ߏԣిต)Ą)ีטആιΐˢଠޢॾ̰Ă൒ܑזٸ(TPanel)ۍy ૟ࢬ ॾ̝̚Ĉܑז˭Е͞ёΞ૟̍׍Еΐ ซΝĄٸॾቢăଡคăᇾចඈ ׍Е̰Ąੵ˞޷ตͽγĂଋ˵Ξͽ૟૾Ғ̍זٸีטଋΞͽ૟ЧёЧᇹ۞ଠ ො д CLX ྭπέᑕϡ඀ё̚ߏ՟ѣ೩ֻ cool bars ۞Ą ॾ౤ბĂιࣇ૟ͽΐˢ۞ึԔݬۡгᝑ੓ֽĄܑזٸౌۍѣк࣎ࢬڍ ॾ̝̚Ąтܑזአፋ̂̈۞ bands ۞̍׍ЕĄଋΞͽֶᅮࢋ૟к࣎̍׍Еΐ Ącool bar ݋ߏ˘჌ពϯЧ჌ΞொજăΞีטĂ྆ࢬΒӣ˞޷ต׶׎΁ଠ(˭ غॾ˯͞(дΑਕܑЕܑٺĂ఼૱ҜۍٙᏜ۞̍׍Е(Toolbar)Ă˜ߏ˘࣎ࢬ నࢍ̍׍Еᄃ cool bars ᄃ඀ёనࢍ͘Ίܝ9-58 ˢ ϲ˘௡ΐిตޙ y ၗېy నؠΐిต۞੓ؕ y ޽ؠΐిต۞ဦည ۍ׍Еࢬ̍זy ૟ΐిตΐ ׍Е˯ĂኛેҖ˭ЕજүĈ̍זࡶࢋ૟ΐిตΐ y үࠎ˘௡Ᏼፄ๪ต(radio buttons) Ξ̷ೱҌ on ٕ offޢ̝˞y ޷ y үࠎ˘ਠ۞˭ᑅё޷ต(push buttons) ΐిตѣˬ჌Ξਕ۞ፆүሀёĄιࣇΞͽ (ჍࠎဦညĈglyph)Ăϡͽ΃ܑ޷ต۞ΑਕĄ Ąΐిต఼૱ౌ՟ѣᇾᗟĂΪѣ˘࣎̈ဦԛۍΐిต۞үϡߏ఍ந̍׍Еࢬ Ą̝̚ۍࢬזΐีט3 ૟ΐిตٕ׎΁ଠ ൒˘ᇹĄ Ăӈֹෛ඄Լត̪̂̈ޘ૟አјܑॾϡ͗ડ۞౵̂ᆵޘĂΞߏᆵޘ۞੼ ૟ܲ޺ࣧώۍҌܑॾ౤ბĂࢬܢAlign পّనј alTopĄࡶࢋ෭ ۞ۍ2 ૟ࢬ Standard ࢱࢬ)Ą ۞ۍІΐˢܑॾ̝̚(ଂ̮Іሀ̮ۍ1 ૟ࢬ Іֽ૟̍׍Еΐˢܑॾ̰Ă̮ۍࡶࢋֹϡࢬ Іֽΐˢ̍׍Е̮ۍֹϡࢬ y ᔳᖟ׶ពϯ̍׍Еᄃ cool bars y ΐˢᔳᖟ۞̍׍Еᄃ cool bars y ၆໣ဂಏᑝઇ΍аᑕ y ֹϡ cool bar ̮Іֽΐˢ cool bar ีטy ֹϡ Toolbar ̮Іֽΐˢ̍׍Е׶࠹၆۞̍׍޷ตଠ ีטІֽΐˢ̍׍Е׶࠹၆۞ԣిตଠ̮ۍy ֹϡࢬ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-59 ܑ 9.7 Е΍˞˘ֱΞͽనؠ۞જүĂͽԼតΐిต۞γ៍Ą ӄֹϡ۰ĄםᗟĂଋ౵рֹϡϒቁ۞ෛᛇ೩ϯֽ ၗ׶ϡ౉ĄЯࠎιࣇ՟ѣᇾېΐిตͽιࣇ۞γ៍ֽ೩ϯֹϡ۰ѣᙯιࣇ۞ ၗېనؠΐిต۞੓ؕ ۞ᕇੱဦĄ ຐࢋפᏴޢ3 ా޷׌˭ Glyph य़ᙝ۞ Value ᛼Ăͽฟୁ Picture EditorĂ൒ Glyph পّĄ פІᑭෛጡ̚Ᏼۏ2 д ΐిตĄפ1 Ᏼ ࡶࢋдనࢍഇมആΐిต޽ؠဦညĂ ۞ဦညĄ ఼૱ౌߏдనࢍഇมആΐిต޽ؠဦညĂ̙࿅ଋ˵ΞͽдેҖഇม޽ؠ̙Т ၗ೩ֻ࣎Ҿ۞ᇆညĄ ېၗĄଋ˵ΞͽആՏ࣎ې۞פᏴڱ൑ٕפͽܑϯ޷ต̏޷˭ăϏ޷˭ă̏Ᏼ ଋΪ೩ֻ˘࣎ᇆညගΐిตĂ޷ต૟ҋҖ఍நྍᇆညĂڍต۞үϡࠎңĄт Տ࣎ΐిตౌᅮࢋ˘࣎ဦԛёᇆညĂჍࠎဦည(glyph)ĂιΞ೩ϯֹϡ۰ྍ޷ ޽ؠΐిต۞ဦည ᆅҌྍݬۡҜཉĄ Top পّౌనࠎ 8Ă֤ᆃιࣇ૟ົݬۡཉ̚Ą࿰న۞ॾቢనؠົ૟ΐిต෭ ଋ૟Տ࣎޷ต۞ڍ݋ߏ 25Ąтޘࠎ 41Ă҃ΐిต۞࿰న੼ޘ࿰న੼۞ۍࢬ ిตĄ ொજٕᔳᖟΐົ˵ۍॾ)ĶጾѣķྍΐిตĂЯѩொજٕᔳᖟࢬܑܧ҃)ۍࢬ Ą̚ۍࢬזٸ(Additional ࢱࢬ ۞ۍĂኛ૟ΐిต̮І(ֽҋ̮Іሀۍ׍Е۞ࢬ̍זࡶࢋ૟ΐిตΐ ̰ۍࢬז૟ΐిตΐ ၗېy ឰଋ̷ೱ(toggle)޷ต۞ ᄃ඀ёనࢍ͘Ίܝ9-60 ˢ ޷ตజ޷˭ĂΞߏ˵टధТ˘ॡม̰Տ࣎޷ตౌᇅ੓ֽĄ నј࠹Т۞পّࣃĄ఺Ξឰཏ௡۞үϡညߏϒ૱۞ཏ௡âѨ౵кΪѣ˘࣎ ૟ཏ௡̚Їңΐిต۞ AllowAllUp నј TrueĂΞҋજ૟ཏ௡̰ٙѣ۞޷ต TrueĄ ࡶࢋឰཏ௡̰۞ߙ࣎ΐిตјࠎ̷ೱё޷ตĂኛ૟ι۞ AllowAllUp পّనј Г޷˘˭Ă݋ᇅ੓ֽĄ ϲ˘௡޷ตүࠎ̷ೱё޷ตĈ޷˘˭޷ตĂΞ૟ι޷˭ćޙֽ ϡ AllowAllUp ၗĄ఺ᙷ޷ตჍࠎ̷ೱё޷ต(toggle)ĄଋΞͽֹې˭޷ٺಶ՟ѣЇң޷ต఍ ཏ௡̰ޢѣॡ࣏ଋᅮࢋ޷˘˭ཏ௡̚ߙ࣎̏གྷ޷˭۞޷ตĂឰιᇅ੓ֽĂ̝ ၗېឰଋ̷ೱ޷ต۞ GroupIndex నјТᇹ۞ᇴࣃĄ ૟ޢཏ௡̚۞ٙѣ޷ตĂ൒זٸࢋפેҖ఺І̍ү౵ᖎಏ۞͞ёĂಶߏᏴ পّనј࠹Т۞ᇴࣃĄ ࡶࢋ૟Їຍ࣎ᇴ۞ΐిต௡ј˘࣎ཏ௡ĂଋΞͽ૟Տ࣎ΐిต۞ GroupIndex ̚۞׎΁޷ตᇅ੓ֽĄ ޷ต௡ј˘࣎ཏ௡Ă఺ᇹ༊ଋ޷˞ཏ௡̚۞Їң˘࣎޷ตॡĂಶΞͽឰཏ௡ ၗ˭Ăଋᅮࢋ૟࠹ᙯ۞ې˘րЕ۞ΐిต఼૱΃ܑ˘௡̢ϋ۞ᏴีĄд఺჌ ϲ˘௡ΐిตޙ Ąڍ఺࣎ड़זᇴࣃĂ֭૟ Down পّనј True ֽ྿ ၗĄଋΞͽᖣ඾૟ GroupIndex পّనј࿬ͽγ۞ې˭޷ٺ׍Е̚۞ྍ޷ต఍ ଋ۞ᑕϡ඀ё׍ѣ࿰న۞ᘱဦ̍׍Ă֤ᆃኛቁؠ༊ᑕϡ඀ёୁજॡĂ̍ڍт ࿬۞ᇴࣃĄٺ׍ѣνᙝࠧ Indentপّనј̂ γ៍ EnabledপّనјFalseĄ۞פᏴڱ൑ ޷˭۞γ៍ GroupIndexপّనј࿬ͽγ۞ᇴࣃĂ҃DownপّనјTrueĄ ឰΐిตӔனĈ నؠ̍׍ЕĈ నؠΐిต۞γ៍ 9.7ܑ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-61 ၗĄࡶࢋдనࢍഇม૟޽ؠ̍׍޷ต۞ᇆညĂኛଋې۞פᏴڱ޷ต൑ ଋΪѣ೩ֻ̍׍޷ต˘࣎ᇆညĂ޷ต૟ົҋҖ఍நྍᇆညĂͽܑϯڍညĄт Տ࣎̍׍޷ตౌѣ˘࣎ ImageIndex পّĂιՙؠ˞ેҖഇมྍពϯ̦ᆃᇆ ޽ؠᇆညග̍׍޷ต ཉĄٸĂιࣇ˵ົଂາ۞˘Еฟؕีטटৼଠڱ൑ޘܜ׍Е۞ͪπ̍ڍĄтޘ ׍Е̰Ăιࣇ૟ົҋજჯ޺Тᇹ۞੼̍זีטѢ׎΁۞ଠٳ̚ۍͽଂ̮Іሀ ĄଋΞޘ׶ᆵޘੵѩ̝γĂ̍׍Еٙ̚ѣ۞̍׍޷ตౌົҋજܲ޺࠹Т۞੼ ̍׍ЕĶጾѣķ̍׍޷ตĂЯѩொજٕᔳᖟ̍׍ЕĂ˵ົொજٕᔳᖟ޷ตĄ ButtonĄ Ᏼፄ Newޢ׍Е̚Ăኛͽ໣ဂΠᔣ޷˘˭̍׍ЕĂ൒̍זࡶࢋ૟̍׍޷ตΐ ΐˢ̍׍޷ต ၗېy ឰଋ̷ೱ̍׍޷ต۞ ϲ˘௡̍׍޷ตޙ y y నؠ̍׍޷ต۞γ៍ y ആ̍׍޷ต޽ؠᇆည y ΐˢ̍׍޷ต ࡶࢋд̍׍Е̚ΐˢ̍׍޷ตĂኛેҖ˭Е̍үĈ y үࠎ˘௡Ᏼፄ๪ต y ޷˭ॡ̷ೱј on ׶ off y үࠎ˘ਠ۞˭ᑅё޷ต ̍׍޷ต۞Αϡߏ఍ந̍׍Е̮ІĄಶ׶ΐిต˘ᇹĂ̍׍޷ตΞͽ ׍Е̚Ą̍זΐีט2 ૟̍׍޷ตٕ׎΁ଠ ॾ౤ბĄܑזܢ1 ૟̍׍Е̮ІΐˢܑॾĄ̍׍Еົҋજ෭ ࢋֹϡ̍׍Е̮І૟̍׍Еΐˢܑॾ̝̚Ă Іٙ՟ѣ೩ֻ۞޷ตგந׶ពϯΑਕĄࡶ̮ۍ̍׍Е̮І(TToolBar)೩ֻ˞ࢬ ϡ̍׍Е̮Іֽΐˢ̍׍Еֹ ᄃ඀ёనࢍ͘Ίܝ9-62 ˢ ࡶࢋᙯౕ̍׍Е۞ҋજೱҖΑਕĂኛ૟̍׍Е۞ Wrapable পّనј FalseĄ ૟ι۞ Wrap পّనј TrueĄޢ׍޷ตĂ൒̍۞ޢ୕΍னд˘Е౵ ԓפĂኛᏴีטฟؕາ۞˘ЕଠܮࢬೱҖĂͽޢࡶࢋૻ࢝дপؠ۞̍׍޷ต ّĄ ώ۞ COMCTL32.DLL ˯̖ਕֹϡ TToolBar ۞ Flat পۍޢ̝ٕ ො Ϊѣд 4.70 FlatপّనјTrueĄ ۞ځឰ̍׍Е࠻੓ֽрညߏ౅ ࠻੓ֽ׍ѣĶᇅ΍ёķ۞ᙝࠧĂЯѩ ࿬۞ᇴࣃĄٺ׍ѣνᙝࠧ Indentপّనј̂ γ៍ EnabledপّనјFalseĄ۞פᏴڱ൑ ّనјTrueĄ ޷˭۞γ៍ GroupIndexপّనј࿬ͽγ۞ᇴࣃĂ҃Downপ ឰ̍׍޷ตӔனĈ నؠ̍׍ЕĈ ܑ9.8 నؠ̍׍޷ต۞γ៍ ܑ 9.8 Е΍˞˘ֱΞనؠϡͽԼត̍׍޷ตγ៍۞જүĈ ၗېనؠ̍׍޷ต۞γ៍׶੓ؕ DisabledImages ׶ HotImages পّĄ Ҿ۞ᇆညĄࡶࢋેҖ఺ี̍үĂኛ૟̙Т۞ᇆည୻ಏ޽ؠග̍׍Е۞ ޽ؠ࣎(˭غ໣ဂഫᇾٺҜٕפᏴڱт൑ּ)ڶېଋ˵Ξͽആ̍׍޷ต۞Ч࣎ ᇆညፋᇴࣃĂӈιдᇆည୻ಏ̰۞ҜཉĄ Іᑭෛጡ̰Ă૟̍׍޷ต۞ ImageIndex পّనјຐࢋ޽ؠග޷ต۞ۏ4 д ࣎̍׍޷ตĄ˘פ3 Ᏼ кТᇹ̂̈۞ဦϯٕᕇੱဦĄޝ˞୻ಏ̚Βӣ І޽ؠග̍׍Е۞ Images পّĄᇆညۏ Іᑭෛጡ̚Ă૟ TImageListۏ2 д ޷ตٙд۞̍׍ЕĄפᏴ 1 ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-63 ֽԼត bands ۞ҜཉĄ ѢՏ࣎ band νᙝ۞አፋ̂̈ԯ͘(grips)ٳĄֹϡ۰Ξͽᖣ඾ีט඄ݭ۞ଠ cool bar ̮І˫Ⴭࠎ rebarĂιдΞ፾ϲொજăአፋ̂̈۞ bands ˯ពϯ˞ෛ ̚Ϻ̙ΞֹϡĄ ώ۞ COMCTL32.DLL ˯̖ਕֹϡ TCoolBarĂ҃ д CLXۍޢ̝ٕ ො Ϊѣд 4.70 ΐˢ cool bar ̮І ົҋજԯཏ௡ٙ̚ѣ޷ต۞পّࣃనј˘ᇹĄ ׶ΐిต˘ᇹĂࡶଋ૟ཏ௡̰۞Їң̍׍޷ต۞ AllowAllUp నј TrueĂ૟ ޷ตĂΞ૟ιࣇ۞ AllowAllUp পّనј TrueĄ ˘˭ιົజᑅ˭ΝćГ޷˘˭Ă݋ᇅ੓ֽĄࡶࢋឰ˘௡̍׍޷ตјࠎ̷ೱё ϲཏ௡۞̍׍޷ตĂͽүࠎ̷ೱё޷ตֹϡĈ޷ޙֽ ଋΞͽֹϡ AllowAllUp ឰଋ̷ೱ̍׍޷ต Ąีטy ̍׍޷ตय़ᙝ۞׎΁ଠ ตĄ ડ(dividers)Ăኛΐˢ˘࣎ Style నࠎ tbsSeparator ٕ tbsDivider ۞̍׍޷ ϲ۩Ϩ̶ٕ࿣ޙy Style পّϏనࠎ tbsCheck ۞̍׍޷ตĄࡶࢋд̍׍Е̚ y Grouped পّనࠎ False ۞̍׍޷ตĄ јಏ˘ཏ௡Ąࡶࢋ̶౷̍׍޷ตཏ௡ĂΞֹϡ˭Еีϫ̶ֽฟ޷ตĈ Style నј tbsCheckăGrouped నј True ۞Їңాᜈ۞࠹ዐ̍׍޷ตĂౌΞ௡ ࣎޷ตົֹ଀ཏ௡̚۞׎΁޷ตᇅ੓ֽĂ఺Ξϡֽܑϯ˘௡̢ϋ۞ᏴፄĄ ཏ௡̍׍޷ต̚۞˘פtbsCheckćତ඾૟ιࣇ۞ Grouped পّనј TrueĄᏴ ࠹ᙯ۞޷ตĂ֭૟ιࣇ۞ Style পّనјפϲ˘௡̍׍޷ตĂኛᏴޙࡶࢋ ϲ˘௡̍׍޷ตޙ ᄃ඀ёనࢍ͘Ίܝ9-64 ˢ ࣎ bandĂГആι۞ ImageIndex পّ޽ؠᇴࣃĄ˘פጡ۞ Bands পّĄତ඾Ᏼ Іᑭෛۏ˭޷׌ాޢcool barĂ൒ פࡶࢋ૟ᇆည޽ؠග࣎Ҿ۞ bandsĂኛᏴ ІĄۏᏴፄᇆည୻ಏͽ΍னдЇңband۞νᙝ ImagesপّనјTImageList ІĄۏϲࡦഀᇆည BitmapপّనјTBitmapޙആcool bar FixedOrderనјtrueĄ ̈Ą) ԔĄ(ֹϡ۰̪ΞԼតbands۞Ҝཉ׶̂ ̙ឰֹϡ۰дેҖഇมԼតbands۞ึ ொੵcool bar׹ಛ۞ᙝࠧ BandBorderStyleనјbsNoneĄ band ౌѣιҋ̎۞ Text পّĄ ShowTextপّనјfalseĄcool bar̚۞Տ࣎ ΍ֽ ֨ͤbands۞TextপّдેҖഇมពϯ Ąڍّ۞ड़ π VerticalপّనјtrueĂ఺ΞԼតFixedSizeপͪܧ୊ᖼјݬۡĂ҃ FixedSizeপّనјtrueĄ ޘBandsჯ޺˘࡭۞੼ ҋજአፋ̂̈ĂͽटৼٙΒӣ۞bands AutoSizeপّనјtrueĄ ឰ cool bar ӔனĈ నؠ̍׍ЕĈ ܑ9.9 నؠcool޷ต۞γ៍ ตγ៍۞જүĈ cool bar ̮І೩ֻ˞к࣎၁ϡ۞௡ၗᏴีĄܑ 9.9 Е΍˞˘ֱΞԼត̍׍޷ నؠ cool bar ۞γ៍ bands ̰Ą cool bar ̚Ă̙࿅ιࣇ૟̙ົ΍னд࣎Ҿ۞ זΐีטిตඈᙷ۞ဦԛଠ ĄଋΞͽ૟ᇾចٕΐีטΪѣࢉϠҋ TWinControl ۞ VCL ̮Іߏෛ඄ݭଠ cool bar ˯Ą זΐีט૟ෛ඄ݭ۞ଠۍ2 ଂ̮Іሀ ॾ౤ბĄܑזܢົҋજ෭ Win32 ࢱࢬ)Ącool bar ૟ ۞ۍॾ̰(ֽҋ̮Іሀܑז1 ૟ cool bar ̮Іΐ ॾ̰Ăܑזࡶࢋ૟ cool bar ΐ ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-65 ቁг૟ιពϯ΍ֽĄځᑕϡ඀ёזᖟ੓ֽĂۡ ឰଋ࣒ԼĂιдેҖഇม૟ົᔳܮᔵ൒̍׍Едనࢍഇมౌົពϯ΍ֽĂͽ 2 ૟̮І۞ Visible পّనј FalseĄ ІĄ̮ۍ1 дܑॾ̚ΐˢ̍׍Еٕࢬ ϲᔳᖟ۞̍׍ЕĂޙࡶࢋ ܑॾĂ̙࿅ົᔳᖟ˘ֱٕٙѣ۞̍׍ЕĄ ϲΒӣк࣎̍׍Е۞ޙϡ۰ຐࢋֹϡιࣇॡĂ̖ពϯιࣇĄ఼૱ଋົֹזඈ ၗĂېΞϡٺ̍׍Е̙˘ؠࢋ˘ۡពϯ඾Ąְ၁˯ĂଋΞͽឰ˘ֱ̍׍Е఍ ΐˢᔳᖟ۞̍׍Е ົҋજг΍னĄ Αਕܑ۞ AutoPopup পّజనࠎ TrueĂ֤ᆃ༊޷ตజ޷˭ॡĂΑਕܑ૟ڍт DropDownMenu পّĄ Іᑭෛጡ̚Ă޽ؠ˘࣎ᇅ΍ёΑਕܑ(TPopupMenu)ග̍׍޷ต۞ۏ2 д ׍޷ตĄ̍פ1 Ᏼ ܑ޽ؠගߙ࣎޷ตĈ ଋֹϡ۞̍׍Е(TToolBar)Βӣ˞̍׍޷ต(TToolButton)ĂଋΞͽ૟Αਕڍт ޽ؠΑਕܑග̍׍޷ต ந඀Ԕķ׌̈༼Ą 6 ౢ۞ĶྻϡְІᄃְІ఍ந඀Ԕķ̈́ௐ 6 ౢ۞Ķࠎ̮І۞࿰నְІயϠ఍ ޷໣ဂΠᔣ׌˭ĂϡͽயϠྍְІ۞඀Ԕ॰ߛ(skeleton handler)Ąኛણዦௐ ІĄЯࠎ OnClick ߏ޷ต۞࿰నְІĂٙͽଋΞͽдనࢍॡഇĂд޷ต˯ᅅ ІĄଋΞͽആଋ۞ܑॾበᆷ OnClick ְІ఍ந඀ԔĂͽ఍ந఺ֱ OnClick ְ Ăּт̍׍Е۞޷ตĂᑕϡ඀ё૟யϠ OnClick ְޢ̝ีט༊ֹϡ۰޷˞ଠ ၆ᕇᑝ۞аᑕ ᄃ඀ёనࢍ͘Ίܝ9-66 ˢ ώۍϡ۰Լត˞͹ᗟĂֹڍЪϫ݈ Windows XP ͹ᗟ۞͹ᗟ͔ᑜٙயϠĄт ߏϤ௑ีטĂଠ˭غ ώ 6ۍWindows XPĄд ٺώ 6 ዋϡۍĄีטֽពϯଠ ώćιົֹϡĶ3D ዇၏ķ۞γ៍ۍ ٙѣ Windows۞ޢ̝ Windows 95 ٺϡ ώ 5 ΞዋۍώĄۍ͚јࠎ׌̙࣎Т۞̶ีטMicrosoft ૟ Windows В఼۞ଠ ᄃ XP ۞͹ᗟีטВ఼۞ଠ ̄Ăኛଋણ҂ Demos\CLX ˭۞̰टĄ πέᑕϡ඀ё۞ּྭٺІĄᙯۏLogo ᑕϡ඀ёౌΞֹϡ఺ֱજү׶જү୻ಏ ჟី(File|New|Other Projects ࢱࢬ)ăMDI ᑕϡ඀ёăSDI ᑕϡ඀ё׶ Winx Files\Borland\Delphi7\Demos\RichEdit ˭۞̰टĄੵѩͽγĂApplication ѣᙯֹϡજү׶જү୻ಏ۞඀ёቑּĂኛણ҂ Program ϯቑ඀ё end; PenBar.Visible := PenButton.Down; begin procedure TForm1.PenButtonClick(Sender: TObject); ̍׍ЕĄ ၗֽពϯٕᔳᖟ Penې˭ตĂOnClick ְІ఍ந඀Ԕ૟ॲፂ޷ตࠎᇅ੓ٕ޷ ฟ޷ٸٕ˭Е̰۞ߙ࣎޷ตֽពϯ Pen ̍׍ЕĄЯࠎՏ޷˘˭޷ต૟ົ޷ ೱ̍׍ЕĄд˭ࢬ۞ּ̄̚ĂଋΞͽֹϡ͹̍׍̷ֽڱଋ˵Ξͽ೩ֻ˘࣎͞ ᔳᖟ࠹၆ᑕ۞̍׍ЕĄົܮᑕϡ඀ё ĂޢІְĂ֭ͷՏ࣎̍׍Еᑕྍౌѣ˘࣎ᙯౕ޷ตĂ༊ֹϡ۰޷˞఺࣎޷ต̝ TrueĄ఼૱ଋົॲፂপҾ۞ֹϡ۰ְІٕᑕϡ඀ёፆүሀё۞ԼតֽેҖ఺ ࡶࢋдેҖഇมᔳᖟٕពϯ̍׍ЕĂΞ૟ι۞ Visible প̶ّҾనј False ٕ ̮І˘ᇹĂ̍׍ЕΞͽֶᅮࢋдેҖഇมពϯٕᔳᖟ੓ֽĄ ΍ֽԯܑॾԘ଀˘ဥᒷĄଋΞͽឰֹϡ۰ՙؠߏӎࢋពϯ̍׍ЕĄ׶ٙѣ۞ ఼૱ଋົԓ୕ᑕϡ඀ёΒӣк࣎̍׍ЕĂ̙࿅Ξ̙ԓ୕ٙѣ۞̍׍Еౌពϯ ᔳᖟ׶ពϯ̍׍Е ᑕϡ඀ёֹϡ̬ࢬ۞ฟ൴ 9-67 ͛ІĄځMicrosoft ۞ቢ˯ᄲ ͽ̈́ mainfest ᑫ९۞ซ˘ՎྤੈĂኛଋણዦีטWindows XP В఼ଠ ٺᙯ Ąଋᑕϡ඀ёಶ͚೯˞ Windows XP ͹ᗟĄีט யϠଠֽีטώ 6 ͹ᗟ͔ᑜ۞В఼ଠۍ׶ᑕϡ඀ё࠹Т۞ϫᐂ˭Ă૟ົֹϡ ٺଋ૟ଋ۞ manifest ᑫཉڍϲଋᑕϡ඀ё۞ manifest ᑫĄтޙּ˯ኛֹϡ /> language="*" publicKeyToken="6595b64144ccf1df" processorArchitecture="X86" version="6.0.0.0" name="Microsoft.Windows.Common-Controls" type="win32" Your application description here. /> type="win32" name="CompanyName.ProductName.YourApp" processorArchitecture="X86" version="1.0.0.0" ߏ mainfiest ᑫ۞ቑּĈܮ˭Project1.exe.manifestĄͽ ϲ Project1.exe ઇࠎΞેҖᑫĂ׎ manifest ᑫᑕྍΨઇ ޙଋ۞૞९ڍĄᓝּֽᄲĂтޢ׎ٺ ΐ.manifestܢϡଋᑕϡ඀ё۞ЩჍĂ֭ ࠹ֶّ۞ XML ୻ಏĄᑫ९ҋ̎ົֹٺManifest ᑫ९̚ӣѣଋᑕϡ඀ё̚ᙯ ଀૟ manifest ᑫΐҌଋ۞ᑕϡ඀ё̚Ą Ăଋ(ٕଋᑕϡ඀ё۞ֹϡ۰)ีטώ 6 ۞ଠۍଋຐពϯڍĄтีט۞В఼ଠ ώ 5ۍĂٙѣ۞ VCL ᑕϡ඀ёౌົពϯ˭ڶ۞ VCL ᑕϡ඀ёĄд࿰న۞ଐ ٙѣଋٙฟ൴ٺયᗟĄ఺ֱ̮ІົхдีטVCL ̚Ăҋજг఍நଫВ఼۞ଠ זĄBorland ̏૟ధк̮Іΐีט׌჌ᙷݭ۞В఼ଠٺVCL т̫ΞͽВϡ ҋજ۞ͧ၆າ۞͹ᗟĄଋ̙֭ᅮࢋࢦາበᛌᑕϡ඀ёĄົܮีטВ఼ଠ۞ 6 9-68 ˢܝᄃ඀ёనࢍ͘Ί Іᙷݭ 10-1̮טଠ TRichEdit ֹϡrich textॾёበᏭ̙ࢨҖᇴ۞͛ф(่VCLዋϡ)Ą TMaskEdit ֶೈߙ჌ॾёĂညߏฎᅍડཱིٕ࿪ྖཱིቅ TMemo በᏭкҖ͛ф TEdit በᏭ˘Җ͛ф ֹϡ఺̮࣎І ༊ଋࢋֹϡ۰ү఺ІְĈ ІĈΞͽឰֹϡ۰ΐˢ͛фĄ̮טy በᏭଠ Іֽ૟͛фពϯֹ̟ϡ۰ĄଋΞͽֹϡĈ̮טధкᑕϡ඀ёౌົֹϡ͛фଠ І̮ט͛фଠ Іķ̮טΑਕĂኛଋણ҂ௐ 7 ౢĶֹϡଠٸٳ І˯၁ү̮טІĄࡶຐд఺ֱଠ̮ט(grid)ăValue list በᏭጡăͽ̈́ဦԛଠ Іă͞ॾ̮טІăពϯଠ̮טІăཏ௡ଠ̮טІă޷ตăЕϯଠ̮טˢଠ ІăᏮ̮טІĂΒ߁͛фଠ̮טЧ჌ଋΞΐͽྻϡ۞ଠځдώౢ̚Ăࠎଋᄲ ӄଋనࢍֹϡ۰̬ࢬ۞ෛᛇ̼̮ІĄםІĂߏ˘჌ਕૉ̮טٙᏜ۞ଠ Іᙷݭ̮טଠ ᄃ඀ёనࢍ͘Ίܝ10-2 ˢ Іѣೀีࢦࢋ۞পّĈ̮ט͛фଠ І۞পّ̮טበᏭଠ І̯ధֹϡ۰ΐˢкҖ͛фĄ̮טTMemo ̮Іᄃ TRichEdit ଠ ߙ࣎পؠ۞ॾёĂТॡॾё̼୬ពϯֹ̟ϡ۰۞͛фĄ TMaskEdit ߏͧྵপঅ۞በᏭ͞๴̮ІĂιਕૉቁᄮٙᏮˢ۞͛фߏӎ௑Ъ ĄޘܜᏭ͞๴̰۞͛ф ਕ΍னдበטTrue ӈΞχฟ఺ีਕ˧ĄҰ˵ΞͽᖣϤ MaxLength পֽّࢨ Ą૟ AutoSize পّనࠎޘበᏭ͞๴Ξͽᐌ඾фវ̂̈۞ត̼ҋજአፋι۞੼ ன͞ёĄ ф̮۞Ӕט࣎Ҿଠڱ఺ֱфវপّົᇆᜩበᏭ͞๴̚۞ٙѣ͛фĂ҃՟ѣᏱ ͛фពϯ۞γ៍ĄҰΞͽ޽ؠфវ۞фݭĂ͎̇ĂᗞҒ̈́ЧีপّĄטΞͽଠ ΍னдበᏭ͞๴̚۞͛фĄՀԼ Font পّטҰΞͽᖣϤՀԼ Text পֽّଠ ሹᏮˢ൏ᕇॡĂົពϯ˘࣎੯ᘖ۞͛фഫᇾĄ TEdit ̈́ TMaskEdit Ϊߏᖎಏ۞ಏҖ͛фᏮˢበᏭ͞๴Ą༊በᏭ͞๴ጾѣᔣ Іბෛٙࢋពϯ̝ྤੈ۞̂̈̈́ॾё҃ؠĄ̮ טѩϡ౉۞ଠٺІពϯ͛фගֹϡ۰̯֭ధֹϡ۰Ꮾˢ͛фĄϡ̮טበᏭଠ І̮טበᏭଠ І̚ពϯ͛ф(VCLᑕϡ඀ё̖ѣ)Ą̮טTStaticText дෛ඄۞ଠ І̚ពϯ͛фĄ̮טෛ඄۞ଠܧTLabel д TLCDNumber ͽᇴҜ۞ពϯॾёֽពϯᇴࣃྤੈĄ ඕͽពϯ׎ι۞შࢱ׶ဦԛĄ TTextViewer ពϯ͛фᑫٕᖎಏ۞HTMLშࢱĂֹϡ۰Ξͽଡજ̰टٕᕇᏴా TTextBrowser ពϯ͛фᑫٕᖎಏ۞HTMLშࢱĂֹϡ۰Ξͽଡજ̰टĄ ֹϡ఺̮࣎І ༊ଋࢋֹϡ۰ү఺ІְĈ Іᄃᇾ੃Ă̙̯ధֹϡ۰ΐˢ͛фĄ̮טy ͛фᑭෛଠ Іᙷݭ 10-3̮טଠ VCL)Ą ٺ̮Ąдᑭរᑫ९ЩჍॡॾγ۞ѣϡ(่ዋϡ І̰۞͛фߏӎᑕଂ ANSI ф̮ᖼೱҌ OEM ф̮טy OEMConvert ՙؠଠ y Lines ͽфҚҚЕΒӣ Memo ̮І۞͛фĄ ྽͛фߏӎԼតĄ І۞͛фĄᑕϡ඀ёΞͽᑭߤ Modified পֽّ଀̮ۢטy Text পّΒӣଠ І̰۞၆ᆅ͞ё(ያνăያΠٕߏ၆̚)Ą̮טy Alignment ޽ؠ͛фдଠ ఼۞পّĈ Іᔘѣೀ࣎В̮טІВ఼۞পّ̝γĂMemo ̈́ RichEdit ଠ̮טੵ˞͛фଠ ІĄ̮טො Ϊѣд VCL ᑕϡ඀ё̖̚Ξͽֹϡ RichEdit ଠ ଵ͞ёăͽ̈́በཱི͞ёĄ Ąι˵ឰଋ޽ؠфݭ۞পّă၆ᆅ͞ёăྯॾᇴăᒺٸٳຩವăͽ̈́͛ф۞ TRichEdit ߏ჌ Memo ᙷݭ۞̮ІĂι͚೯ RichText ۞͛фॾё̼ăЕОă WordWrap পֽّፆଠ఺ีপّĄ Ăٕ۰ᖼԶҌ˭˘ҖĄҰΞͽ౅࿅ޘІ۞ᆵ̮טΞͽШΠؼҩ෹΍ଠ TMemo ߏበᏭ͞๴۞Ω˘჌ݭၗĂιΞͽ఍நкҖ͛фĄMemo ̮І۞͛ф TMemo ̈́ TRichEdit ౌΞͽ఍நкҖ͛фĄ І۞পّ̮טMemo ̈́ RichEdit ଠ ĄޘܜSelStart, SelLength ΃ܑٙᏴፄ͛фొЊ۞Ҝཉᄃ SetText ӣѣϫ݈ٙᏴፄ(ͅϨ)۞͛фొЊĄ ф̮ᇴϫטMaxLength ࢨ ReadOnly ޽ؠֹϡ۰ߏӎΞͽ࣒Լ ޘІΞᐌ඾фវ̂̈ҋજՀԼ੼̮טAutoSize ឰଠ ពϯ͛ф۞фវטFont ଠ І̰۞͛ффҚ̮טText ၆ᑕҌଠ ֹϡ఺̮࣎І ࡶଋᅮࢋֹϡ۰аᑕ І۞পّ̮ט͛фଠ 10.1ܑ ᄃ඀ёనࢍ͘Ίܝ10-4 ˢ ̚Ą І̮טଠזኛֹϡ FileName পّдેҖॡഇĂֽ૟ည.html ఺ᇹ۞͛фᑫΐ І̚Ą̮טMIME ᙷݭĂ֭ឰ factory ૟ѩ˘ྤफ़ྶˢҌଠ זůᙯᓑ ۞ᑫ९ᙷݭĄᓝּֽᄲĂଋΞͽ૟ᑫ९۞ઘᑫЩůּт.txtă.htmlăͽ̈́.xml Іֽҿᕝ̰ٙಷᇆညۏ পّĄFactory ՙؠ˞տౣࢋֹϡ֤࣎ MIME factory TTextBrowser ׍ѣ׶ TTextViewer ࠹Т۞পّĂҭк˞˘࣎Щࠎ Factory ۞ ր௚ߏ౵ָ۞ᏴፄĄ TTextBrowser ϡֽពϯ HTML-based ۞͛фٕ၁ү HTML-based ۞ Help Ξᕱᜓ።Ϋ୻ಏ̚۞͛ІĄTTextViewer ᄃܮĂڱForwardăͽ̈́ Home ඈ͞ ͛І̚۞׎΁ొЊĄٙᕇణ۞͛Іົజᐼхд።Ϋ୻ಏ̚Ą౅࿅ Backwardă જĄ౅࿅ TTextBrowserĂֹϡ۰˵ΞͽᕇᑝాඕĂͽᕱᜓ׎΁۞͛ІٕТ˘ TTextViewer ઇࠎ˘࣎ಏ৷۞ᑭෛጡĂٙͽֹϡ۰Ξͽዦ᝝͛ІĂ֭ᐌຍଡ TLCDNumber ͽᇴҜ̼۞͞ёពϯᇴࣃݭ۞ྤੈĄ ాඕͽᑭෛ׎΁۞ࢱࢬٕᇆညĄ TTextViewer ពϯ͛фᑫ९ٕᖎಏHTMLࢱࢬĂֹϡ۰Ξͽଡજࢱࢬٕߏᕇᑝ TTextBrowser ពϯ͛фᑫ९ٕΞឰֹϡ۰ଡજ۞ᖎಏHTMLࢱࢬĄ ֹϡ఺̮࣎І ࡶଋᅮࢋֹϡ۰аᑕ Іਕពϯ઱᝝ّኳ۞͛фĄ̮ีטд CLX ᑕϡ඀ё̚Ă͛фᑭෛଠ І̮ט͛фᑭෛଠ Memo ̰ٙѣ۞͛фĄ פᏴֽڱ͞ дેҖॡഇĂଋΞͽϡ SelectAll Ϩ)͛фĄͅ)פІ੓үϡॡĂߏӎҋજгᏴ̮טy AutoSelect ՙؠ˞༊ଠ y నؠ WantTabs ՙؠ˞ֹϡ۰ߏӎΞᏮˢ tabĄ ೱҖĄטy WantReturns ՙؠֹϡ۰ߏӎਕͽ Enter ᔣซҖૻ y WordWrap ՙؠ͛фߏӎົдΠᙝቡೱҖĄ Іᙷݭ 10-5̮טଠ ଡજٕበᏭ۞͛фĂኛֹϡ TEdit ̮ІĄ តĄ༊඀ёనࢍ Caption পّॡĂLabel ̮Іγ៍ົᐌӈԼតĄࡶࢋពϯΞͽ Ϥᑕϡ඀ёֹϡ۰ΐͽԼڱLabel ̮І఼૱ϡֽពϯ઱᝝۞ᐖၗ͛фĂ҃൑ Ąזy Transparent ՙؠд͛фᇾច˭۞ีϫ(ּтဦԛ̼̮І)ߏӎΞజ࠻ ̮Ąӎ݋Ă&ᔘߏ̪ᖞͽ&΍னĄ ቢ۞ф̮ߏΐిфغቢ΍னĂܑϯ఺࣎ΐغTrueĂ&ົͽдιΠᙝф̮۞ y ShowAccelChar পّՙؠᇾᗟ̚&௑ཱིࢋтңពϯĄࡶ ShowAccelChar ࠎ ൏ᕇĄזֹϡ۰ֹϡΐిᔣॡତќ ಶົдีטΒӣΐిᔣ(accelerator)Ă֤ᆃд FocusControl পّ޽ؠ۞ଠ Ąࡶߏ͛фᇾច۞ᇾᗟีטॾ˯۞׎΁ଠܑזy FocusControl ాඕ͛фᇾច ᗞҒ̈́фݭ͎̇Ą γ៍۞পّĄՏ̮࣎ІΪटధֹϡಏ˘۞фវăטy Fontă Color ̈́׎΁ଠ y Caption ჯ᜕඾͛фᇾច۞͛ффҚĄ ͛фᇾចΒӣ˭Еᛳّ: ତќ൏ᕇĄ༊ଋᅮࢋ׍౯ෛ඄ handle ۞͛фᇾចॡĂኛԼϡ TStaticTextĄڱ൑ І)ĂЯѩ̮טwidget-based ଠ ܧІ(д CLX ̚Ăࠎ̮טෛ඄ݭ۞ଠܧߏ࣎ ॾ˯Ąᇾ໤۞͛фᇾច̮І TLabelܑٺཉ͛фॡĂଋΞͽ૟͛фᇾចཉٸ˯ дଋᅮࢋᙊҾăٕොྋΩ˘̮࣎ІĂּтበᏭ͞๴ॡĂٕߏдଋຐࢋдܑॾ І˯ពϯ͛фĄ̮טTStaticText дෛ඄ݭ۞ଠ І˯ពϯ͛фĄ̮טෛ඄ݭ۞ଠܧTLabel д ֹϡ఺̮ІٕᛳّĈ ࢋԆј఺̍үĈ І۞य़ᙝĄ̮ט׎΁ଠٸ͛фᇾចਕૉពϯ͛фĂ҃ͷ఼૱జཉ ͛фᇾច ҂..\Delphi7\Demos\Clx\TextBrowserĄ І۞ᑕϡ඀ёĂኛଋણ̮טࡶຐણ҂ֹϡ͛фᕱᜓጡଠ ᄃ඀ёనࢍ͘Ίܝ10-6 ˢ คĄޘגϲͪπٕݬۡޙy Ξͽϡ Orientation পّ ቑಛĄ֍ဦ 10.1Ąפy ϡ SelEnd ׶ SelStart ᇾϯᏴ คቑಛ۞˯˭ࢨࣃĄޘגy ϡ Max ׶ Min পّనؠ ࣎г͞Ą֤ז໣જ޽ᇾۡତொ ડાಶΞ૟טค۞ଠטߙ࣎г͞Ăٕߏ޷˭ଠזࣃĄֹϡ۰૟໣જ޽ᇾொજ ޘܪค(Track bar)Ξдాᜈડม̰నؠٕአፋፋᇴࣃĂညߏࢰณٕ̂̈ޘג І̮טคଠޘג TScrollBox ̮ІĄ ҋજనؠܑॾ˯ࢬ۞ଡજคĄࢋயϠ˘๴˟ჯ۞ΞଡજડાĂኛֹϡ ᅮࢋᗝγᇤᆷ඀ёቅĄּтĂTForm ѣ VerScrollBar ׶ HorzScrollBar পّົ ଡજค̮І̙֭૱ϡĂЯࠎధкෛᛇ̼̮Іౌ೩ֻιࣇҋ̎۞ଡજคĂ̙֭ ଡજ۞ͅᑕĄ І၆ֹϡ۰̮טĂҰΞͽᇤᆷ඀ёቅՙؠෛ඄ăܑॾăٕߏଠ̚ڱІ఍ந͞ І̰ट۞̮ІĄд OnScroll ְ̮טଡજคߏ࣎ϡֽଡજෛ඄ăܑॾăٕߏଠ ଡજค CLXᑕϡ඀ё)ٺࣃ(่ዋϡפІᏴ̮טTSpinEdit ଂspinnerଠ VCLᑕϡ඀ё)ٺTHotKey ᏮˢCtrl/Shift/AltᔣሹфҚ(่ዋϡ VCLᑕϡ඀ё)ٺࣃ(่ዋϡפበᏭ̮І۞spinnerᏴזTUpDown ଂాඕ (ڍࣃ(ͧଡજคՀѣෛᛇ̼ड़פTTrackBar дాᜈቑಛ̰Ᏼ ࣃפTScrollBar дాᜈቑಛ̰Ᏼ ֹϡ఺̮࣎І ༊ଋࢋֹϡ۰ү఺ІְĈ ˭ࢬ۞̮І೩ֻྵΩᙷ۞Ꮾˢ͞ёĂ І̮טপঅ۞Ꮾˢଠ Іᙷݭ 10-7̮טଠ পّΞϡ۞ᔣѣֱ֤Ą Іϫ݈۞޷ᔣ௡ЪĄModifiers পّՙؠ HotKey̮טሤᔣଠٸHotKey পّх І۞ᔣሹሤᔣĄ̮טኛଋֹϡሤᔣ(hot key)̮ІĂֽ޽ؠᖼொ൏ᕇҌЇຍଠ І (VCL ፾ѣ)̮טሤᔣଠ ϒߏՏѨᆧഴ۞ณĄ۞ٸ׎னࣃхд Value পّĄIncrement পّ࿰నߏ 1Ăх ͞ёࠎᕇ޷Ш˯ٕШ˭۞቏ᐝ޷ตĂٕۡତд͛фበᏭડᏮˢᇴࣃĄ Іटధֹϡ۰ͽ׽ؠ۞ม࿣Լតፋᇴࣃ۞̂̈Ąፆү̮טspin buttonĄѩଠ І(TSpinEdit)˵Ⴭઇ up-down widgetĂlittle arrows widget ٕ̮טspin ଠ І (CLX ፾ѣ)̮טspin ଠ І)Ą̮טІ(ּт͛фଠ̮ט׎΁ଠזІాඕ̮ט૟˯˭ଠ ϒߏՏѨᆧഴ۞ณĄኛϡ Associate۞ٸপّĄIncrement পّ࿰నߏ 1Ăх д PositionٸЪĂιឰֹϡ۰଀ͽ˘࣎׽ؠ۞ᆧഴณֽԼតፋᇴࣃĄ׎னࣃх І(TUpDown)ߏ͛ф͞๴׶˘၆޷ต۞௡̮טд VCL ᑕϡ඀ё̚Ă˯˭ଠ І̮ט˯˭ଠ ᇴĄޘגy నؠ PageSize Ξՙؠֹϡ۰޷˭ Page Up ׶ Page Down ᔣொજ۞ LineSize ΞԼតᆧΐณĄ ᇾᄫĄనؠޘגĂֹϡ۰Ξͽ޷˯˭͞Шᔣ˯˭ொજ˭ڶy д࿰నଐ ࣃĄ ۞פค۞࿰నҜཉĂ˵ົ੃ᐂֹϡ۰дેҖॡഇᏴޘגy Position నؠ۞ߏ І۞ˬ჌ԛё̮טคଠޘג ဦ10.1 Ąڱ͞ ม࿣Ăኛֹϡ TickStyle পّ̈́ SetTick۞ޘגטࣇ۞ҜཉĄࡶࢋଠ ĄΞᖣϤ TickMarks পֽّԼតιޘגბѣ˘ҖغคޘגĂ˭ڶy ࿰నଐ ᄃ඀ёనࢍ͘Ίܝ10-8 ˢ TRadioButton ពϯ˘௡̢ϋ۞Ᏼี TCheckBox ពϯon/offᏴี ϲፋ௡̍׍Е޷ตޙ TSpeedButton TBitBtn ΐ˯ဦԛពϯ׻΄Ᏼี TButton ពϯ׻΄͛ф ֹϡ఺̮ІĈ Ԇј఺̍үĈ ˭Еೀ჌តԛĈ Іѣ̮טੵ˞Αਕܑ̝γĂ޷ตߏᑕϡ඀ё౵૱֍۞׻΄ୁજ͞ёĄ޷ตଠ І̮ט޷ต׶ᙷҬ۞ଠ І۞ᙝቡࠎ 3D ୆֎۞ᇹёĄ̮טࠎ TrueĂ݋నؠ̶࿣ଠ Ąనؠ BeveledޢІ̮טІ࠹ዐ۞ଠ̮טనؠ MinSize Ξ޽ؠдአፋ׶̶࿣ଠ І۞ΠᙝĄ̮ט࿣ଠ ̶ٺཉˢΩ˘࣎඄ॾĞ၆ᆅ͞ёనࠎ alLeft ٕ alClientğޢ඄ॾ۞Π઎Ă౵ٺ ІĞ˵ߏШν၆ᆅğ̮טనؠ׎ Alignment ̝ࣃࠎ alLeftĂତ඾ཉˢ˘̶࿣ଠ ॾ۞ν઎Ăܑٺҋજ๱႕౺˭۞ડાĄᓝּֽᄲĂҰΞͽ૟඄ॾཉޢ̝̈̂ ඄ॾᑕྍߏШ̚ม၆ᆅ۞Ă఺ᇹι̖ົд׎΁඄ॾአፋ۞˭ٸజޢІĄ౵̮ ט࿣ଠ̶˭ٸĂኛͽ࠹Т۞၆ᆅ͞ШֽޢཉҌܑॾٸีטд૟඄ॾٕ׎΁ଠ ІĄีטΞͽѣк࣎ଠ Іឰଋ૟ܑॾထ̶ࠎк࣎඄ॾĂ҃дՏ࣎඄ॾ˯ౌ̮ט࠹ညĂ̶࿣ଠޝ(box panel)ᄃཏ௡͞๴(group)ۍІ۞̂̈Ą఺჌̮І۞ֹϡ͞ёಶ׶ࢬ̮טଠ І̝มĂͽ̯ధֹϡ۰አፋ఺ֱ̮ט׌࣎၆ᆅ۞ଠٺ̶࿣̮І(TSplitter)జཉ І̮ט̶࿣ଠ HotKey ׶ Modifiers ٙ޽ؠ۞޷ᔣ௡ЪĂWindows ಶົୁજΑਕܑีϫĄ ሤᔣ̮ІΞͽઇࠎ޽ؠගΑਕܑีϫ̝ ShortCut পّ۞ࣃĄ༊ֹϡ۰Ꮾˢд Іᙷݭ 10-9̮טଠ y ֹϡ Kind Ξͽҋજгనؠ޷ต۞ဦԛ׶࿰నҖࠎĄ ޷ต۞ҋࢎဦԛĂኛనؠ Glyph পّĄפy ࡶࢋᏴ ІĄ̮טဦԛ޷ต(TBitBtn)ߏጾѣဦԛ̼γ៍۞޷ตଠ ဦԛ޷ต Іᒔ଀൏ᕇॡ˵ᛈજ OnClickĄ̮טд׎΁ଠ y ࡶࢋ Enter ᔣᛈજ޷ต۞ OnClick ְІĂ૟ Default నؠࠎ TrueĄEnter ົ ࠎ TrueĄ y ࡶߏࢋдֹϡ۰޷˭ ESC ॡឰ޷ตᛈજι۞ OnClick ְ ІĂኛ న ؠ Cancel Ąڱጡ྆۞ OnClick ְІ఍ந͞ ۞જүĄдనࢍॡഇా޷׌Ѩ޷ตĂፋЪᒖဩಶົҋજ૟Ұ૲Ҍ඀ёቅበᏭ Ăֽаᑕֹϡ۰޷˭޷ตڱҰΞͽ޽ؠ TButton ̮І۞ OnClick ְІ఍ந͞ ޷ต͛фӔனĄ ቢ۞ࡻ͛фϓдغؠ˘࣎ሤᔣĂΪࢋ޷˭ሤᔣĂ˵ົᛈ൴޷ตĄሤᔣົͽ૲ Ξͽ͔൴જүĄ͛фߏϤ Caption পّٙ޽ؠĄ̂ొ̶۞޷ตౌົ޽ܮޢ̝ ˭ֹϡ۰ΪࢋӀϡ໣ဂֽᕇᑝ޷ตಶΞ͔൴જүĄ޷ต˯ᐝᇾϯ඾͛фĂ޷ І̮ט޷ตଠ 9 ౢ۞Ķฟ൴ᑕϡ඀ёֹϡ۰̬ࢬķĄ ଋΞͽ࣎Ҿ۞͞ёٕइϡፋ࣎ᑕϡ඀ё۞͞ёֽҋࢎᘱᄦ޷ตĄኛଋણ҂ௐ Ăኛણ҂ௐ 9 ౢ۞Ķֹϡજү୻ಏķ˘͛Ąځ୻ಏ۞ྎ௟ᄲ тңд޷ตĂ̍׍ЕĂ׶Αਕֹܑ̚ϡજүٺ఺ֱ׻΄۞Αਕܑᄃ޷ตĄᙯ ІĂּтаᑕۏજү୻ಏΞͽឰଋะ̚გந၆ֹϡ۰׻΄(જү)ซҖаᑕ۞ ตېІĂѣΞொજăአፋ̂̈۞୧̮טTCoolBar ពϯ˘௡ෛ඄۞ଠ ۞̂̈׶Ҝཉ ІĂ֭ҋજአፋιࣇ̮טTToolBar ͽ˘Е˘Е۞͞ёֽщཉ̍׍޷ต׶׎΁ଠ ϡ఺̮ІĈ Ԇј఺̍үĈֹ ᄃ඀ёనࢍ͘Ίܝ10-10 ˢ ͽ̈́Ķ௡ᖐ̍׍ЕᄃΑਕܑ۞જүķĄ ԣి޷ต۞ྎႽྤੈĂኛણ҂ௐ 9 ౢ۞Ķֹϡ Panel ̮Іֽΐˢ̍׍Еķٺᙯ AllowAllUp నؠࠎ FalseĄ ၗĄࡶࢋឰፋ௡޷ตညᏴፄ๪ตཏ௡˘ᇹ۞ྻүĂ૟ېٕߏĶШ˯ķ۞ Ăפy ࡶ AllowAllUp ࠎ TrueĂ֤ᆃཏ௡̰ٙѣ۞ԣి޷ตౌΞͽߏϏᏴ ၗĂኛ૟ Down পّనؠࠎ TrueĄېפ˘ฟؕಶ૟ԣి޷ตពϯࠎᏴ ၗĄࡶຐࢋдې۞(פШ˯۞(ϏᏴٺĂԣి޷ต΍னॡߏ఍˭ڶy д࿰నଐ ࿬ࣃĄܧࠎ࠹Т۞ y ࡶຐឰԣి޷ตͽཏ௡͞ёྻүĂኛ૟ٙѣ޷ต۞ GroupIndex পّనؠ ඄ॾֽயϠ̍׍ЕĄ ߏనؠሀё۞޷ตĄιࣇѣপঅ۞ΑਕΞͽፋ௡ྻүĄԣి޷ต఼૱ົລ੨ ԣి(speed)޷ต̮І(TSpeedButton)఼૱дܑࢬ˯ົѣဦԛĂΞેҖ׻΄ٕ ԣి޷ต ၗ۞̙ТဦԛĄېΞពϯՏ࣎ ၗĈ˯ă˭ă׶޷ҝĄ૟ NumGlyphs পّనࠎ 3ېy ဦԛ޷ตΞͽѣˬ࣎ ᗓĄ Ăဦԛ׶͛ф̚ม࿣ 4 ࣎ည৵Ąϡ Spacing ᆧΐٕഴ͌఺෼˭ڶy д࿰నଐ ّĄMargin ՙؠဦԛᙝቡ׶޷ตᙝቡ۞ည৵ᇴĄ y ဦԛ׶͛фົҋજ၆ᆅ޷ต̚δĄࢋொજιࣇ۞ҜཉĂኛֹϡ Margin প পّĄ Ăဦԛߏд͛ф۞νᙝĄࡶຐࢋΐͽொજĂኛଋֹϡ Layout˭ڶy д࿰నଐ Іᙷݭ 10-11̮טଠ ׍Е˯Ą̍זButton ֽ૟޷ตΐ New פᏴޢԣి޷ตயϠ̍׍ЕĂ˵Ξͽֹϡ TToolBar ̮ІĂΠᑝă൒ ІĄΞͽଂ panel ̮І׶̮ט̍׍Е೩ֻᖎಏ۞͞ёֽଵЕ׶გநෛᛇ̼ଠ ̍׍Е পّࠎ True ٕ FalseĂΞͽϲӈԼតᏴፄ๪ต۞γ៍Ą జᏴፄ۞Ᏼፄ๪ตĂ׎๪઻ົజ๮โĂ̝ͅ݋ࠎ۩۞๪॰Ąࡶ޽ؠ׎ Checked ྎ௟۞ྤੈĄ ௡Ăឰֹϡ۰ଂѣࢨ۞˘௡Ᏼፄ̚Ᏼፄ˘۰Ąдௐώౢ۞Ķཏ௡̮ІķѣՀ ϲཏޙ˘ፋ࣎ཏ௡۞Ᏼፄ๪ตĂ֭ҋજΐͽଵЕĄҰ˵Ξͽࠎк࣎Ᏼፄ๪ต ϲޙϲ࣎Ҿ۞Ᏼፄ๪ตĂٕӀϡ TRadioGroup ̮ІֽޙTRadioButton ̮Іֽ Ᏼፄ๪ตĂ˵Ⴭࠎ options buttonsĂពϯ˘௡̢ϋ۞ᏴፄĄҰΞͽֹϡ Ᏼፄ๪ต јϲॡĄڱనؠֹ଀ϫ݈ߤ८͞๴̝̚ࣃ൑ ༊׎΁۞ٺၗ݋ߏϡېၗ̚۞˘۰Ą҃Ϗؠې̮˟˞Іពϯ̮טො ߤ८͞๴ଠ ၗĄېϏᏴፄ۞ௐˬ჌ܧ˵ϯ̙ߏᏴፄ ఺࣎ᏴีĄcbGrayedēߤ८͞๴ົតјѷϨĂܑפᇾᄫĂܑϯֹϡ۰̏Ᏼ פ఺࣎ᏴีĄcbCheckedēߤ८͞๴ົѣ८פᇾᄫĂܑϯֹϡ۰֭ϏᏴפ ၗĄcbUncheckedēߤ८͞๴̙ົѣ८ېy State পّՙؠߤ८͞๴ѣ۞Ч჌ ၗĄېඈˬ჌Ξਕ۞פ ăѷϨٕߏྋੵ८פy ૟ AllowGrayed నࠎ TrueĂͽֹߤ८͞๴Ξͽߏ८ Ąפy ૟ Checked నؠࠎ TrueĂͽֹߤ८͞๴࿰నࠎ८ ͞๴Ą ϲߤ८ޙֽ χ̺ćӎ݋۞ྖĂ͞๴ົߏ۩۞ĄଋΞͽֹϡ TCheckBoxົܮ๴ ߤ८͞๴ਕឰֹϡ۰дߏ/ӎ׌჌ՙؠ̝มፄ˘Ąࡶֹϡ۰ᏴፄߏĂߤ८͞ ߤ८͞๴ ᄃ඀ёనࢍ͘Ίܝ10-12 ˢ к࣎ีϫĄٕ˘פTListBox ពϯ͛фҚЕćֹϡ۰ΞᏴ ֹϡ఺̮ІĈ ֽ྿ј ϫĄѣೀ჌̮ІΞͽពϯҚЕĈี۞פҚЕ೩ֹֻϡ۰˘௡ΞᏴ І̮טҚЕଠ Ąޘᆵٕޘy ͽ FixedSize পّՙؠ˞ band ߏӎࢋѣ˘࡭۞੼ y ૟ FixedOrder পّՙؠ˞ֹϡ۰ߏӎΞͽࢦາଵЕ bandĄ ІͽயϠາ۞ bandĄ̮טΐˢາ۞ෛ඄ଠ̰ۍͽд఺࣎ࢬ ޷˟˭Πᙝ۞ Value ᛼ҜĂٕߏ޷˭(…)޷ตĄ˵ΞޢBands পّĂ൒ פ ІᑭෛጡᏴۏጡΐˢăӁੵăٕߏ࣒Լ bandĄࢋฟୁ Bands በᏭጡĂд ІĄдనࢍॡഇĂΞͽϡ Bands በᏭۏ ௡ TCoolBand˘ٸy Bands পّх ૱ߏд WINDOWS\SYSTEM ٕ WINDOWS\SYSTEM32 ϫᐂ˭)Ą COMCTL32.DLL(఼ ۞ޢͽۍ дనࢍॡഇ׶ેҖॡഇĂCoolbar ౌᅮࢋ 4.70 ۞ҜཉĄ І̮טજՏ࣎ band νᙝ۞̂̈አፋ೪ԯĂಶΞአፋଠٳ۞ band ̰Ąֹϡ۰ Іౌд࣎Ҿ̮טІĄՏ࣎ଠ̮טCoolbar ΒӣΞͽ፾ϲொજ׶አፋ̂̈۞̄ଠ Coolbar (VCL ፾ѣ) ІĂּтበᏭ͞๴Ă௡Ъ͞๴ඈඈĄ̮טཉ׎΁ଠٸ̍׍Е˯˵Ξͽ გநĄኛણ҂ௐ 9 ౢ۞Ķֹϡજү୻ಏķ˘༼Ą І۞аᑕજү௚˘̮טAction lists ̮ІឰҰΞͽ૟Ᏼಏٕ޷ตඈ׻΄ёଠ ІඕЪјཏ௡Ą̮טؠ̍׍)ᔘΞͽ૟̍׍Е˯۞ଠ ࢬనۍĂ҃ space ׶ divider(পঅ۞ځγ۞ពϯᏴีĂညߏྯ΍ёᙝࠧ׶౅ ׍ЕĂҋજೱҖ֭Ω੓˘ЕćTToolBar ᔘጾѣᗝ̍˭̙ٸІົд̮טćଠޘ д࠻̙֍۞̍׍޷ต˯Ă֭ჯ޺˘࡭۞੼ٸІົ̮טд̍׍Е۞׎΁ଠٸ TToolBar ̮Іѣధкр఍Ĉ̍׍Е˯ٙѣ۞̍׍޷ตົჯ޺˘࡭۞ᆵ੼ćଋ Іᙷݭ 10-13̮טଠ ΃ܑՏ࣎ีϫౌߏͽфҚពϯĄ૟఺ࣃԼࠎ StyleĂΞͽயϠጾѣ۰ҋ൪ ĂStyle ߏ lbStandardĂ˭ڶy Style পّՙؠЕϯ͞๴тңពϯีϫĄ࿰నଐ ரĄنItemHeight జ ͽည৵ࢍ)Ą Style পّΞਕົֹ)ޘy ItemHeight ޽ؠҚЕีϫ۞੼ ۞ีϫĄ ଀ซֽٸy IntegralHeight ޽ؠ۞ߏЕё͞๴ߏӎΪពϯдݬۡ۩ม˯ԆБ І۞᛼ҜᇴĄ̮טy Columns ޽ؠҚЕଠ y Sorted ՙؠҚЕߏӎࢋͽфϓึԔଵЕĄ к࣎ีϫĄפy ༊ MultiSelect ΃ֹܑϡ۰˘ѨߏӎΞͽᏴ y ItemIndex ΃ܑҚЕ̚జᏴፄ۞ߏࣹ࣎ีϫĄ І̝ࣃĄ̮טІֽ๱ˢଠۏ y Items ົֹϡ TStrings ۞ҚЕĄ к࣎ีϫٕ˘פЕϯ͞๴(TListBox)׶ߤ८Еϯ͞๴ĂౌΞពϯ̯ధֹϡ۰Ᏼ Еϯ͞๴׶ߤ८Еϯ͞๴ ҚЕ۞ՀкྤੈĂણ֍ௐ 5 ౢ۞ĶֹϡфҚҚЕķ˘༼Ą фҚٺෛᛇ̼۞ TStringList ׶ TImageList ̮ІΞგநфҚ׶ᇆညཏ௡Ąᙯܧ (VCLᑕϡ඀ёٺഇ۞͟ፌ(่ዋϡ͟פTMonthCalendar Ᏼ VCLᑕϡ඀ё)ٺTDateTimePicker ពϯ˘ҚࢋᏮˢ͟ഇॡม۞͞๴Ą(่ዋϡ CLXᑕϡ඀ё)ٺϡ TIconView ˘Қีϫٕྤफ़ĂͽҖЕ۞͞ёĂពϯ׎̈ဦϯٕ̂ဦϯĄ(่ዋ TListView ˘ཏ൑ลᆸᙯܼ۞ពϯีϫăጾѣဦϯă᛼Ҝăᇾᗟඈγ៍ᏴፄĄ TTreeView ពϯลᆸё۞ีϫĄ ͛ффҚҚЕĄѩ̮ІΞ༼࠷۩มĄ۞פTComboBox ពϯΞќ TCheckListBox ពϯ˘Қ݈ࢬΐѣߤ८͞๴۞ЕϯĄ ϡ఺̮ІĈ ֽ྿јֹ ᄃ඀ёనࢍ͘Ίܝ10-14 ˢ Іΐˢဦԛķ˘༼Ą̮טІĂણ֍ௐ 7 ౢ۞Ķдଠ̮טϡ۰ҋ൪ଠ ֹٺΞត۞ีϫĄᙯޘ൪۞௡Ъ͞๴ĂΞͽϡဦԛពϯٕߏពϯ੼ x ኛֹϡ csOwnerDrawFixed ٕ csOwnerDrawVariable ֽயϠֹϡ۰ҋ Ą(פ csDropDownList ֽឰበᏭ͞๴ࠎ઱᝝(ૻֹ࢝ϡ۰่ਕଂ୻ಏ̚Ᏼ ϲ׍˭ٛё୻ಏ۞በᏭ͞๴Ąኛֹϡޙֽ x ኛֹϡ csDropDown y ኛֹϡ Style পֽّՙؠຐࢋϡֹϡ۞ݭၗĄ ௡Ъ͞๴ѣˬ჌ݭၗĈᇾ໤ă˭ٛ(࿰నࣃ)̈́˭ٛЕܑĄ ඍ९Ą۞ܕົҋજԱವ౵ତ পّಶົՀજĄࡶ AutoComplete পّࠎ TrueĂдֹϡ۰ᔣˢ͛фॡĂ඀ё І̚۞͛ф-ۡତᔣˢ͛фٕଂ˭ٛᏴಏᏴؠॡĂ̮І۞ Text̮טԼត˞ଠ ௡Ъ͞๴(TComoboBox)̮ІඕЪ˞በᏭ͞๴̈́Ξଡજ۞Еϯ͞๴Ą༊ֹϡ۰ ௡Ъ͞๴ MultiSelect পّĄ ࡶࢋឰֹϡ۰ΞͽТॡкᏴЕϯ͞๴۞ีϫĂυืనؠ ExtendedSelect ̈́ 5 ޷˭ቁؠตĄ 4 ֹϡфҚҚЕበᏭጡᏮˢЇຍ۞͛фĂ఺૟јࠎЕϯ͞๴۞୧Е̰टĄ 3 ᗕ޷ Items পّ۞Πٕ͞ಏᕇ ... ޷ตĂΨ΍фҚҚЕበᏭጡĄ 2 አፋЕϯ͞๴̂̈Ă֭నؠ͛ф၆ᆅ͞ёĄ ॾ˯Ąܑזٛ˘࣎Её͞๴̮Іٳ1 дଋ۞૞९̚Ăଂ̮ІЕ ϲ˘࣎ᖎಏ۞Еϯ͞๴Ĉޙࡶࢋ ΐˢဦԛķĄ І̮טІĂኛણ҂ௐ 7 ౢĂĶдଠ̮טᄦүጾѣ۰ҋ൪۞ଠٺĄᙯޘ۞੼ owner-draw)۞Еϯ͞๴Ă΃ܑีϫΞͽߏဦԛĂ˵Ξͽߏ׽ؠٕតજ) Іᙷݭ 10-15̮טଠ ݭၗ˘ᇹĄ ඕၹពϯ̮І˵Ξͽពϯ᛼Ҝ̈́̄ีϫĂಶညЕϯពϯ̮І۞ vsReportېፘ ඕၹពϯ̚۞ีϫĄېਕૉᆧăӁăᑭෛፘڱ͞۞ Լត఺ֱีϫĄTTreeNodes ֽڱ͞۞(পّ۞ࣃĄଋΞͽдેҖॡഇֹϡ Items পّ(ݭҾࠎ TTreeNodes ҰΞдѩనؠ TreeView ̮І۞ Items পّࣃĄଋٙΐˢ۞ีϫಶົតј Items ࡶࢋдనࢍॡഇΐˢีϫĂኛд̮І˯ᗕ޷໣ဂνᔣಶΞΨ΍ีϫበᏭጡĄ y ShowRoot ົֹពϯాତ౵˯ᆸีϫ۞ቢ୧΍ٕঐεĄ(VCL ፾ѣ) ඕၹᑭෛ۞ాତቢ΍னٕঐεĄ(VCL ፾ѣ)ېy ShowLines ົֹពϯፘ y ShowButtons ົֹĶ+ķตٕĶ-ķต੓үϡĂͽՙؠߙีϫߏӎΞणฟĄ y Indent నؠ̶࿣ีϫ׶ιࣇ۞ͭีϫ̝ม۞ͪπည৵ᇴĄ ၗྤੈĄې఺ีϫ۞ ϫĂΞͽពϯ̙Т۞ဦϯĄѩγĂ˵ΞΐˢဦԛĂညߏߤ८͞๴Ăϡֽͅᑕ ඕၹ۞ีې̰ΞͽᏴፄّ۞Βӣѣဦϯ۞͛фᇾᗟĄ༊ֹϡ۰णฟٕќᒺፘ ඕၹېІΒӣΞͽឰ outline णฟ׶ќᒺ۞޷ตĄдፘ̮טІĄ఺ଠۏ˘௡ Іົϡᒺଵ۞ outline ͽទᏭᙯܼߛၹពϯ̮טඕၹᑭෛ(tree views)ଠېፘ ඕၹᑭෛ̮Іېፘ ௐ˘࣎ีϫĄזĂιົᖼԶаี˘ޢϫ̙ົઃ঻д౵ี۞פᑅШ˭቏ᐝĂᏴ ঐ఺ีΑਕĄѩΑਕ̯ధҰΐˢ۩۞ีϫĄᔘѣࡶҰ޺ᜈ޷פֽ ࠎ ciNone ޷˭ Enter ᔣֽΐˢ˘࣎ีϫĄҰ˵Ξͽ૟ InsertMode পّనޢͽ๱ˢ͛ф д඀ёેҖॡഇĂCLX ۞௡Ъ͞๴ྻү͞ёᄃ VCL ̙ТĄд CLX ̚ĂҰΞ Еϯ̚۞ีϫ࣎ᇴĄٺy ኛֹϡ DropDownCount পֽّԼតពϯ ኛԁචአፋι۞̂̈Ăͽቁؠଋ۞Е̮ีϫౌਕజពϯĄ x ኛֹϡ csSimple ֽயϠ̂̈׽ؠă̙֭ົᙯౕ̝ҚЕ۞௡Ъ͞๴Ą ᄃ඀ёనࢍ͘Ίܝ10-16 ˢ TGroupBox ѣᇾᗟ۞ᇾ໤ཏ௡͞๴ ϡ఺̮࣎ІĈ ༊ଋࢋү఺ְĈ ௡ྤੈ۞̮ІѣĈ ፆүĄೀ࣎Ξͽϡֽཏٽࡶᑕϡ඀ё۞ྤੈߏͽཏ௡ពϯĂֹϡ۰ົͧྵट ཏ௡̮І ώĄ҃дྭπέ۞ฟ൴˯Ăߏ̙ਕֹϡ۞Ą ۍ۞˯ͽۍ WINDOWS\SYSTEM ٕ WINDOWS\SYSTEM32 ٕϫᐂ˭)4.70 నࢍॡഇ׶ેҖॡഇౌυื COMCTL32.DLL( ఼૱ߏд MonthCalendar ̮І΃ܑΞᏮˢ͟ഇٕ˘߱ॡม۞͡ፌĄࢋֹϡ఺ֱ̮ІĂ д CLX ᑕϡ඀ё̚ĂDateTimePicker ពϯΞᏮˢ͟ഇٕॡม۞Еϯ͞๴Ă҃ DateTimePicker ׶͡ፌ ёֽពϯ˘ፋ࣎ҚЕ۞ྤफ़ٕีϫĄ ϲဦϯពϯ̮І(icon view)Ăιਕͽ̂ă̈ဦϯ۞͞ޙֽ ኛֹϡ TIconView ဦϯពϯ̮І(CLX ፾ѣ) ShowColumnHeaders পّពϯЧ᛼Ҝ۞ᇾᗟĄ ᛼ҜΒӣ̈ဦϯ׶ᇾᗟĂତ˭ֽ۞᛼ҜΒӣᑕϡ඀ё޽ؠ۞̄ีϫĄϡ ׎ྤੈĄ౵νᙝٸy vsReport ૟ีϫពϯд፾ϲ۞˘ҖĂЧҖ̚ͽ᛼Ҝଵ જ۞ѣᇾᗟ۞ဦϯĄٳy vsList ពϯีϫࠎ̙Ξ જีϫĄٳϯពϯෛ඄̰ y vsIcon ׶ vsSmallIcon ૟Տ࣎ีϫពϯࠎѣᇾᗟ۞ဦϯĄֹϡ۰ΞͽдЕ Ұࢋ۞ҚЕ჌ᙷĈפϡ ViewStyle পֽّᏴ ϲЕϯពϯ̮ІĂιਕͽ̙ТॾёពϯҚЕĄኛֹޙֽ ኛଋֹϡ TListView Еϯពϯ̮І Іᙷݭ 10-17̮טଠ ׹ಛᙝࠧ۞ည৵ᆵĄ ॾአፋ̂̈Ăιᔘߏົჯ޺׶ܑॾ۞࠹၆ҜཉĄBorderWidthপّՙؠдpanel ֽдܑॾ˯૟̮Іෛᛇ̼г௡ᖐд˘๴ĄPanel Ξͽ၆ᆅܑॾĂ఺ᇹӈֹܑ ІĄ఼૱Ăιజϡ̮טTPanel ̮І೩ֻ˘჌఼ϡّኳ۞टጡͽटৼ׎΁۞ଠ ۍࢬ ԛ޷ตཏ௡̮І۞͎̇ӈΞĄ ๪ԛ޷ตͽೀ࣎᛼Ҝ۞͞ёଵЕĄࡶࢋԼត๪ԛ޷ต۞̂̈ĂΪࢋԼត๪ט ĄԼត Columns পّΞଠ˞פItemIndex পّͅߍϫ݈ࣹ˘࣎๪ԛ޷ตజᏴ পّćՏ˘࣎фҚ΃ܑ˘࣎๪ԛ޷ตĂ҃фҚࣃಶߏ๪ԛ޷ต۞ᇾᗟĄ ІᑭෛጡበᏭ׎ Itemsۏ̍үĄࡶࢋд๪ԛ޷ตཏ௡ΐˢ๪ԛ޷ตĂΪࢋд ТЪү۞ם๪ԛ޷ตཏ௡(TRadioGroup)ᖎ̼˞఍ந˘ཏ๪ԛ޷ต֭ឰιࣇ ΍ன Caption পّ̝̚ࣃĄ ົܮˢཏ௡͞๴̰Ąᇾϯ఺ཏ௡۞͛фٸனдཏ௡͞๴̰۞̮ІĂГ૟ιࣇ ΍פଂ̮ІЕ̰Ᏼޢдܑॾ˯Ă൒ٸ̂ໄಶߏᏴፄ๪ต̮І˞Ą૟ཏ௡͞๴ ІĂ౵૱Βӣ۞̮טཏ௡͞๴̮І(TGroupBox)ਕдܑॾ˯ଵЕ˘ཏ࠹ᙯ۞ଠ ཏ௡͞๴׶๪ԛ޷ตཏ௡ THeaderControl ೩ֻྤफ़᛼Ҝ۞ᇾᗟ І̮ט׎΁ଠ TPageControl ˘௡̢ϋ۞ඊ੃ᘨԛё۞ࢱចĂѣ၆ᑕ۞ྤफ़ࢱĂՏ࣎ౌΞΒӣ TTabControl ˘௡̢ϋ۞ඊ੃ᘨԛё۞ࢱច І۞Ξଡજડા̮טTScrollBox Βӣଠ Іཏ௡̮טTPanel Հѣෛᛇ̼ᇅّ۞ଠ TRadioGroup Ᏼፄ๪ต۞ཏ௡ ϡ఺̮࣎ІĈ ༊ଋࢋү఺ְĈ ᄃ඀ёనࢍ͘Ίܝ10-18 ˢ Іߏ̮࣎טTab পّӈΞயϠࢱចĂTabs ۞Տ࣎фҚ΃ܑ˘࣎ࢱចĄࢱចଠ Іᑭෛጡ̰በᏭۏІ(TTabControl)ѣඊ੃ᘨ̶࿣ጡ۞γ៍Ąд̮טࢱចଠ І̮טࢱចଠ ົଡજĄ ၗЕౌ̙ېଡજ͞๴̚Ă఺ᇹ˘ֽĂଡજΪົ൴Ϡдଡજ͞๴྆Ă̍׍Ё́ ٺၗЕౌཉېІдଡજॡĂዌҝଡજคĂҰΞͽឰܑॾ˯ੵ˞̍׍Е̮טଠ ၗЕඈېෛ඄۞ଡજડાĄࠎ˞ᔖҺ̍׍Еٕטଡજ͞๴۞Ω˘ีϡ౉ߏࢨ ˢଡજ͞๴۞Ξෛડા̰ĂιົҋજពϯଡજคĄٸԆБڱІ൑̮טӣ۞ଠ ІĂҭߏଡજ͞๴఼૱ߏ࠻̙֍۞Ą̙࿅Ăࡶߏଡજ͞๴Βۏ ᄃ TCheckBox ІĂּт TButton̮טಶည panel ٕߏཏ௡͞๴Ăଡજ͞๴˵ਕΒӣ׎΁ଠ ଡજડાĄ۞טϤଠ நăྏზܑă૞९გநඈඈથຽహវ̚Ąଡજ͞๴ֻҰдܑॾ˯ؠཌྷ˘๴ҋ ͛ф఍ٺϲ˘࣎ෛ඄۞кࢦෛાĄෛા૱֍ޙಶߏڱଡજ͞๴۞Ω˘჌ϡ ІĂົҋજଡજιࣇ۞̰टĄ ІĂညߏЕϯ͞๴׶ Memo ̮̮טˢߙ࣎ડાᔘк۞ྤੈĄѣֱଠٸͧΪਕ ϲ˘๴ΞҋϤଡજ۞ડાĄᑕϡ඀ёॡ૱ົࢋពϯޙଡજ͞๴(TScrollBox)ਕ ଡજ͞๴ ၗЕٕྤੈពϯෛ඄ĄېҰ˵Ξͽֹϡ˘ٕк࣎ panel ઇࠎ ۞ቢ୧Ăኛֹϡҫϡྤ໚ྵ͌۞ TBevel ̮ІĄ ຍࡶҰΪߏಏ৷гຐࢋঙ੓ٕ˭Όڦត̼кბ۞ 3D γ៍Ąኛזֱপֽّ྿ Panel ̮І۞γ៍ΞϤ BevelOuter ̈́ BevelInner পֽّՙؠĄҰΞͽፆү఺ panel ֶ൒ົ঻дࣧ఍Ą ۞ଵЕ͞ёĄҰΞឰ panel ۞ Align পّࠎ alTopĂ఺ᇹӈֹܑॾ̂̈ԼតĂ ιࣇטԼត Align পֽّଠޢд panel ˯ᐝĂ൒ٸІ̮טҰ˵Ξͽ૟׎΁ଠ Іᙷݭ 10-19̮טଠ (ొغၗડા(఼૱ддෛ඄ېពϯొغTStatusBar дෛ඄ ֹϡ఺̮ІٕপّĈ ࢋԆј఺̍үĈ ㌅ॡȈ̶۞ѣϡĈ ϲពϯੈि۞၆ྖ͞๴ĄѩγĂ˭ࢗ۞̮ІдેҖॡഇ೩ֻෛᛇ̼۞аޙͽ ҖॡഇΐͽనؠĄଋ˵Ξેٺֱ̮ІůΒ߁ TFormůౌѣ Caption পّĂਕ ၗ࠹ᙯ۞ྤੈĄᓝּֽᄲĂѣېΞͽ೩ֹֻϡ۰ᄃᑕϡ඀ёϫ݈ڱк͞ޝѣ І̮טពϯଠ дЕϯ͞๴(TListBox)̝˯ĄٸͽӀϡѩ̮Іֽડ̶߱རٕ᛼ҜĂּтĂᕚ ࣎߱རౌਕϡ໣ဂአፋ̂̈Ąϡ Sections পّ޽ؠᇾᗟ̰࣎Ҿ۞߱རĄҰΞ ІĂιົពϯ͛ф֭ឰՏ̮טᇾᗟ(THeaderControl)̮Іߏ̶࣎߱۞ෛᛇ̼ଠ І̮טᇾᗟଠ Ξͽֹϡ ActivePage ٕ ActivePageIndex পّĄ ଀ϫ݈ࢱࢬĂኛֹϡ ActivePage পّĄࡶࢋͽ඀ё̷ೱϫ݈ࢱࢬĂҰפࡶࢋ NewTabSheet.PageControl := PageControl1; NewTabSheet = TTabSheet.Create(PageControl1); І྆Ĉ̮ טІĂГ૟ιΐˢࢱࢬଠۏ ϲგநࢱࢬ۞ TTagSheetޙдેҖॡഇĂҰυื ϲາ۞ࢱࢬĂኛͽ໣ဂΠᔣಏ޷̮ІĂᏴፄ New Page ᏴีĄޙࢋдనࢍॡഇ Ѩᇾច̷ֽೱࢱࢬĄ ࢦᝑ੒ࢬĄֹϡ۰Ξͽ໣ဂᕇᏴࢱ۞טІଠۏ ІΞពϯϤ TTagSheet̮טଠ І(TPageControl)ߏໂዋЪઇࠎкࢱࢬ၆ྖ஼۞ࢱࢬ௡Ą˘࣎ࢱࢬ̮טࢱࢬଠ І̮טࢱࢬଠ ІĄ̮טĄࢋயϠкࢱ۞၆ྖ͞๴ĂኛֹϡࢱࢬଠڱOnChange ְІ఍ந͞ І۞γ៍Ăኛᇤᆷ̮טѣ˘௡̮І۞ PanelĄࢋд޷˭ᇾចॡԼត఺ଠ ᄃ඀ёనࢍ͘Ίܝ10-20 ˢ ᑫĄځІ۞ Help ̰टᇴࣃ׶ᅃӄᄲ̮טϲଠޙHelpContext ׶ HelpFile পّ ͽ̈́ӈॡ۞೩ϯĄځІΞͽពϯ׶̰ट࠹ᙯ۞ᅃӄᄲ̮ט̂ొ̶۞ෛᛇ̼ଠ ೩ϯপّ̈́ځ̮І۞ᅃӄᄲ ᆧࣃϤ Step পֽّՙؠĄ ᅍ۞ڱ͞ ᅍΐ Position পّࣃĄStepItֽڱ͞ Ψ StepBy ٕ StepItײĂΞ݈ـ ޘࣃᆧΐॡܲ޺ϒቁ۞ҜཉĄϡ Max ׶ Min నؠ Position ۞ቑಛĄࡶࢋឰซ ኛϡ Position ֽనؠ Progress bar ۞࿰నҜཉĄдેҖॡഇĂPosition ົдᇴ ဦ10.2 Progress bar үٕߏࡦഀ఍ந۞а㌅ĄྻܜІүࠎ̴̮טΠĶ๱႕ķĄϡ఺࣎ଠזડાົଂν ېү۞ԆјѺ̶ͧĄιѣ࣎୧ྻܜІߏϡֽពϯ̴̮טProgress bar ఺࣎ଠ Progress Bar WidthăAlignment ׶ Text পّĄText পّࠎ୬ពϯд panel ̰۞͛фĄ ІᑭෛጡበᏭ Panels পّĂͽ Panels በᏭጡనؠՏ࣎ panel ۞ۏાĂኛд ၗЕ̮І̰யϠк࣎͛фડېၗЕ̶јк࣎͛фડાĄࢋдېҰ˵Ξͽ૟ ׎ពϯ۞͛фĄטTrue ֭౅࿅ SimpleText পֽّଠ ၗЕ΍ன˘Җ͛фಶ֖ૉĂኛ૟ι۞ SimplePanel পّనࠎېҰΪԓ୕ڍт Align পّົనࠎ alBottomĂιົ఍நҜཉ׶̂̈Ą ˭ڶଐ ၗЕĂҭֹϡ TStatusBar ̮ІົՀᖎಏĄ࿰నېᔵ൒Ξͽϡ Panel ̮Іᄦү ၗЕې ր௚ځHelpContext׶HelpFile ాඕቢ˯ᅃӄᄲ ځHint׶ShowHint ߿જ۞Ķ̍׍৪థķᅃӄᄲ TProgressBar ពϯߙপؠ̍ү౺ዶ̍ү۞Ѻ̶ͧ ϡ఺̮ІٕপّĈ ࢋԆј఺̍үĈֹ Іᙷݭ 10-21̮טଠ ۞γ៍׶ҖࠎĄ y OptionsăDefaultColWidth ׶ DefaultRowHeight পّ˵ົᇆᜩྤफ़ Grid ؠҖᄃЕ۞ᗞҒĄ Ąኛͽ FixedColor পֽّ޽ؠ׽ޘGridLineWidth পّనؠ Grid ቢ۞ᆵ y ଋΞͽϡ FixedCols ׶ FixedRows পّᏴፄ׽ؠٕߏ̙ਕଡજ۞ҖЕĄϡ Ąϡ ScrollBars পّд Grid ΐ˯ଡજคĄޘGridLineWidth পّనؠॾቢᆵ y ଋΞͽϡ ColWidths ׶ RowHeights পّԼតপؠҖٕ᛼۞ᆵٕ੼Ąϡ VisibleRowCount পّߏ Grid ̰Ξ֍۞ҖЕᇴϫĄ ߏ Grid ̰ௐ˘࣎Ξ֍۞˘ҖĂኛϡ LeftCol পّĄVisibleColCount ׶ y TopRow পّՙؠ˞ϫ݈д Grid ̰౵˯ࢬ˘Е۞ߏࣹЕĄࡶࢋۢ྽ࣹЕ ۞ᙝࠧࣃĄ ॾ̄פа็໣ဂ޽ᇾٙдॾ̄۞ҖЕळᇾĄSelection পّ΃ܑϫ݈ٙᏴ ݋ົڱ͞ Ξͽᒔ଀ٙ޽ؠॾ̄۞൪ࢬळᇾĄ҃ MouseToCellڱ͞ y CellRect ᇤᆷ඀ёቅĂͽ๱ࣃҌॾ̰Ą̚ڱOnDrawCell ְІ఍ந͞ ІĂΞͽϡҖЕॾёពϯனх۞ྤफ़ඕၹĄኛд̮טGrid(TDrawGrid)ଠ DrawGrid ۞ DrawGrid ٕ StringGridĄ Іķೡࢗ۞ TDBGrid ٕ TDBCtrlGrid ̮ІĄӎ݋Ăኛֹϡᇾ໤̮טϡྤफ़ଠ Grid ົͽҖЕ͞ёពϯྤੈĄࡶߏᇤᆷྤफ़ऱᑕϡ඀ёĂֹϡௐ 20 ౢĂĶֹ Grid І۞ ShowHint পّ̝ࣃᄃ׎̮ͭІ࠹ТĄ̮טనࠎ True ົֹ଀ଠ І˯ࢬॡឰ೩ϯ΍னĂኛ૟ ShowHint నࠎ TrueĄ૟ ParentShowHint̮זဂொ Hint ߏ࣎фҚĂ༊ֹϡ۰д̮І˯ொજ໣ဂ޽ᇾಶົ΍னĄࢋдֹϡ۰૟໣ ᄃ඀ёనࢍ͘Ίܝ10-22 ˢ І۞ PickList পّ)ֹٕϡ value list editorۏ ΞགྷϤᐖၗЕܑ(TItemProp Ą೩ֻ͞ёפυื΍ன˭ٛ௑ཱིĂ֤ᆃυื೩ֻ࣏Ᏼࣃឰֹϡ۰Ᏼڍт ֻ၆ྖ஼ឰֹϡ۰ᏮˢࣃĄ Ъዋ۞ࣃٕ೩פy ឰ value list editor ពϯ˭ٛЕܑĂឰֹϡ۰ଂЕܑ̚Ᏼ ࣃࠎ઱᝝טy ࢨ ޘܜy ޽ؠࣃ۞౵̂ Ꮾˢॾёטy ೩ֻ˘࣎በᏭዌཊֽࢨ ІឰҰΞͽĈۏ ౌ೩ֻЧҾ۞ TItemProp ϡ۰тңՀԼ Value ᛼ҜĄՏ˘࣎ีϫֹטҰ˵ΞͽགྷϤ ItemProps পّଠ ߏӎ̯ధາᆧƝ࣒ԼƝӁੵ৶͔Ăͽ̈́৶͔ߏӎυืߏ઱˘ĄטีឰҰჟ௟ଠ ϡ۰тңՀԼ৶͔ࣃĄKeyOptions ΒӣЧ჌ᏴֹטҰΞͽགྷϤ KeyOptions ଠ Іߏӎਕૉឰֹϡ۰ՀԼ͎̇ğĄ̮טᗟĞѩপّ˵Ξଠ ரᇾنߏӎטّតՀ࿰న۞᛼ҜᇾᗟĄ˵ΞͽགྷϤ DisplayOptions পֽّଠ ѩ჌͞ॾΒӣ׌࣎᛼Ҝâ࣎ߏ৶͔˘࣎ߏࣃĄҰΞͽགྷϤ TitleCaptions প ̙͚೯ྭπέĄ ҰΞͽۡତͽ Values পّߤྙߙ࣎৶͔၆ᑕ۞ࣃĄTValueListEditor ̮І֭ х۞фҚҚЕĄ఺ֱ৶͔Ɲࣃᐼхд TStrings ۞ࢉϠᙷҾ۞ Strings পّĄ నࢍϡֽበᏭΒӣ৶͔ƝࣃĂͽĶ৶͔ŶࣃķԛёᐼܝTValueListEditor ࠎ૞ Value list በᏭጡ (VCL ፾ѣ) ĄפІΞͽϡ Cols ٕ Rows পّхۏ ІౌΒӣд Objects পّ̰Ą၆ߙ˘ҖٕЕĂٙѣ۞фҚ׶ᄃιࣇ࠹ా۞ۏ Cells পّ̰Ăд͞๴̰׶фҚ࠹ా۞ٙѣ ٺٸϯĄ͞๴̰ٙѣ۞фҚౌх фҚ͞ॾ̮Іߏ TDrawGrid ۞ࢉϠᙷҾĂ׎পঅ۞Αਕਕૉᖎ̼фҚ۞ព StringGrid Іᙷݭ 10-23̮טଠ ଀ՀкྤੈĄפёనࢍໄኢķͽ Transparent পّΞనؠᇆညពϯॡ۞̙Тγ៍Ąኛણ҂ௐ 12 ౢĂĶဦԛ̼඀ Picture পّՙؠѩ̮Іϫ݈Ӕன۞ᇆညĄֹϡ CenterăAutoSizeăStretch ׶ Image ̮І(TImage)ਕ дܑॾ˯ពϯဦͯĂညߏဦԛăဦϯăٕߏ drawingsĄ Image ІķĄ̮טϲဦԛଠޙĶ ІĂኛଋણ҂ Component Writer’s Guide ۞ௐ 10 ౢ̮טϲဦԛ̼ଠޙຐڍт ൏ᕇĄזёϖᅈౌ̙ᅮࢋତќב ё(RepaintăInvalidateăඈඈ)Ă఺ֱבຍĂ఺ֱ̮ІΒ߁˞૱֍۞ᘱဦڦኛ TAnimate ពϯ൑ᓏ۞AVIᑫ९ TPaintBox ᇤᆷ඀ёֽពϯဦԛ TBevel ពϯ3Dቢ୧׶॰ߛ TShape ពϯೀңဦԛ TImage ពϯဦԛᑫ۞̰ट ֹϡ఺̮І ࢋԆј఺̍үĈ Ĉٽ˭Е̮Іਕឰᑕϡ඀ёᄃဦԛ۞ፋЪՀΐट ဦԛពϯ̮І ೩ֻаᑕĄ ֽڱΒ߁నؠࣃ)ĄҰυืᇤᆷ OnEditButtonClick ְІ఍ந͞)ڱаᑕ͞ ࡶҰ޽ؠ࣒Լࣃॡࢋ΍ன…޷ตĂ֤ᆃυื೩ֹֻϡ۰޷˭ѩ޷ตॡ۞ ࣒ԼЕܑĄֽڱၗ͞ё೩ֻЕܑĂГᇤᆷ OnGetPickList ְІ఍ந͞ ҖॡഇΐˢĄҰ˵ΞͽඕЪ׌჌͞ёĂАͽᐖેٺOnGetPickList ְІ ۞ ᄃ඀ёనࢍ͘Ίܝ10-24 ˢ ̮І̂̈Ą y ૟ AutoSize পّనࠎ TrueĂΞឰજ൪̮Іҋજᐌ AVI ̰ट۞͎̇҃አፋ ໚ડ߱۞ AVIĄྤٺཉٸResID ٕ ResName পّĂಶΞͽᇥ ĂГ޽ؠޢ̝ y ResHandle ࠎΒӣ AVI ྤफ़۞ሀ௡΃ቅĄనؠ ResHandle ˭Еߏજ൪̮І۞ొ̶পّ̬௜Ĉ ᑫ९ٕߏϡ RLE(run-length encoding)ᑅᒺ۞ AVI ᑫĄ ІΪਕϡд൑ᓏ۞ AVI ˯Ąֹϡ۞ᑫ९υืߏϏᑅᒺ۞ AVI̮טҭߏજ൪ଠ ඀ё)Ą˘߱ AVI ߏ˘Қ۞ဦԛ൪ࢬĂಶ׶࿪ᇆ˘ᇹĄᔵ൒ AVI Ξͽ੨ࢰĂ જ൪̮Іߏ࣎ෛ඄Ăົщᐖ۞ពϯ˘߱ AVI(VCL ᑕϡ඀ё)ٕ GIF(CLX ᑕϡ І̮טજ൪ଠ Canvas ˯ᘱ൪۞ซ˘ՎྤੈĂણዦௐ 12 ౢĂĶဦԛ̼඀ёనࢍໄኢķĄ дٺдᘱ൪͞๴۞ Canvas ˯ᘱ൪ĄιົᔖҺ൪΍ᘱ൪͞๴۞ᙝࠧγĄᙯ ڱΞͽϡְІ఍ந͞ܮ̰ϡ඀ёቅᘱ൪Ą˘όܑॾΐˢᘱ൪͞๴Ăᑕϡ඀ё ᘱ൪͞๴(TPaintBox)̮І೩ֻ˘჌͞ёĂឰᑕϡ඀ёΞͽд޽ؠ۞৏ԛડા ᘱ൪͞๴ ୆֎۞ቢ୧ă͞๴ٕ॰ߛĄ পֽّயϠ୆֎ᙝࠧĄࡶߏ՟ѣ఺ᇹ۞পّĂಶኛଋֹϡ TBevel ֽயϠޙ̰ Bevel ̮І(TBevel)ߏ჌Ӕன˯Ύٕ˭Ό۞ቢ୧Ąѣֱ̮Іည TPanel ̮Іѣ Bevel І۞׌̰࣎ӣপّٙՙؠĈColor ׶ StyleĄۏ జᘱ΍۞͞ёĂߏϤ Brushېԛ ᗞҒٕߏࢋ๱ˢᇹёĂኛֹϡ Brush পّĄ۞ېԼតᙝࠧᗞҒĄࡶࢋԼតԛ Ąϡ BorderColorېІ࿰ؠ۞ԛ̮טќֹϡ۰ᏮˢĄͽ Shape পّనؠ shape ଠ ෛ඄۞̮ІĂ̙ਕତܧĄιߏېShape ̮І(TShape)ົдܑॾ˯ពϯೀңԛ Shape Іᙷݭ 10-25̮טଠ ᄃ׎΁જүТՎॡপҾѣϡĂּтឰ൪ࢬᄃࡦഀࢰሄТՎඈඈĄٸ൪ࢬᇥ ൪॰۞̷ೱજүĄ఺дҰຐࢋטy Timers পّΞឰҰ೩ֻ timer ̮Іֽଠ ࢦᖬѨᇴĄ۞ٸજ൪ᇥטপّΞଠ ĄRepetitionsٸy నؠ Active পّࠎ True ٕ False ֽୁજ̈́ઃͤ AVI ۞ᇥ Shell32.dll ೩ֻ۞૱ϡ AVI જ൪Ą ٸy ޽ؠ CommonAVI Ξᇥ AVI ฟؕ̈́ඕՁ۞൪॰በཱིĄ ٸy StartFrame ̈́ StopFrame পّ޽ؠᇥ 10-26 ˢܝᄃ඀ёనࢍ͘Ί ͽ ModelMaker నࢍᙷҾ̮̈́І 11-1 ਕ۞পঅበᏭጡĄ y ૞ϡϡֽ࣒Լ඀ёಏ̮ăᙷҾăUML ဦăࣧؕቅ၁үăͽ̈́׎΁నࢍΑ ӄଋՀѣड़தгෛᛇ̼Ӕனଋ۞నࢍĄ םy ௚˘ሀ๬ᄬ֏(Unified Modeling LanguageĂUML)ဦϯ۞யϠጡĂਕ Шࠎ̝Ą y ሀݭ๗ˢᄃ๗΍̍׍Ăਕ૟ࣧؕቅᖼೱјࠎ ModelMaker ሀݭĂٕߏͅ y ͹જ۞ሀ๬͔ᑜĂਕᐼхăჯ᜕ᙷҾᄃ׎јࣶ̝ม۞ᙯܼĄ ModelMaker ۞̍׍Β߁Ĉ ౵̈Ąזӄଋ૟ᙷҾᄃ̬ࢬฟ൴࿅඀̚౵೗ˠ۞˘ࢬගࢫםֽ ModelMaker ତᇤᆷ඀ёቅ۞͞ёĂଋΞͽֹϡۡـͽٺІјࣶͽ̈́ᙯܼ۞ؠཌྷĄ̙Тۏ дଋڦĄModelMaker ឰଋΞͽ૟͕˧૞ٽࢬăͽ̈́඀ёಏ̮۞ฟ൴Հΐट ModelMaker ߏ࣎࿪ཝᅃӄహវ̍඀(CASE)̍׍ĂιజనࢍϡֽឰᙷҾă̬ ᙷҾ̮̈́І ͽ ModelMaker నࢍ ᄃ඀ёనࢍ͘Ίܝ11-2 ˢ ୁજ ModelMakerĄ ModelMaker|Run ModelMakerĄଋ˵Ξͽֹϡ Windows ۞ฟؕΑਕֽܑ פIDE ̝γ۞ᑕϡ඀ёĄࡶຐેҖ ModelMakerĂኛଋᏴ ٺߏ࣎፾ϲ IDE ۞ ModelMaker Αਕܑ̚Ăҭι̪൒ זᔵ൒ ModelMaker ̏གྷజፋЪ ລ੨ IDE ֹϡ ModelMaker ሀݭᄃሀݭᑫ۞ซ˘ՎྤੈĂኛଋણ҂ ModelMaker User’s GuideĄٺᙯ ඀Ԕ̚Ąט ώଠۍಶߏࢋ૟ଋ۞ሀݭᑫะЪᄃଋ۞඀ёಏ̮ᑫĂΐˢଋ۞ᐼхಞٙͽ̈́ ࢦࢋĂ˵ޝො ЯࠎሀݭΒӣ˘ֱ̙дಏ̮඀ёቅ྆۞পѣྤੈĂٙͽѣ˘Іְ ؕቅಏ̮ĄሀݭкΗ̙ົΒӣፋ࣎૞९ٕइІĂ҃ΪΒӣ׎̚۞˘ొЊĄ ̮ᑫ۞γొྤੈ(ּт UML ဦϯྤफ़)ĄТᇹ۞ĂሀݭਕૉგநЇຍᇴϫ۞ࣧ ሀݭ̙ಏΪߏࣧؕቅ۞ᑅᒺԛёĄιࣇТॡΒӣ˘ֱ̙ᐼхдٙயϠ඀ёಏ इІĄ ϡ۰۞׻΄ĄଋົֹϡιٙயϠ΍ֽ۞ࣧؕቅֽฟ൴ᑕϡ඀ёᄃֹٺٕߏૄ ሀݭĄModelMaker ົؠഇг૟׎ሀݭᖼೱјࠎࣧؕቅůѣΞਕߏҋજ۞Ă ሀݭĂֽซҖүຽĄ༊ଋд ModelMaker ̚఍ந૞९ॡĂଋٙፆү۞׎၁ߏ ࣧؕቅĄModelMaker ົӀϡιҋ̎۞ᑫ९Ă˵ಶߏٙᏜ۞ז̙֭ົۡତજ ᔵ൒ ModelMaker ౵௣ᔘߏਕૉயϠࣧؕቅĂҭߏд̂кᇴ۞үຽ༊̚Ăι ModelMaker ሀݭ ௚۞ IDE-based ૞९Ą็ז଀А˞ྋ ModelMaker ۞ྻү͞ёĂͽ̈́тңᙯా ຐՀѣड़த۞ֹϡιĂଋڍModelMaker ਕૉᖎ̼ࣧؕቅ۞யϠᄃჯ᜕Ąт ModelMaker ૄᖂ ᑫ(ᄃ Microsoft WinHelp ࠹ट)̝ฟ൴۞͛І̍׍Ąځy ਕૉᖎ̼ቢ˯ᄲ ͽ ModelMaker నࢍᙷҾ̮̈́І 11-3 Ξͽдଋ۞ሀݭ˯ֹϡٙѣ۞ ModelMaker ۞̍׍ĄܮĂଋޢ ҃Ω˘࣎(ଂνᙝᇴֽௐ̣࣎)݋ົֹϡϫ݈۞ሀݭĄдଋ๗ˢଋ۞ࣧؕቅ ଋሀݭ۞Ą׎̚۞ߙ࣎޷ตĞ左邊數來第二個ğົ૟ࣧؕᑫ๗ˢҌາ۞ሀݭĂ ϲ۞Ąд̍׍Е˯ѣ׌࣎޷ตߏ೩ֻଋ૟ࣧؕቅ๗ˢҌޙModelMaker ̝γ ϲሀݭĂ҃఺඀ёಏ̮ߏдޙଋՀ૱ົᅮࢋଂߊѣ۞඀ёಏֽ̮ дາሀݭ̚๗ˢࣧؕᑫ ϲາሀݭ ๗ˢࣧؕᑫޙ ဦ11.1 ModelMaker̍׍Е۞˘ొЊ ̍׍Е˯۞ New model ตĄ(New model ตߏ̍׍Е˯౵νᙝ۞޷ตĄ) ϲາ۞ሀݭĂኛᏴፄ File|New ٕ޷˭ ModelMakerޙຐڍܑಏͽγ)Ąт ቅĂ֤ᆃଋΞͽֹϡ ModelMaker ଂ˘࣎າ۞ሀݭฟؕనࢍଋ۞඀ё(ੵ˞ ϲ۞ߏБາ۞඀ёޙଋٙڍϲሀݭ۞͞ёĄтޙ̚ ѣк჌д ModelMaker ϲሀݭޙ ሀݭĄ Ăົࢦາ૟඀ёಏ̮๗ˢޢ఺ІְĂኛቁؠଋдԆјՀજזઇڱ՟ѣᏱڍт ModelMakerĂ̙҃ࢋֹϡ IDEĂͽቁܲሀݭ׶ࣧؕቅ̝มਕૉܲ޺ТՎĄ ٙயϠ۞ಏ̮඀ёቅĄ༊ሀݭхдॡĂ࣐ࡶଋᅮࢋซҖՀજĂኛֹϡ ҋજ۞ͅߍаሀݭĄଋٙઇ۞Հજд˭Ѩӈົజ໑ΝĄModelMaker ົՀາ ModelMaker ۞ሀݭᑫĄٙѣଋд IDE በᏭጡ̚၆ࣧؕᑫઇ۞ՀજĂౌ̙ົ Լតڱ༊ଋລ੨ IDE ֹϡ ModelMaker ॡĂኛ˼༱ҾԞ˞ĂIDE ൑ ۞඀ёనࢍ̍үĂΒ߁ܑಏ۞నࢍᄃેҖᑫ۞በᛌĄ ΃ IDEĄଋ̪൒ົᅮࢋ IDE ֽซҖధк૱֍פModelMaker ̙֭జనࢍϡֽ ΃ IDEĄҭߏĂפֽ ధкฟ൴ˠࣶౌઐрႽΞਕ۞ֹϡ ModelMaker ᄃ඀ёనࢍ͘Ίܝ11-4 ˢ Е˯۞޷ตĄଋ˵Ξͽֹϡ̍׍Е޷ตֽԼᑭෛ̮І۞ଵЕҶԊĄ ଋΞͽд Views Αਕܑ̚Ᏼፄ׎̚۞ีϫֽᏴፄপؠ۞ᑭෛ̮ІĂٕߏ̍׍ Difference ᑭෛ̮ІăDocumentation ᑭෛ̮Іăٕ Events ᑭෛ̮ІĄ Code EditorăDiagram EditorăMacros ᑭෛ̮ІăPatterns ᑭෛ̮ІăUnit Editors ඄ॾ(࿰నߏд౵Πᙝ۞඄ॾ)ਕૉពϯ Implementation EditorăUnit ពϯ Members ᑭෛ̮ІĄޠ˘(ІĄMembers ඄ॾ(࿰నߏдν˭֎۞඄ॾ ॾ)Ăਕૉពϯ Classes ᑭෛ̮ІăUnits ᑭෛ̮Іăٕߏ Diagrams ᑭෛ̮ ModelMaker ؕ௣ౌົܲ޺ˬ࣎඄ॾĄCollections ඄ॾ(࿰నߏдν˯֎۞඄ ඄ॾ Methods ඄ॾ Editors ඄ॾ Collections ဦ11.2 ពϯቑּሀݭ۞ModelMaker ᏭĄ˭ࢗ۞ဦͯӈࠎ ModelMaker ෛ඄۞ቑּĈ ModelMaker ෛ඄۞඄ॾ̚Ăιࣇਕૉᑒӄଋෛᛇ̼ଋ۞ሀݭ֭ͷΐͽበ ModelMaker ׍ѣధк۞ᑭෛ̮І(view) ͽ̈́በᏭጡĂౌΒӣд ϡ ModelMaker ۞ᑭෛ̮Іֹ ͽ ModelMaker నࢍᙷҾ̮̈́І 11-5 ဦ11.4 Unitsᑭෛ̮І Іă̬ࢬăͽְ̈́ІĄۏ̮Ąѩᑭෛ̮ІТᇹਕૉពϯՏ࣎ಏ̮ٙѣ۞ Units ᑭෛ̮І能以樹狀顯示結構或列示,來ពϯ૞९ٙ̚Βӣ۞඀ёಏ Units ᑭෛ̮І ଋ۞ሀݭ̚Ąזᑭෛ̮І૟ᙷҾᄃ̬ࢬΐ ଋΞͽ૟ลᆸගԶᝑ੓ֽĂᔳᖟଋ̙ٙຏᎸ኷۞̶͚Ąଋ˵Ξͽ౅࿅ Classes ιࣇ̝ม۞ลᆸᙯܼಶΞਕົ̙ԆፋĄޢІᄃ׎ͭ΃ౌ̙дሀݭ̚Ă൒ۏڍො т ဦ11.3 Classesᑭෛ̮І ΃Ă׎ဦϯߏͽ၁ቢ઻ҝĄֱ֤̙дሀݭ̚۞ᙷҾĂ׎ဦϯ݋ͽ෍ቢ઻ҝĄ ϫ݈ሀݭ̚۞ͭٺιТॡ˵ົពϯ΍ሀݭ̚ᙷҾᄃ̬ࢬ۞ҕ௚ᙯܼĄΒӣ Classes ᑭෛ̮ІົͽลᆸّܑЕ۞͞ёĂពϯଋሀݭٙ̚ѣ۞ᙷҾᄃ̬ࢬĄ Classes ᑭෛ̮І ཏ௡Ą ӣк࣎ᙷҾăಏ̮ăͽ̈́ဦϯĄCollections ඄ॾ݋ਕពϯ఺ֱีϫ۞ទᏭّ Collections ඄ॾពϯ ModekMaker ሀݭֹٙ̚ϡ۞ีϫะЪĄሀݭ఼૱Β Collections ඄ॾ ᄃ඀ёనࢍ͘Ίܝ11-6 ˢ ׎ዶ۞޷ตΞͽኑᗔٕӁੵߊѣ۞ဦϯĄ y ಏ̮࠹ֶဦ y Mind Map ဦ y ၁үဦ y ߿જဦ ၗဦې y y ᘦ׽ဦ(Robustness diagram) y ֹϡ۰९ּဦ y Ъүဦ y ೈԔဦ y ᙷҾဦ ϯĂΒ߁Ĉ ϲк჌̙Тᙷݭ۞ UML ဦޙଋΞͽֹϡ Diagrams ᑭෛ̮І̚۞޷ตֽ ϲဦϯĄޙ๱ˢ၁үĄଋ˵Ξͽ̙ያ UML ٕ ModelMaker ֽࠎٙనࢍ۞ᙷҾ Ξͽ editors ඄ॾ̚۞̍׍(ּт Implementation ᑭෛ̮І)ֽࠎଋ۞າᙷҾ ဦϯĂЯ҃Լតଋ۞ሀݭĂ౵௣˵ົԼតଋ۞ࣧؕቅĄдဦϯనࢍล߱Ăଋ ăͽְ̈́Іΐˢڱဦϯ఼૱జϡֽઇࠎᙷҾనࢍ۞̍׍ĄଋΞͽ૟পّă͞ ဦ11.5 Diagramsᑭෛ̮І editors ඄ॾ۞ Diagram Editor ֽ࣒Լ఺ֱဦϯĄ Diagrams ᑭෛ̮Іົពϯሀݭٙ̚ӣٙѣ UML ᙷݭဦϯĄଋΞͽֹϡ Diagrams ᑭෛ̮І टĂซҖಏ̮۞າᆧᄃ࣒ԼĂٕߏԼត඀ёቅயϠ۞ҖࠎĄ ඕၹ̝˯)ֽԼតᑭෛ̮І۞̰ېଋΞͽֹϡ Units ᑭෛ̮І̚۞޷ต(дፘ ͽ ModelMaker నࢍᙷҾ̮̈́І 11-7 ၆ሀݭౄј۞ԼតĄޢֽᑭෛߙ࣎ሀݭಏ̮ᑫдՀજ݈ ቅăUML ဦϯăλะăͽ̈́నࢍሀёซҖ࣒ԼĄଋ˵Ξͽֹϡ editors ඄ॾ ă၁үăಏ̮ࣧؕڱଋΞͽֹϡ Editors ඄ॾٙ̚Βӣ۞ᑭෛ̮ІĂֽ၆͞ Editors ඄ॾ ۞ݭҾֽᏴፄࢋдᑭෛ̮І̚ពϯֱ֤јࣶĄ ăͽְ̈́ІĄ׎ዶ۞޷ตឰଋֶፂΞෛّٕјࣶڱตֽΐˢ᛼Ҝăপّă͞ ᑭෛ̮І̚ΐͽពϯͽֻበᏭĄଋΞͽֹϡ Members ᑭෛ̮І̚۞ߙֱ޷ ଋΞͽֹϡ Members ᑭෛ̮ІֽԼតјࣶ۞ЩჍĂٕߏд Implementation ဦ11.6 Membersᑭෛ̮І ѣዋЪ۞በᏭጡĄ д֤׊ڍϫĂΞͽд editors ඄ॾ̚ពϯ఺ֱีϫ۞̰टůтีפ̮І̚Ᏼ ăְٕІ)Ąд Members ᑭෛڱᙷҾٕ̬ࢬ۞јࣶ(᛼Ҝăপّă̝͞פٙᏴ Members ඄ॾΒӣ Members ᑭෛ̮ІĄιົពϯд Class ᑭෛ̮І྆ϫ݈ Members ඄ॾ ̬ࢬҋଋ۞ሀݭٕଋሀݭٙயϠ΍ֽ۞ࣧؕቅ̚ӁΝĄ ϲဦϯĄТᇹ۞ĂӁੵဦϯ̙֭ົ૟ᙷҾٕޙҾ۞ဦϯυ൒хдćଋ଀ҋҖ ඾ྍᙷקො ᙷҾᄃဦϯд ModelMaker ሀݭ̚ߏ̙Т۞࣎វĄᙷҾхд̙֭ຍ ᄃ඀ёనࢍ͘Ίܝ11-8 ˢ ᑫซҖՀજĄۍயϠಏ̮۞ࣧؕቅᑫĄኛֹϡ Unit Code Editor ֽ၆ᇹֽ ۍĄModelMaker ົؠഇ۞ֹϡᇹۍUnit Code Editor გந඾ፋ࣎ಏ̮۞ᇹ Unit Code Editor ࣧؕቅĄڱĂ֭ͷΞͽᑭෛ౵௣۞͞ڱ۞ᑭෛ̮Іਕૉពϯડાតᇴă͞ ώ֗۞ࣧؕቅĄιٙ೩ֻڱăͽ̈́በᏭ͞ڱϠ۞͛І̚ăΐˢડાតᇴٕ͞ ࢬă૟ಏҖ۞ೡࢗΐҌٙய̬۞ڱImplementation Editor Ξͽᑒӄଋ࣒Լ͞ ဦ11.7 Implementation Editorᑭෛ̮І ֱ၁үົ΍னдٙயϠ۞ࣧؕቅ̚Ą Ξͽֹϡ Implementation Editor ૟ଋ۞၁үᆷҌଋ۞ሀݭ̚Ą఺ܮĂଋޢ ΐҌଋ۞ᙷҾᄃ̬ࢬڱቅĄдଋֹϡ Members ᑭෛ̮Іٕ UML ဦϯĂ૟͞ ࣧؕڱImplementation Editor ឰଋ̙υ౅࿅ IDE ӈΞበᏭଋሀݭ̚۞͞ Implementation Editor ͽ ModelMaker నࢍᙷҾ̮̈́І 11-9 ModelMaker ۞ሀݭĄଋ౅࿅ဦϯٙઇ۞ሀݭԼតĂౌົͅߍаଋ۞ࣧؕቅĄ ΐˢ UML ဦϯĂͽᕖᆧଋ(ڱᛇ̼۞ԼតĄଋ˵Ξͽ૟Αਕ(ּтপّᄃ͞ Ϡ΍ֽ۞ UML ဦϯĄι೩ֻ˞˘௡ᖳಱ۞̍׍ֽ၆ଋ۞ UML ဦϯซҖෛ Diagram Editor జϡֽ࣒Լд collections ඄ॾ̝̚ Diagrams ᑭෛ̮Іٙய Diagram Editor ĄڱᙷҾ͞ ܧᇾចҖĂּтಏ̮۞ uses ̄ήĂͽ̈́ܧΞͽд Unit Code Editor ̚በᏭ જ۞ΐͽວજ)Ąଋ̙ދEditor ̙̚ਕᕘใ఺ֱᇾចҖ(ᔵ൒Ξͽдᑫ९ࣧ̚ ᑫ̚ߏϤͽ MMWIN ࠎࢵ۞ᇾច(tag)Җܑٙϯ۞Ąд Unit Codeۍ̰टдᇹ ಏ̮ᑫ۞ధкΑਕĂּтᙷҾ၁үĂౌϤ࣎Ҿ۞በᏭጡֽΐͽგநĄѩᙷ۞ ဦ11.8 Unit Code Editor ᄃ඀ёనࢍ͘Ίܝ11-10 ˢ ఺ֱበᏭጡᑭෛ̮ІĂModelMaker User’s Guide ̚೩ֻ˞Հஎˢ۞ྤੈĄٺᙯ y Event ᑭෛ̮ІĈଋΞͽֹϡιֽგநଋ૞९̚۞ְІĄ ͛ІĄځ̈́ᙷҾјࣶᇤᆷᄲ y Documentation ᑭෛ̮ІĈଋΞͽֹϡιֽࠎଋሀݭ۞ಏ̮ăᙷҾăͽ ᄃᐼх˭ֽ۞ಏ̮ᑫ)˭ಏ̮ᑫ̝ม۞मளĄ y Unit Difference ᑭෛ̮ІĈឰଋ੃ᐂ̙Тࣧؕቅ(Β߁ ModelMaker ሀݭ ཌྷ඀ёቅ̮৵Ą y Patterns ᑭෛ̮ІĈឰଋ଀ͽֹϡ ModelMakers ۞నࢍሀё̍׍Ăֽؠ y Macros ᑭෛ̮ІĈਕૉᑒӄଋგநăፆү ModelMaker ۞λะĄ ModelMaker ᔘѣೀ࣎׎΁۞በᏭጡᑭෛ̮ІĂΒ߁Ĉ ׎΁۞በᏭጡ GuideĄ ModelMaker ֹ̚ϡ UML ဦϯ۞ซ˘ՎྤੈĂኛଋણ҂ ModelMaker User’s дٺModelMaker ဦϯΞͽ๗΍јࠎᇆညٕ XML/XMI ̝ᙷ۞ॾёĄᙯ ဦ11.9 Diagram Editor ͽ ModelMaker నࢍᙷҾ̮̈́І 11-11 ఺ֱ͛І۞ҜཉĄזӄଋԱםኛણ҂யݡ۞ readme ᑫֽ ᑫځy ModelMaker’s ᄲ y ModelMaker User Manual ଀Հซ˘Վ۞ྤੈĂኛଋણ҂˭ࢗ۞͛ІĈפຐ ModelMakerĂࡶ ٺώౢ̙֭ზઇࠎ˘ЊԆፋ۞ ModelMaker ણ҂͛ІĄᙯ ซ˘Վ۞ྤੈ 11-12 ˢܝᄃ඀ёనࢍ͘Ί ఍நဦԛᄃкಫវ 12-1 ఍நĂ̙ኢιߏᘱдᏈ၌Ăֽڱ۞˘̷௟༼Ăٙͽଋ۞඀ёΞͽֹϡ࠹Т۞͞ ѣड़۞఍நྤ໚Ă҃ͷιົ఍ந྅ཉ̰टޝІ˘࣎͹ࢋр఍ߏĂιਕۏ൪ο ІĄۏІ۞˘࣎পّĂ҃ͷιώ֗˵ߏ˘࣎ۏІ˯Ą൪οߏۏ̙ߏۡତᘱᄦд І۞൪ο(canvas)̝˯⎯҃ۏࢋд Delphi ᑕϡ඀ё̚ᘱᄦဦԛĂଋ଀ᘱᄦд гΐˢဦԛĄ!ٽ πέ۞૞९ฟ൴̚ĂՀᅅྭٺ྅˞ Qt ဦԛෛ඄̍׍ะ(widget)Ăιֹ଀ଋΞ ދQGraphics ̚۞ CLX ဦԛ̮ІĂ݋ ٺĄ҃ؠཌྷٽё۞જүĂត଀Ȉ̶ट ۞ဦԛన౯̬ࢬ(Graphics Device InterfaceĂGDI)Ăֹ଀૟ဦԛΐҌᑕϡ඀ ྅˞ WindowsދGraphics ಏ̮̚ဦԛ̮ІĂ ٺд VCL ᑕϡ඀ё̚Ăؠཌྷ ဦԛ̝඀ёనࢍ۞ໄ៍ ᓏࢰ̈́ᇆညĄٸĂଋΞͽֹϡপঅ۞̮Іֽᇫ˯טдкಫវ۞፟ ϲဦԛĂٕ۰дેҖॡજၗгᘱᄦဦԛĄޙֽีטͯĂдనࢍॡֹϡဦԛଠ ଋ۞ᑕϡ඀ё̚ĄଋΞͽдనࢍॡഇ೧ˢ࿰Аᘱᄦр۞ဦٺ૟఺ֱΑਕཉ ΞͽڱଋΞͽдᑕϡ඀ё྆ΐˢဦԛͽ̈́၆кಫវ۞͚೯Ąѣధк̙Т۞͞ ఍நဦԛᄃкಫវ ᄃ඀ёనࢍ͘Ίܝ12-2 ˢ үĄ! тңдаᑕ׎΁ְІॡĂેҖ࠹Т۞ᘱဦજځࢬ۞ౢ༼ᄲޢְІॡેҖ۞Ą дώౢฟؕ۞ּ̄Ăࠎଋϯቑтңᘱ΍̙Т۞ဦԛĂҭιࣇߏдаᑕ OnPaint ̰टĄ ൪΍׎ֽڱᖣϤᘱ΍ಏ˘۞ဦԛ۞͞ีטଠېι۞̰टĄΩ˘͞ࢬĂԛ Гд̰ొᘱ΍ధк͛фĂֽ൪΍ޢ˘࣎በᏭ͞๴ᖣϤᘱ΍˘࣎৏ԛĂ൒ І఼૱ົᘱ΍ೀ࣎ဦԛĄּтĂۏ˵ಶߏᄲĂдаᑕ OnPaint ְІॡĂ І۞ፋ࣎γ៍Ą൪ဦ఼૱ົֹϡᘱဦજүĄ఺ۏϲޙy ൪ဦ(Painting)Ăߏ ІĂтңд׎൪ο۞পؠҜཉ˯Ăᘱ΍ٙ޽ؠ۞ဦԛĄ ۏӘ෦ֽڱΨ൪ο۞ᘱဦ͞ײĄдଋ۞඀ё̚Ăଋົ౅࿅(ې୧ٕߏԛ ϲ˘࣎ಏ˘ăপؠ۞ဦԛ̮৵(ညߏቢޙy ᘱဦ(Drawing)Ăߏֹϡ඀ёֽ ᘱဦ(Drawing)׶൪ဦ(Painting)఺׌࣎ЩෟĄז༊ଋ఍நဦԛॡĂଋ఼૱ົ࿃ ि(၆ VCL ᑕϡ඀ё҃֏)ְٕІ(၆ CLX ᑕϡ඀ё҃֏)ॡ̖ົពϯ΍ֽĄ! ѣ፟ົ఍நι۞ OnPaint ੈีטĂ֤ᇆညΪѣдଠีט֭ԯι޽ؠගᇆညଠ ពϯĄೱήྖᄲĂ༊ଋᘱᄦᕇੱဦົ̖ޢ൪ο۞ีטଠזଋԯᇆညኑᄦזۡ ߏ൪д̙ߏᏈ၌˯۞ᇆညĂညߏ TBitmap ۞൪οĂ֤ᇆညಶ̙ົពϯ΍ֽĂ ଋڍІಶົϲӈពϯ΍ֽĄ൒҃Ăтۏ൪ο˯Ă֤ဦԛ۞ีטଠזତԯι൪ ଋߏۡڍᇆည΍னдᑕϡ඀ё̚۞͞ёĂߏॲፂιࣇ۞ᘱᄦ͞ё҃ؠ۞Ąт ёĄבΞͽֹϡҲล۞ Qt ᘱဦ඀ёऱܮᇾĂଋ І۞޽ᇾĄۡତֹϡ఺࣎޽ۏ൪ο۞ Handle পّĂಶߏ˘࣎޽Ш Qt ൪ဦጡ ྅გநࣶĄދд CLX ᑕϡ඀ё̚ĂTCanvas ߏ Qt ൪ဦጡ(painter)۞˘࣎ྤ໚ handleĄ ёĄ൪ο۞ Handle পّಶߏ྅ཉ̰ट۞ב ο˯ֹϡٙѣ۞ Windows GDI ྅გநࣶĂٙͽଋ˵Ξͽд൪ދො Яࠎ TCanvas ߏ Windows ྅ཉ̰ट۞ྤ໚ ᙯ۞̍үĄ ˯Ą൪οΪѣдેҖॡഇ̖ਕֹϡĂٙͽଋυืᇤᆷ඀ёቅֽ఍நᄃ൪οѣ Оܑٕ፟ߏᕇੱဦٕߏ̬̚ᑫ(metafilesĂд CLX ̚݋ߏᘱᄦဦůdrawing* ఍நဦԛᄃкಫវ 12-3 ༊ιֹٙϡ۞ડાតј̙ϒቁॡ̖ਕࢦາ൪΍׎ᇆည۞̰टĄ! OnPaint ְІ఍ந඀Ԕ̚Ă఺ᇹՏѨ זٕ൪ဦĂ֤ଋಶ଀૟Тᇹ۞඀ёቅΐ ၹ̮ેҖᘱဦޙ۞ ଋд TPaintBoxڍᇹĂΒ߁ܑॾώ֗˵ߏтѩĄЯѩĂт ߏ఺ౌีטҘౌߏᇶॡّ۞Ą̂ొЊ۞ଠڌ۞˯Їң൪д TPaintBox ൪ο Ꮘ၌྅ཉ(VCL)ٕ painter(CLX)ĂЯѩזͅ۞ĂTPaintBox ۞൪οߏۡତ၆ᑕ ˳ّ۞ᇆညĄЯѩĂଋ̙֭ᅮࢋઇЇңજүĂͽࢦາពϯٙΒӣ۞ᇆညĄ࠹ ဦԛ̮І˯Ąд TImage ˯ᘱဦົயϠϖٺّĂֽቁܲဦԛົజԆፋгពϯ ІĄଋ˵Ξͽనؠ Proportional পۏٕߏ׎΁ࢋ೩ֻග TImage ពϯ۞ဦԛ үĂົజҋજ఍நଫĄ׎ Picture পّĂ޽ؠ۞˜ߏ၁ᅫ۞ᕇੱဦăᘱᄦဦă Ă֤ᆃ൪΍׶ࢦາពϯд TImage ̚ဦԛ۞̍ีטଋֹϡ˞ TImage ଠڍт ĄځĂኛଋણዦ Windows ۞ቢ˯ᄲځWM_PAINT ۞ซ˘Վᄲ ٺЊĄᙯ дι۞̰टࢦາజពϯ΍ֽॡĂυืҋ̎ࢦາᘱᄦ̏εड़۞ొีטܑॾٕଠ Ѣෛ඄ॡĂٳᇶॡតјሀቘ̙୻ॡĂּтдีטౌߏϖ˳۞Ą༊ܑॾٕߏଠ Ҙڌ۞˯Windows ̙֭ົ఺ᇹઇĄд Windows үຽր௚̚ĂЇң൪дᏈ၌ ᔵ൒ѣֱүຽր௚ົҋજгᘱᄦ̏གྷεड़̝ෛ඄ߙ˘ొЊડાĂ൒҃ ॡĂ൪˯ܑॾ۞ࡦഀဦԛĄ! ࢦາពϯဦԛĂٕ۰дֹϡ VCLܮΨ Refresh ͽײOnResize ְІ఍ந඀Ԕ̚ ࢦາពϯ̮ІܑٕॾĄּтĂଋΞਕࢋдܑॾ۞ֽڱ͞ ຐֹϡ Refresh OnPaint ְІ఍ந඀ԔĂ׎࿰నЩჍࠎ FormPaintĄдߙ࣎ॡมᕇ˯ĂଋΞਕ Іٙᇤᆷ۞ OnPaint ְІ఍ந඀ԔĄдܑॾ̚࿰న۞ۏΨଋࠎྍײົܮॡĂ ڱ͞ Іᇤᆷ˞ OnPaint ְІ఍ந඀ԔĂ֤ᆃ༊ଋֹϡ Refreshۏଋࠎྍڍт OnPaint ְІĄ)Ą זOnPaint ְІ(д CLX ᑕϡ඀ё̚ĂCLX ົ૟ѩְІᖼ ٙͽд Windows ˯ົயϠ WM_PAINT ੈिĂ VCL ົ૟ѩੈि็ᅍҌ Іᅮࢦາពϯι۞γ៍Ąۏֱ֤۞˯дߙ˘࣎ॡᕇĂүຽր௚ົҿᕝдᏈ၌ ࢦາពϯᏈ၌ ᄃ඀ёనࢍ͘Ίܝ12-4 ˢ ֽ޽ؠф۞фݭĂᗞҒĂ̂̈׶ᇹёĄ І۞পۏFont(фݭ) ޽ؠдဦԛ˯ᆷˢ͛фॡٙࢋֹϡ۞фݭĄనؠTFont ځপّ ᄲ ܑ12.2 ൪ο̮І۞В఼ّপّ TCanvas ̮ІĄ ۞̚ځᄲ Ăኛણዦдቢ˯ڱІٙВТֹϡ۞পّĄԆፋ۞পّ׶͞ۏЕ΍൪ο 12.2 ܑ ڱ൪ο۞В఼ّপّ׶͞ ՀࢦࢋॡಶΞͽֹϡ̬̚ᑫٕᘱᄦᑫĄޘҖిેͧ ޘಶ̙ͧ˯ᕇੱဦ˞Ąдᑕϡҋтٕߏჟቁޘ̬̚ᑫٕᘱᄦᑫ۞൪ဦి ྅ཉ̝˯ĂּтОܑ፟Ą൒҃Ă۞ޘژࢋՀ͌۞੃ጸវĂপҾߏд੼ྋ Լត׎ּͧĂ̙҃ົεΝ׎ᇆည۞௟༼ĂТॡ఼૱ͧᕇੱဦᅮٽटޝߏ ̙҃ߏӣѣᇆည۞၁ᅫᕇੱဦ৵Ą̬̚ᑫ(metafile)ٕᘱᄦᑫ(drawing) ၹᇆညٙᅮࢋ۞જүĂޙ჌পѣॾё۞ᑫ९Ăᖣͽ੃ᐂϡֽ˘ٸϡֽх CLX)ٺϡ Drawing(Ϊ VCL)ٺϡ Metafile(Ϊ Icon ΃ܑଂiconᑫ(::ICOᑫ)ٙྶˢ۞ྤफ़Ą І۞ॾёĄۏౕગ෭ᘨćგந׶఍நдગ෭ᘨ̝̚ फ़Ăͽ̈́ฟୁ׶ᙯྤפ଀ăᕜפֹϡગ෭ᘨĂଋΞͽॲፂዋ༊۞ॾёֽ ཉЇңଂ׎΁ᑕϡ඀ёગ˭ăኑᄦăٕ෭˯۞͛фٕဦԛĄٸClipboard ΃ܑϡֽ ԣ۞ĂЯࠎΪࢋኑᄦ׎఍ந޽ᇾ(handle)ӈΞĂ̙҃ᅮኑᄦፋ࣎ᇆညĄޝߏ ϲᕇੱဦ۞ኑώ఺࣎જүĂޙдჃჄ̚۞ᑫ९Ąٸͽ̈́ԯᇆညតјΞᐼ ϲă఍ந(ּͧăଡજă୊ᖼă׶൪΍)ĂޙІĂΞϡֽۏѣϡ۞ဦԛޝBitmap ˘࣎ ពϯᇆညĄ̚ีטĄֹϡ఺ֽ࣎఍நЇຍ۞ᑫ९Ăညߏдᇆညଠڱ Picture ϡֽᐼхဦԛᇆညĄࢋΐˢᗝγ۞ဦԛॾёĂֹϡPicture۞Register͞ ځপّ ᄲ І۞჌ᙷۏܑ12.1 ဦԛ ˢ׶ᐼхဦԛᑫ९ķ˘༼̚ΐͽྋᄲĄ Ă݋д12-22ࢱ۞Ķྶڱဦԛᑫྶˢăᐼх۞͞ٺІķ˘༼Ą҃ᙯۏ൪΍ဦԛ ֽڱ͞۞ 11ࢱ۞Ķֹϡ Canvas-12ٺࠎଋྋᄲڱĂ఺ֱ͞ڱ൪ο˯൪ဦ۞͞ Іౌ׍ѣΞϡͽдۏІĄ఺ֱۏ̮І඀ёऱ೩ֻ˞дܑ 12.1 ٙ̚Е΍۞ဦԛ І۞჌ᙷۏဦԛ ఍நဦԛᄃкಫវ 12-5 ᕇ׶ௐ˘࣎ᕇมᘱ΍˘୧ቢֽԆјፋ࣎ဦԛĄ˘ޢ౵ Polygon д൪ο˯ᘱ΍၁͕۞кᙝԛĂҚ੓ٙ็ˢ۞Ч࣎ᕇĂ֭౅Ϥд ๪ԛဦĄ Pie д൪ο˯ᘱ΍Ϥ(X1, Y1)׶(X2, Y2)̝৏ԛٙؠ΍ፚ๪ԛડા۞ X, Y)఺ᕇ˯Ą)זMoveTo ԯϫ݈۞ᘱᄦҜཉொ ϤX׶Yٙ޽ؠ۞ᕇᘱ΍˘୧ቢĄזLineTo ଂPenPos ડા(clipping region)ĄפGetClipRegion а็˘޽ᇾĂ޽Шϫ݈ٙన۞ગ ᘱᄦᙝ॰ֽᘱ΍৏ԛĄהFrameRect ֹϡ൪ο۞ඊ д൪ο˯๱႕ٙ޽ؠ۞ડાĄהVCL) ֹϡϫ݈۞ඊٺFloodFill(Ϊϡ д൪ο˯๱႕ٙ޽ؠ۞৏ԛĄהFillRect ֹϡϫ݈۞ඊ ፚ๪ԛĄ۞טEllipse д൪ο˯ᘱ΍Ϥ৏ԛٙࢨ ІĄۏDraw д൪ο۞ळᇾ(X, Y)˯ᘱ΍ϤGraphicણᇴٙ޽ؠ۞ဦԛ Ω˘࣎൪ο˯ĄזCopyRect ԯဦԛ۞˘ొЊଂ˘࣎൪οኑᄦ ĄېԛౕދChord ᘱᄦ˘࣎Ϥۡቢ׶ፚ๪ٙϹะ҃΍۞ ԛĄ ᘱᄦؾֽޘ඾ፚ๪۞׹ಛ޷পؠ۞֎ڻArc дဦԛ˯ᘱᄦؾԛĂι ځপّ ᄲ ܑ12.3 ൪ο̮І۞В఼ّপّ Ĉڱܑ 12.3 Е΍ଋΞͽֹϡ۞ೀ࣎͞ ᄲĄ І۞পّķ˘͛̚ĂѣՀྎ௟۞ྋۏ ఺ֱপّд12-6ࢱ̚۞Ķֹϡ Canvas PenPos(ඊ۞Ҝཉ) ޽ؠ൪ඊϫ݈ࢋᘱᄦ۞ҜཉĄ ă׶ሀёĄޘІ۞পֽّ޽ؠ൪ඊ۞ᗞҒăᇹёăᆵ ۏPen(൪ඊ) ޽ؠ൪οдᘱᄦቢ୧׶γ॰ቢॡٙࢋֹϡ۞൪ඊĄనؠTPen ׶ᇹёٕߏᕇੱဦĄ І۞পֽّ޽ؠд๱ˢ൪ο̝۩มॡֹٙϡ۞ᗞҒۏؠTBrush ဦԛ׶ࡦഀٙࢋֹϡ۞ᗞҒ׶ဦᇹĄన̝ېՙؠ൪οдဦ႕ԛ (הBrush(ඊ ځপّ ᄲ ᄃ඀ёనࢍ͘Ίܝ12-6 ˢ ൪ඊώ֗׍ѣα࣎ଋΞͽՀԼ۞পّĈColorĂWidthĂStyleĂ׶ ModeĄ! ൪΍˘୧ۡቢĂ׎၁ΪߏՀԼд׌࣎ᕇม̝˘௡ဦ৵Ą! γ॰۞ቢ୧Ą̝ې඾ቢ୧΍ன۞͞ёĂΒ߁ϡֽ൪΍ԛט൪ο۞ Pen পّଠ ֹϡ൪ඊ ׶నؠဦܑפy ᝝ הy ֹϡඊ y ֹϡ൪ඊ ځώౢ༼ᄲ ϡֽᆷ΍͛ф̝фݭĂͽ̈́ϡֽ΃ܑᇆည̝ဦ৵ੱЕ۞পّĄ! ĂהІĂଋΞͽనؠϡֽ൪΍ቢ୧̝൪ඊĂϡֽ๱ˢဦԛ۞ඊۏ ֹϡ Canvas І۞পّۏ ֹϡ Canvas г̬௜Ą! Іķ˘༼̚ྎ௟ۏ൪΍ဦԛֽڱ͞۞ ૟д12-11ࢱ۞Ķֹϡ Canvasڱ఺ֱ͞ ֽĄ TextRect дࢨؠ۞ડા̰ᆷ΍фҚćдડા̝γ۞ЇңфҚ̙ົពϯ΍ фҚ۞ԍბĄ TextOut д൪ο˯ᆷ΍фҚĂͽᕇ( X, Y)ࠎ੓ᕇĂତ඾ԯPenPosՀາࠎ ̝ม۞ม෼Ą ΒӣдቢᄃቢޘĄ੼ޘ׶ᆵޘ̶Ҿа็фҚֹٙϡ̝фݭ۞੼ TextWidth TextHeight, ՀԼι۞̂̈׶ͧதͽዋЪٙ޽ؠ۞৏ԛĄ StretchDraw д൪ο˯ᘱ΍ဦԛрឰဦԛዋЪٙ޽ؠ۞৏ԛĄဦԛΞਕᅮࢋ RoundRect д൪ο˯ᘱ΍˘৏ԛĂТॡ૲ѣα࣎๪֎Ą ๱ˢဦԛĄֽהԛĄֹϡPen׶Rectangleᘱ΍৏ԛĂֹϡඊ Rectangle ֹϡͽᕇ(X1, Y1)ࠎν˯֎ͽ̈́(X2, Y2)ࠎΠ˭֎൪΍˘࣎৏ PolyLine ֹϡϫ݈۞൪ඊд൪ο˯ᘱ΍۩͕۞кᙝԛĄ ځপّ ᄲ ఍நဦԛᄃкಫវ 12-7 Ăኛଋనؠ൪ඊ۞ Width পّࣃĄ!ޘࡶຐՀԼ൪ඊ۞ᆵ ඊ۞ Style পّ̝నؠࣃĄ! ൪΍၁ቢĂ̙҃ົநົ൪ົܮ ॡĂ֤ᆃ Windows 1 ٺ̂ޘො ༊ଋֹٙϡ۞ᆵ ĂಏҜߏဦ৵Ąޘՙؠ˞ٙ൪΍̝ቢ୧۞ݓޘ൪ඊ۞ᆵ ޘՀԼ൪ඊ۞ᆵ end; Canvas.Pen.Color := PenColor.ForegroundColor; begin procedure TForm1.PenColorClick(Sender: TObject); OnClick ְІॡՀԼ൪ඊ۞ᗞҒĈ! າ۞ᗞҒĂ఺߱඀ёቅົдаᑕפЯࠎֹϡ۰ߏᖣϤд͞ॾ˯޷˘˭ֽᏴ ᗞҒপّ۞Ą۞הඊٺҋפม۞۩ᅩĄࡦഀᗞҒߏ ͞ॾΞͽజϡֽనؠ݈ഀᄃࡦഀ۞ᗞҒĂ఺ֱᗞҒߏజϡֽೡᘱдቢᄃቢ̝ ൪ඊ۞̍׍Е˯ĄᗞҒٺ൪ඊ۞າᗞҒĂኛ૟ᗞҒ͞ॾཉפࡶຐឰֹϡ۰Ᏼ ҒĂኛనؠ൪ඊ۞ Color পّࣃĄ ᙝ॰۞ቢ୧Ăͽ̈́׎΁۞ቢ୧׶кᙝԛ(polylines)ĄࡶຐՀԼ൪ඊ۞ᗞ̝ې ˘ᇹĄ൪ඊ۞ᗞҒĂՙؠ˞൪ඊд൪΍ቢ୧ॡ۞ቢ୧ᗞҒĂΒ߁ϡֽ൪΍ԛ тТՀԼ Color পّͽγ۞׎΁۞পّܮдેҖॡଋΞͽՀԼ൪ඊ۞ᗞҒĂ ՀԼ൪ඊ۞ᗞҒ ଋΞͽֹϡ TPenRecall ֽԣిгᐼх൪ඊ۞পّĂ֭ΐͽаೇĄ ҘĄ!ڌ۞˯҃ົᖬᆷЇң̏д൪ο̝ ࠎ 1 ࣎ဦ৵Ă၁͕۞ᇹёĂሀёࠎĶኑᄦķĂЯޘ˘࣎൪ඊฟؕॡߏโҒĂᆵ Ą޷໰࿰నࣃĂՏڱ఺ֱপّ۞నؠࣃՙؠ˞൪ඊՀԼдቢ୧̝̚ဦ৵۞͞ y Mode পّĈՀԼ൪ඊ۞ሀё y Style পّĈՀԼ൪ඊ۞ᇹё ޘy Width পّĈՀԼ൪ඊ۞ᆵ y Color পّĈՀԼ൪ඊ۞ᗞҒ ᄃ඀ёనࢍ͘Ίܝ12-8 ˢ else if Sender = ClearPen then Style := psClear; else if Sender = DashDotDotPen then Style := psDashDotDot else if Sender = DashDotPen then Style := psDashDot else if Sender = DotPen then Style := psDot else if Sender = DashPen then Style := psDash if Sender = SolidPen then Style := psSolid begin with Canvas.Pen do begin procedure TForm1.SetPenStyle(Sender: TObject); ĈีטSender ӈࠎਖ਼΍ᕇᏴְІ۞ଠ 2 дᕇᏴְІ۞ְІ఍ந඀Ԕ̚ॲፂ Sender ۞ࣃֽనؠ൪ඊ۞ᇹёĂ ࣎޷ต۞ OnClick ְІ˯Ą̱זιତా ૟ޢፋЪฟ൴ᒖဩົயϠ˘࣎Щࠎ SetPenStyle ۞ᕇᏴְІ఍ந඀ԔĂ൒ ІĂ֭дְІ఍ந඀Ԕ᛼̚Ꮾˢ SetPenStyleĄ Object Inspector | Events | OnClick ְ פ࣎൪ඊᇹё޷ต֭Ᏼ̱פ1 Ᏼ ˘੓Вϡ۞Ă֤ᆃኛଋ޷໰˭ЕՎូซҖĈ! ϲ˘࣎ᕇᏴְІ఍ந඀ԔĂͽֻд൪ඊ̍׍Е˯۞̱࣎൪ඊᇹё޷ตޙࡶຐ ଀ְІĂଋ଀ᑭߤ Sender ણᇴ̖ҖĄ!פีטߏ֤˘࣎ଠغז˯ࢋҿᕝ၁ᅫ Вϡ࠹ТְІ఍ந඀Ԕ۞౵ָቑּĄีטనؠ൪ඊ̝পّĂߏ˘࣎ឰ̙Тଠ ۞ᇹёࠎңĄ ည৵۞෍ቢٕᕇቢᇹёĂ֭ͷົԯٙѣՀ̂۞൪ඊតј၁͕ů̙ኢଋٙ޽ؠ ࣎˘ٺWindows ˯۞ CLX ᑕϡ඀ёֽᄲĂWindows ̙͚֭೯̂ ٺො ၆ొཌ ൪ඊ۞ Style পّ̯ధଋనؠ၁ቢă෍ቢăᕇቢඈඈᇹёĄ! ՀԼ൪ඊ۞ᇹё end; PenSize.Caption := IntToStr(PenWidth.Position); { ࠎ˞ᇾᗟԯιᖼјфҚ } { ޘ Canvas.Pen.Width := PenWidth.Position; { ۡତనؠ൪ඊ۞ᆵ begin procedure TForm1.PenWidthChange(Sender: TObject); Ą!ޘĂՏ༊ҜཉՀԼॡಶՀາ൪ඊ۞ᆵޘཉֽՙؠ൪ඊ۞ᆵ ԯྤੈа㌅ගֹϡ۰Ąኛଋֹϡଡજค۞ҜܮՀາдଡજคΠ઎۞ᇾចĂͽ ଡજคĂ҃ͷଋࢋ۞ޘ઄ؠଋд൪ඊ̝̍׍Е˯Ăѣ˘࣎ϡֽనؠ൪ඊ̝ᆵ ఍நဦԛᄃкಫវ 12-9 ଋΞͽֹϡ TPenRecall ֽԣిгᐼх൪ඊ۞পّ֭ΐͽаೇĄ ဦё۞ᇹёĄ ࣣฟؕ۞ᇹёౌߏϨҒĂ׍ѣ၁͕ᇹёĂ՟ѣᕇੱהనଐԛ̝˭ĂՏ˘࣎ඊ Ăٕߏ๱႕׎΁ડા۞͞ёĄд࿰ې఺ֱপّ۞నؠࣃĂՙؠ˞൪ο๱႕ԛ ᇹё۞הy Bitmap পّĈֹϡᕇੱဦઇࠎඊ ᇹё۞הy Style পّĈՀԼඊ y Color পّĈՀԼ๱ˢ۞ᗞҒ ׍ѣˬ࣎ଋΞͽፆү۞পّĈ!הඊ âѨՀԼ̂ณ࠹ా۞ဦ৵Ą!ڱߏͽপؠ۞͞ܮ๱႕ડાהાĄֹϡඊ ડొ̰۞ې඾ଋ๱႕ડાॡٙϡ۞͞ёůΒ߁ԛט൪ο۞ Brush পّĂଠ הֹϡඊ ቢ۞௣ᕇĄۡז൪ቢ୧˵ົԯϫ݈Ҝཉொֽڱ͞ ො ֹϡ LineTo Canvas.MoveTo(0, 0); ൪ο۞ν˯֎Ĉזԯ൪ඊҜཉொ ົܮ඀ёቅ۞˭غĄּтĂڱ͞ Ψ൪ο۞ MoveToײࡶࢋనؠ൪ඊҜཉĂኛ ׶͛фĂυื޽ؠٙѣᅮࢋ۞ळᇾĄ!ېԛٺ҃̏ć၆ ٙࢋ൪΍۞Ҝཉזдι۞ PenPos পّĄ൪ඊҜཉΪົᇆᜩٸοԯ൪ඊҜཉх ϫ݈۞ᘱဦҜཉ⎯ಶߏ൪ඊฟؕ൪΍׎˭˘୧ቢ۞Ҝཉ⎯Ⴭࠎ൪ඊҜཉĄ൪ ଀൪ඊ۞Ҝཉפ !Ąځ࿰నࣃኛણዦ TPen ۞ቢ˯ᄲٺͅ۞ᗞҒĂඈඈĄᙯ ֽᄲĂ൪ඊΞͽܲ޺ߏโҒĂٕߏ׶൪ο̝ࡦഀ࠹ͅ۞ᗞҒĂ׶൪ඊᗞҒ࠹ ൪ඊ۞ Mode পّĂឰଋΞͽ޽ؠԯ൪ඊᗞҒ׶൪οᗞҒඕЪ۞͞ёĄᓝּ ՀԼ൪ඊ۞ᇹё end; end; ᄃ඀ёనࢍ͘Ίܝ12-10 ˢ end; end; else if Sender = DiagCrossBrush then Style := bsDiagCross; else if Sender = CrossBrush then Style := bsCross else if Sender = BDiagonalBrush then Style := bsBDiagonal else if Sender = FDiagonalBrush then Style := bsFDiagonal else if Sender = VerticalBrush then Style := bsVertical else if Sender = HorizontalBrush then Style := bsHorizontal else if Sender = ClearBrsuh then Style := bsClear if Sender = SolidBrush then Style := bsSolid begin with Canvas.Brush do begin procedure TForm1.SetBrushStyle(Sender: TObject); Ԕ۞඀ёቅĈ ߏ఍ந඀˭غOnClickĂ֭ͷԯ OnClick ְІ఍ந඀Ԕ׻Щࠎ SetBrushStyleĄ Ăనؠ˞ Object Inspector | Events |˞פᇹёĄٙѣˣ࣎޷ตౌజᏴ۞ה ᇹё޷ต۞ᕇᏴְІ఍ந඀ԔĂֽనؠඊהдѩּ̚ĂᖣϤ˘௡ӣѣˣ࣎ඊ ٕߏ bsDiagCrossĄ! bsSolidĂbsClearĂbsHorizontalĂbsVerticalĂbsFDiagonalĂbsBDiagonalĂbsCrossĂ ᇹёĂኛଋ૟ Style পّనؠࠎ˭Еிк࿰నࣃ̚۞Ї˘࣎Ĉ۞הࡶຐՀԼඊ ᗞҒă՟ѣᗞҒăͽ̈́Ч჌ᗞҒ׶ဦᇹĄ ᇹёĂͽ̈́̏д൪ο˯̝ᗞҒ۞ඕЪ͞ёĄ࿰Аؠཌྷ۞ᇹёΒ߁၁͕۞הඊ ॡٙࢋֹϡ۞ဦᇹĄιឰଋΞͽ޽ؠېᇹёĂՙؠ˞൪οϡֽ๱ˢԛ۞הඊ ᇹё۞הՀԼඊ end; Canvas.Brush.Color := BrushColor.ForegroundColor; begin procedure TForm1.BrushColorClick(Sender: TObject); ׍Е۞ᗞҒ͞ॾᕇᏴॡࠎ̝)ણዦд12.7ࢱ۞ĶՀԼ൪ඊ۞ᗞҒķ*Ĉ!̍ ̝הᗞҒĂΞͽдаᑕඊ۞הଋΞͽ׶నؠ൪ඊᗞҒ˘ᇹ۞͞ёĂֽనؠඊ ഀᗞҒĂٙͽଋ఼૱ౌߏనؠ׎ࡦഀᗞҒপّĄ! ߏϡֽઇࠎ͛ф׶൪΍ቢ୧ॡ۞ࡦהColor পّĄඊ ۞הԯనؠࣃ޽ؠගඊ ᗞҒĂՙؠ൪οд๱႕ဦԛॡٙࢋֹϡ۞ᗞҒĄࢋՀԼ๱ˢ۞ᗞҒĂ۞הඊ ᗞҒ۞הՀԼඊ ఍நဦԛᄃкಫវ 12-11 ېy ൪΍ԛ y ൪΍ۡቢ׶кᙝԛ ІĄ̰टΒ߁ѣĈۏ൪΍ဦԛֽڱώ༼ࠎଋྋᄲĂтңֹϡధк૱ϡ۞͞ Іۏ൪΍ဦԛֽڱ͞۞ ֹϡ Canvas ᇆညဦ৵Ăኛଋણዦ TBitmap.ScanLine পّĄ!פгх ຐ੼ిڍਠੱЕ۞ဦԛဦ৵Ąт˘פͽ˼༱̙ࢋֹϡ Pixel ੱЕপّĂֽх ଀࣎Ҿဦ৵Ăͧ੓дડા̚ેҖဦԛ۞ፆүĂߏၙ˯ᇴ˼ࢺ۞Ąٙפො నؠ׶ Ą!̏҃ܮ͞ পّ۞ϫ۞ĂߏឰଋેҖ˘ֱ̈જүĂּтԱವăనؠဦ৵۞ᗞҒॡĂՀࠎ PixelsĂ೩ֻ఺࣎ פᅮࢋۡତх͌ޝ௡ј൪ο˯ဦԛ۞Տ࣎࣎ҾᗞҒᕇĄଋ ĂՏ࣎൪οౌ׍ѣ˘࣎׍৶͔۞ Pixels পّĄѩপّజϡֽ΃ܑזຍڦଋົ ׶నؠဦ৵פ᝝ ІĄ!ۏᕇੱဦٸĂҋҖᛖޢдֹϡԆ І˘ۡΞࠎιֹϡĂ҃ͷଋυืۏϡഇมĂᕇੱဦֹ۞הͽଋυืቁؠдඊ І۞ጾѣᝋĄٙۏ઄నιҋ̎׍ѣ޽ؠග׎ Bitmap পّ̝ᕇੱဦົ̙֭הො ඊ end; end; Bitmap.Free; Form1.Canvas.Brush.Bitmap := nil; finally Form1.Canvas.FillRect(Rect(0, 0, 100, 100)); Form1.Canvas.Brush.Bitmap := Bitmap; Bitmap.LoadFromFile('MyBitmap.bmp'); try Bitmap := TBitmap.Create; begin Bitmap: TBitmap; var ĈהĂιົଂᑫ९ྶˢᕇੱဦ֭ԯι޽ؠග Form1 ̝൪ο۞ඊּ̄۞˭غд ё۞ᕇੱဦᇆညĄ! ٙࢋઇࠎᇹה׎΁ડાॡĂඊٕېBitmap পّĂឰଋ޽ؠϡֽ๱ˢԛ ۞הඊ Bitmap পّ ۞הనؠඊ ᄃ඀ёనࢍ͘Ίܝ12-12 ˢ дܑॾ˯൪΍˘࣎඼ԛĄົڱּтĂ˭Е͞ ёౄј۞ᗝγ࢑ፉĄבΨײԣĂЯࠎιঐੵ˞ధк Հڱ͞ ׶ LineToڱ͞ ߏֹͧϡ MoveToޘి۞ ຐࢋ൪΍ధкᙝԛĂPolyLine Гֹϡ LineTo ൪΍ତ˭ֽ۞Տ˘࣎ᕇĄࡶଋޢௐ˘࣎ᕇĂ൒זҖ MoveTo ொ ણᇴߏᕇ۞˘࣎ੱЕĄଋΞͽԯкᙝԛĂຐညјߏАે۞ڱ͞ ็ග PolyLine Ąڱ͞ Ψ൪ο۞ PolyLineײࢋд൪ο˯൪΍кᙝԛĂ ୧ͯ߱ٙ௡ј۞Ą! ੵ˞࣎Ҿ۞ቢ୧γĂ൪ο˵Ξͽ൪΍кᙝԛĂкᙝԛߏϤЇңᇴϫ̝ాඕቢ ൪΍кᙝԛ end; end; LineTo(ClientWidth, 0); MoveTo(0, ClientHeight); LineTo(ClientWidth, ClientHeight); MoveTo(0, 0); begin with Canvas do begin procedure TForm1.FormPaint(Sender: TObject); Ăιົдܑॾ൪΍׎̰टॡ൪΍ܑॾ۞Ϲ˽၆֎ቢĈ!̚ڱּтĂд˭ࢗ۞͞ ۞௣ᕇតјϫ݈۞ҜཉĄ൪οົֹϡι۞൪ඊֽ൪΍ۡቢĄ ଋٙ޽ؠ۞ᕇ̝มĂ൪΍˘୧ቢĂ֭ԯቢ୧זLineTo ົଂϫ݈۞൪ඊҜཉĂ Ą!ڱ͞ ࡶຐࢋд൪ο˯൪΍ۡቢĂኛଋֹϡ൪ο۞ LineTo ൪΍ۡቢ ι۞൪ඊֽ൪΍ٙѣ۞ቢ୧Ą ѩ࠹ాĄ൪ο݋ߏֹϡك৵Ą҃кᙝԛ݋ߏ˘րЕ۞ۡቢĂბᕇ׶ბᕇ̝ม ൪οΞͽ൪΍ۡቢ׶кᙝԛ(Polyline)ĄۡቢΪ̙࿅ߏాඕд׌ᕇ̝ม۞ဦ ൪΍ۡቢ׶кᙝԛ y ൪΍кᙝԛ y ൪΍๪֎৏ԛ ఍நဦԛᄃкಫវ 12-13 end; Canvas.Ellipse(0, 0, ClientWidth div 2, ClientHeight div 2); Canvas.Rectangle(0, 0, ClientWidth div 2, ClientHeight div 2); begin procedure TForm1.FormPaint(Sender: TObject); ˘࣎ፚ๪ԛĈ! Гд࠹Т۞ડા൪΍ޢ൪΍˘࣎๱႕ܑॾ̝ν˯֎෪ࢨ۞৏ԛĂ൒ڱ˭Е͞ ˯۞ፚ๪ԛĄ ൪΍Βಛҝ۞৏ԛĂEllipse ݋൪΍˘࣎ٙѣᙝቢౌాд৏ԛᙝڱ͞ Rectangle Ă็ˢ୬ϡͽಛҝ৏ԛ۞ळᇾĄ!ڱ ͞ Ellipse ٕڱ͞ Ψ൪ο۞ Rectangleײࢋд൪ο˯൪΍৏ԛ׶ፚ๪ԛĂኛଋ ൪΍৏ԛ׶ፚ๪ԛ y ൪΍кᙝԛ y ൪΍๪֎৏ԛ y ൪΍৏ԛ׶ፚ๪ԛ ѣĈ!ځдώ༼̚ࠎଋᄲ Ą!۞טІଠۏ Pen ᙝቢ۞ቢ୧ߏϤϫ݈۞̝ې๱ˢ̰ొ۞ડાĄϡֽ൪΍ԛֽה඾ֹϡι۞ඊ γ॰Ăତ۞ېĄ൪οֹϡι۞൪ඊ൪΍ԛڱ͞۞ې൪ο׍ѣϡֽ൪΍̙Тԛ ې൪΍ԛ ĄځĂኛણዦቢ˯ᄲځ߁ཱི̰Ă֭ԯιፋ࣎༊ઇણᇴ็ˢĄࡶᅮซ˘Վᄲ̚ז ٸߏԯι۞̮৵ܮёĂ͞ٽϲੱЕ۞౵ᖎޙͽ็ˢЇңੱЕ۞ᕇĂҭຐԣి Еણᇴ̝ਕ˧۞ᐹᕇĄଋΞੱٸϲฟޙ఺ֹּ࣎̄ϡ Delphi ٙ׍౯۞Ăۡତ end; PolyLine([Point(0, 0), Point(50, 0), Point(75, 50), Point(25, 50), Point(0, 0)]); with Canvas do begin procedure TForm1.FormPaint(Sender: TObject); ᄃ඀ёనࢍ͘Ίܝ12-14 ˢ y ֹϡԣిตֽԼត̍׍ y ੠ᖸٙࢋֹϡ۞ᘱဦ̍׍ ଋтңĈ˞ځІĄώ༼ᄲۏဦ ˯ֻˠֹϡ۞Ąᑕϡ඀ёΞͽдаᑕ၆ԣిต۞ᕇᏴॡĂనؠιٙᅮࢋ۞ᘱ ăۡቢăඈඈ)Ă఼૱ߏд̍׍Е׶޷ตЕې৏ԛăԛ)ڱЧ჌̙Т۞ᘱဦ͞ Іۏд඀ё̚఍நкࢦ൪ဦ end; Point(ClientWidth, ClientHeight)]); Canvas.Polygon([Point(0, 0), Point(0, ClientHeight), begin procedure TForm1.FormPaint(Sender: TObject); ּтĂ˭Е඀ёቅົдܑॾ۞νΗొ൪΍˘࣎ˬ֎ԛĈ ๱႕кᙝԛ۞̰ొડાĄ הĂPolygon ֹϡඊޢௐ˘࣎ᕇͽԆјкᙝԛĄд൪΍ቢ୧ז࣎ᕇా˘ޢ౵ Polygon ֹϡᕇ۞ੱЕֽઇࠎ׎઱˘۞ણᇴĂ֭ͽ൪ඊాඕՏ࣎ᕇĂତ඾ԯ Ą!ڱ͞ Ψ൪ο۞ Polygonײࢋд൪ο˯൪΍Їຍᙝᇴϫ۞кᙝԛĂኛଋ ൪΍кᙝԛ end; Canvas.RoundRect(0, 0, ClientWidth div 2, ClientHeight div 2, 10, 10); begin procedure TForm1.FormPaint(Sender: TObject); ͽ 10 ࣎ဦ৵۞ۡशֽ൪΍๪֎Ą дܑॾ۞ν˯֎෪ࢨ൪΍˘࣎๪֎৏ԛĂιߏົܮĂ̚ڱּтĂд˭ࢗ۞͞ ๪֎۞͞ёĄ! ણᇴ˘ᇹĄRoundRect Ωγᔘᅮࢋ׌࣎ણᇴĂֽ޽ؠ൪΍۞ڱ͞ RoundRect ٕڱ͞ ็ග RoundRect ۞݈α࣎ણᇴߏ৏ԛ۞αಛĂϒт็ග Rectangle Ą!ڱ͞ Ψ൪ο۞ RoundRectײࡶࢋд൪ο˯൪΍๪֎৏ԛ(Rounded Rectangle)Ăኛ ൪΍๪֎৏ԛ ఍நဦԛᄃкಫវ 12-15 TDrawingTool ۞តᇴΪਕజ޽ؠј૱ᇴ dtLine..dtRoundRect ̚۞˘࣎Ąт ᔘਕឰଋֹϡ Object Pascal ۞ݭၗᑭߤֽ֨ͤధк᏾ᄱĄ˘࣎ݭၗࠎ ӘЕᓝёݭၗĂଋග૱ᇴ۞่่̙ߏ˘࣎ᇴࣃĂιކĂࡶߏٺ͹ࢋ۞मҾд dtRoundRect = 3; dtEllipse = 2; dtRectangle = 1; dtLIne = 0; const Ә˘௡૱ᇴĈކٺӘ࠹༊ކTDrawingTool ݭၗ۞ ؕ۞Ą! Еᓝݭၗ۞)݋ߏͽ 2 ࣎фϓ۞݈ཉф̮(ညߏ dt ܑϯĶdrawing toolķ)ֽฟ ၚּ˯ĂݭၗᙊҾфߏͽфϓ T ฟᐝ۞Ă҃Т˘௡࠹Ҭ۞૱ᇴ(ညߏ఺ֱၹј TDrawingTool = (dtLine, dtRectangle, dtEllipse, dtRoundRect); type ёݭၗĈ Ә˞˘࣎Еᓝކ඀ёቅĂࠎᘱဦ඀ё̚Ξͽֹϡ۞ᘱဦ̍׍Ă۞˭غּтĂ фĂତ඾ߏඈཱིĂͽ̈́д߁ཱི̰ྍݭၗ̝ࣃ۞ᙊҾфĂЧࣃኛͽఽᕇ̶ฟĄ! ତ඾˘࣎ݭၗ۞ᙊҾޢӘЕᓝёݭၗĂኛଋֹϡܲ঻ф typeĂ׎ކࡶຐࢋ ѣ఺ֱপؠࣃĄ ӘĂٙͽଋΞͽֹϡ Object Pascal ۞ݭၗᑭߤֽቁؠٙ޽ؠ۞Ϊކ˵ߏݭၗ ĄЯࠎιڱ͞ܮЕᓝёݭၗ(Enumerated type)ߏ˘࣎ԯԔࣃ޽ؠග૱ᇴ۞ᖎ ӘЕᓝёݭၗĄ!ކ఺ֱ৿ᕇĄ˵ಶߏڇਕૉҹڱ೩ֻ˘჌͞ ߏĂObject Pascal۞ྻضֱᇴфߏдዋ༊۞ቑಛ̰ͽ̈́ߏӎࠎϒቁ۞ԛၗĄ Ᏸ̶֤ڱಶߏ⎯ଋΞͽ޽ؠӄ੃૱ᇴЩჍගՏ˘࣎ᇴфĂҭ඀ё֭൑ڱઇ۞ ٽ჌̍׍Ăҭߏତ˭ֽଋ଀੃଀Տ˘࣎ᇴфٙ΃ܑ۞̍׍Ą࠹ྵ̝˭ĂՀᖎ ᙷ(ညߏۡቢă৏ԛăፚ๪ԛăٕߏ๪֎৏ԛ)ĄଋΞͽ޽ؠᇴфֽ΃ܑՏ˘ Ξਕࢋֹϡ۞ᘱဦ̍׍჌פᘱဦ඀ёᅮࢋ੠ᖸֹϡ۰дЇңॡมᕇ˯ĂٙᏴ ੠ᖸٙࢋֹϡ۞ᘱဦ̍׍ y ֹϡᘱဦ̍׍ ᄃ඀ёనࢍ͘Ίܝ12-16 ˢ ׍тңౌΪѣົ൪΍ۡቢ۞ᘱဦ඀ёቅĄ̍۞פְІ఍ந඀ԔĂ֭ͷ̙გٙᏴ ฟ޷ต۞ٸߏ໣ဂொજ׶໣ဂܮĂڱĄ઱˘ਕૉેҖٙѣᘱဦજү۞͞ېԛ னдĂଋ̏གྷਕᄲ΍ଋٙࢋֹϡ۞̍׍˞Ă̙࿅ଋ଀޽΍ᑕтңᘱ΍̙Т۞ ֹϡᘱဦ̍׍ end; DrawingTool := dtRoundRect; begin procedure TForm1.RoundRectButtonClick(Sender: TObject); { RoundRectButton } end; DrawingTool := dtEllipse; begin procedure TForm1.EllipseButtonClick(Sender: TObject); { EllipseButton } end; DrawingTool := dtRectangle; begin procedure TForm1.REctangleButtonClick(Sender: TObject); { RectangleButton } end; DrawingTool := dtLine; begin procedure TForm1.LineButtonClick(Sender: TObject); { LineButton } DrawingTool ̶Ҿనؠјዋ༊۞ࣃĈ α࣎ᘱဦ̍׍޷ต۞ OnClick ְІĂԯזଋΞͽԯ˭ЕְІ఍ந඀Ԕాඕ α࣎ᘱဦ̍׍Чѣ˘࣎̍׍Е޷ตĈۡቢă৏ԛăፚ๪ԛă׶๪֎৏ԛĄٺ Տ࣎ᘱဦ̍׍ౌᅮࢋ࠹၆ᑕ۞ OnClick ְІ఍ந඀ԔĄ઄ؠଋ۞ᑕϡ඀ё၆ ֹϡԣిตֽԼត̍׍ end; DrawingTool: TDrawingTool; { ϡֽܲхϫ݈ٙϡ̝̍׍۞᛼Ҝ } Origin, MovePt: TPoint; Drawing: Boolean; public Ә }ކ۞ڱ͞} … ( TForm1 = class(TForm TDrawingTool = (dtLine, dtRectangle, dtEllipse, dtRoundRect); type ˭Е඀ёቅĂдܑॾ̚ΐˢ˘࣎ϡֽ੠ᖸܑॾ̝ᘱဦ̍׍۞᛼ҜĈ ॡഇ۞᏾ᄱĄ யϠበᛌົܮ(ྏ඾ࢋ޽ؠЇң׎΁۞ᇴф(ࠤҌߏቑಛд 0..3 ̝ม۞ᇴࣃڍ ఍நဦԛᄃкಫវ 12-17 Canvas.Rectangle(Origin.X, Origin.Y, MovePt.X, MovePt.Y); dtREctangle: begin end; Canvas.LineTo(X, Y); Canvas.MoveTo(Origin.X, Origin.Y); Canvas.LineTo(MovePt.X, MovePt.Y); Canvas.MoveTo(Origin.X, Origin.Y); dtLine: begin case DrawingTool of Canvas.Pen.Mode := pmNotXor; begin if Drawing then begin procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); Ĉې༊൒Ăଋ˵଀Հາ OnMouseMove ְІ఍ந඀ԔĂͽ൪΍ԛ end; Drawing := False; end; (Origin.X – X) div 2, (Origin.Y – Y) div 2); dtRoundRect: Canvas.RoundRect(Origin.X, Origin.Y, X, Y, dtEllipse: Canvas.Ellipse(Origin.X, Origin.Y, X, Y); dtRectangle: Canvas.Rectangle(Origin.X, Origin.Y, X, Y); end; Canvas.LineTo(X, Y); Canvas.MoveTo(Origin.X, Origin.Y); begin dtLine: case DrawingTool of begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; ׍Ăٙࢦᆷ࿅۞ OnMouseUp ְІ఍ந඀ԔĈ̝̍ېα࣎൪΍ԛٺߏ၆˭غ ࢋనؠळᇾಶр˞Ą ᖎಏ۞ְଐĈՏ˘࣎ౌΪᅮࢋಏ˘۞ୃࢗćଋ˵Ϊᅮޝ׶൪ۡቢߏې൪΍ԛ ې൪΍ԛ y дְІ఍ந඀Ԕ̚Вϡ඀ёቅ ېy ൪΍ԛ ˞ځώ༼ᄲ Տ࣎̍׍۞ְІ఍ந඀Ԕ̚Ąזԯ఺ֱ඀ёΐ ׍ֽᘱဦĄኛଋ̍۞פࡶࢋֹϡ̙Т۞ᘱဦ̍׍Ă඀ёื޽ؠтңॲፂٙᏴ ᄃ඀ёనࢍ͘Ίܝ12-18 ˢ public Әдѩ }ކ۞ڱ …{ ᛼Ҝ׶͞ TForm1 = class(TForm); type Ә̚ĈކІ۞ۏॾܑזӘΐކ۞ ΨĄࢵАĂԯ DrawShapeײ඀Ԕ̚ ॾ̚Ă૟׎Ⴭࠎ DrawShapeĂ֭Տ˘ְ࣎І఍நܑזΐڱ˭Е۞඀ёቅԯ͞ Ә۞ԆБ˘ᇹĂࢋѣ࠹Т۞ણᇴ֭޷࠹Т۞ึԔĄކ၁ү۞ܑᐝυื׶ڱ͞ ॾಏ̮۞၁үొЊĄܑז၁үΐ۞ڱ2 ԯ͞ ࠎщБ۞͞ёĄ តј private Ξਕߏྵڱ඀ёቅΪߏࢋВϡֽ఍நೀְ࣎ІĂ֤ԯВϡ͞ ڍӘԍბ۞ public ٕ private ొЊĄтކІ̝ۏॾܑזӘΐކଋΞͽԯ І̚ĄۏॾܑזӘΐކ۞ڱ1 ૟͞ ॾ̚Ăܑזڱࡶຐΐ˘࣎͞ ΞͽឰְІ఍ந඀ԔВϡ۞૱ё̚Ăឰ඀ёՀࠎჟᖎĄזວ ༊ଋ൴னѣధкְІ఍ந඀Ԕֹϡ࠹Т۞඀ёቅॡĂଋΞͽԯࢦኑ۞඀ёቅ дְІ఍ந඀Ԕ̚Вϡ඀ёቅ ΨĄײ඀Ԕ дಏ˘඀Ԕ̚Ăрឰٙѣ۞໣ဂְІ఍நٸ඀ёቅĂ۞ې෦ଋтңԯ൪΍ԛ Әົܮ̚༼˭д̙Т۞඀Ԕ̚Ąҭٸ఼૱д˯ּٙ̚ѣࢦᖬ۞඀ёቅĂົజ end; Canvas.Pen.Mode := pmCopy; end; MovePt := Point(X, Y); end; end; (Origin.X – X) div 2, (Origin.Y – Y) div 2); Canvas.RoundRect(Origin.X, Origin.Y, X, Y, (Origin.X – X) div 2, (Origin.Y – Y) div 2); Canvas.RoundRect(Origin.X, Origin.Y, X, Y, dtRoundRect: begin end; Canvas.Ellipse(Origin.X, Origin.Y, X, Y); Canvas.Ellipse(Origin.X, Origin.Y, X, Y); dtEllipse: begin end; Canvas.Rectangle(Origin.X, Origin.Y, X, Y); ఍நဦԛᄃкಫវ 12-19 ІĂᖣͽдܑॾ˯ពϯဦԛĄ̮טГֹϡᇆညଠޢІĂ൒ ۏҘ൪дܑॾ˯Ą఼૱Ăᑕϡ඀ёົֹϡဦԛڌᑕϡ඀ё̙͉ѣ፟ົۡତ૟ ҘĄְ၁˯Ăଋ۞ڌĂ̙҃υдᏈ၌˯൪Їңٸ׎˯൪ဦăᐼхă֭ΐͽᛖ ІăдۏၹဦԛޙІ۞̮ІĄଋΞͽۏଋ̙֭ᅮࢋЇңϡֽ఍ந඀ё̝ဦԛ дဦԛ˯൪ဦ end; end; { ې DrawShape(Origin, MovePt, pmNotXor); { ൪΍ϫ݈۞ԛ MovePt := Point(X, Y); {੃ᐂϫ݈۞ᕇ } { ې DrawShape(Origin, MovePt, pmNotXor); { ੵΝА݈۞ԛ begin if Drawing then begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Ψ DrawShapeĄײ׎΁۞ְІ఍ந඀Ԕ݋࣒Լј end; end; end; (TopLeft.X – BottomRight.X) div 2, (TopLeft.Y – BottomRight.Y) div 2); dtRoundRect: RoundRect(TopLeft.X, TopLeft.Y, BottomRight.X, BottomRight.Y, dtEllipse: Ellipse(TopLeft.X, TopLeft.Y, BottomRight.X, BottomRight.Y); dtRectangle: Rectangle(TopLeft.X, TopLeft.Y, BottmRight.X, BottomRight.Y); end; LineTo(BottomRight.X, BottomRight.Y); MoveTo(TopLeft.X, TopLeft.Y); begin dtLine: case DrawingTool of Pen.Mode := AMode; begin with Canvas do begin procedure TForm1.DrawShape(TopLeft, BottomRight: TPoint; AMode: TPenMode); ၁ү }ڱ…{ ࠎ˞ᖎಏ੓֍Ăԧࣇ࠷ர˞׎΁۞͞ {$R *.FRM} implementation ତ඾Ăд඀ёಏ̮۞၁үొЊ၁ү DrawShapeĈ end; procedure DrawShape(TopLeft, BottomRight: TPoint; AMode: TPenMode); public declarations } } ᄃ඀ёనࢍ͘Ίܝ12-20 ˢ পّĄ۞ีטည̝дᏈ၌ͽγ۞׎΁ొЊĄତ඾Гనؠᇆညଠ Їңᇆפਕቁܲଡજ஼̮ІĂົΐˢЇңυืࢋ۞ଡજคĂͽхܮાĂ֤ᆃ дଡજ஼̮І̚Ă֭ԯι၆ᆅܑॾ۞Ξֹϡડٸีטଋ̏གྷԯᇆညଠڍт ۞̮І˘ᇹĄ ཉ׎΁࠻̙֍ٸдЇңҜཉĂಶ׶ٸटጡĂଋΞͽԯιٸ̙֍̝ᕇੱဦ۞х ߏ˘࣎࠻ีטᇆညଠڍአፋ׎ဦԛ۞̂̈ĂΪᅮࢋనؠ׎ν˯֎۞ҜཉĄт ਕ˧ֽ۞ีטࢋֹϡᇆညଠڍдܑॾ۞Їңг͞ĄтٸีטଋΞͽԯᇆညଠ ีטཉˢଠ ϡဦԛĄֹ̚ีטķ˘༼Ә෦ଋтңдଠีטො дௐ 7 ౢ۞Ķ૟ဦԛΐҌଠ ІĄۏயϠ׎΁ဦԛ۞ ᅮࢋ޺ᜈពϯ۞ᕇੱဦĂٕ۰ߏᑕϡ඀ёᅮࢋϡֽιֱ̙֤֭ٸхֽีטଠ ߏ˘࣎टጡ̮ІĂιឰଋ଀ͽពϯᕇੱဦ̮ІĄଋΞͽֹϡᇆညีטᇆညଠ ีטΐˢᇆညଠ Ą!ีט඾Гΐˢᇆညଠ ۞ဦԛĄࢋΐˢ˘࣎Ξଡજ۞ဦԛĂଋᅮАࢋΐˢ˘࣎ TScrollbox ̮ІĂତ ׎̚ĂଋಶΞͽពϯܑͧॾՀ̂ĂࠤҌͧᏈ၌Հ̂זٸॾ˯֭ԯဦԛᇆညܑ זဦԛ̙֭ᅮࢋ׶ܑॾТᇹ̂̈ĈιΞͽՀٕ̈Հ̂Ą૟˘࣎ଡજ஼̮Іΐ ᄦүΞଡજ۞ဦԛ ពϯ΍ֽĄגӈົܮІۏο˯Ă֤ဦԛ ൪۞ีטଋۡତ൪дଠڍѣ፟ົ఍நι۞ᘱᄦੈिॡ̖ົ΍னĄ࠹ͅ۞Ăт ีטॡĂᇆညΪдଠีטೱήྖᄲĂ༊ଋ൪΍ᕇੱဦ֭ԯιࣇ޽ؠගᇆညଠ ൪οॡĂ̖ົజពϯ΍ֽĄ۞ีטଠזԯιଂᕇੱဦኑᄦีטଠזϯ΍ֽĂۡ ො Яࠎଋ൪۞˜ߏ̙дᏈ၌˯۞ᇆညĂּт TBitmap ൪οĂٙͽᇆည̙֭ົព ᘱᄦᑫăဦϯăٕЇң׎΁̏щ྅۞ဦԛᙷҾĂּт JPEG ဦԛĄ! ІΞͽߏᕇੱဦᑫăۏІΐ˯ЕОăગ෭ᘨăྶˢ׶ᐼх۞જүĄဦԛۏဦԛ гΞͽ၆ЇңٽᅅޝĂଋಶޢဦԛ۞ีטᇆညଠזдଋԯᑕϡ඀ё۞൪ဦொ ఍நဦԛᄃкಫវ 12-21 Ąڱкቢ୧ඈඈ)Ą఺ֱߏྵԣి˵ྵѣड़த۞ᘱဦ͞ ዋ༊ְІ̚Ą఼૱ଋົֹϡડા۞ፆү͞ё(๱႕ă৏ԛă۞ีטᇆညଠזΐ ൪οĂ֭ԯ໣ဂְІ఍ந඀Ԕ۞ีטࡶࢋдᕇੱဦ˯൪ဦĂኛଋֹϡᇆညଠ дᕇੱဦ˯൪ဦ ࢬĄ!ޢજ஼̮І۞ ଋྏ඾ࢋдᇆည˯൪ဦĂٙ൪۞݋Ϊົдᇆည׶ଡڍည۞׎ዶొЊĄ̙࿅т ଡજ஼̮Іҋજ۞ពϯଡજคĂрឰଋពϯᇆז࠻ົܮពϯፋ࣎ᇆညĂ֤ଋ Ԇፋ۞ڱଋአፋෛ඄۞̂̈Ăֹ҃଀ֹϡડા൑ڍϲ۞ᕇੱဦĄтޙܑϯٙ ๴ϨҒ۞ડાâזдܑॾ۞ֹϡડા̚࠻ົܮଋனдેҖᑕϡ඀ёĂڍт Ą!ٸ଀ᕇੱဦ۞ጾѣᝋĄЯѩĂଋ଀ҋҖΐͽᛖפІ֭ϏۏٙͽĂဦԛ ԯᕇੱဦ޽ؠගဦԛ۞ Graphic পّĂΪົ૟ྍᕇੱဦኑᄦ˘Њ࿅Ν҃̏Ą end; { ีטImage.Picture.Graphic := Bitmap; { ԯᕇੱဦ޽ؠᘱᇆညଠ { ޘ੼۞ܐBitmap.Height := 200; { …׶౵ { …ޘᆵ۞ܐ Bitmap.Width := 200; { ޽ؠ౵ І }ۏၹᕇੱဦޙ } ; Bitmap := TBitmap.Create begin Bitmap: TBitmap; { ϡֽᐼхᕇੱဦ۞ᇶॡّតᇴ } var procedure TForm1.FormCreate(Sender: TObject); Form1 ̝ OnCreate ְІ۞఍ந඀Ԕ̚Ĉ זд఺ּ࣎̄̚Ăᇆညߏдᑕϡ඀ё۞͹ࢋܑॾ Form1 ˯Ăٙͽ඀ёቅߏΐ Picture.Graphic পّĄ ۞ีטІĂ֭ԯι޽ؠගᇆညଠۏϲᕇੱဦޙ 2 І఍ந඀ԔĄְז1 ԯӣѣᇆညܑ̝ॾ۞ OnCreate ְІĂΐ ϲ۩Ϩ۞ᕇੱဦĂ!ޙࡶࢋдᑕϡ඀ёୁજॡĂ ྶˢι۞ဦͯĂϒтд12-22ࢱ̝Ķྶˢ׶ᐼхဦԛᑫ」ٙ֏Ą! ΞͽдેҖॡଂᑫ९˵ีטPicture পّĂͽΐˢᐖၗ۞ဦԛĄଠ ۞ีטညଠ ॡĂιΪߏ࣎टጡ҃̏Ą൒҃ĂଋΞͽдనࢍॡనؠᇆีט༊ଋཉˢᇆညଠ ̈̂۞ܐనؠᕇੱဦ౵ ᄃ඀ёనࢍ͘Ίܝ12-22 ˢ y ଂᑫ९ྶˢဦԛ Ĉ!ځ˭ᇴ༼̚ࠎଋᄲ дͽڱᙷҬĂ఺ֱ͞ڱ׶఍ந׎΁ᙷҾᑫ९۞͞ڱྶˢ׶ᐼхဦԛᑫ९۞͞ ඈඈĄιࣇ˵͚೯Ξщ྅۞ဦԛᙷҾĄ! ဦᑫă̬̚ᑫăglyphs(၆ CLX ᑕϡ඀ёֽᄲĂᔘѣ pngăxpm ॾё۞ᑫ९) ϡͽྶˢăᐼхă׶ആೱဦԛᇆည۞̮ІĂ͚೯˞ధкဦԛॾёĂΒ߁ᕇੱ Ąٽឰଂᑫ९ྶˢᇆညͽ̈́Гΐͽᐼх۞જүĂត଀ໂࠎटีטᇆညଠ ϡĄֹ۞ޢϲр۞ဦͯĂͽֻ͟ޙߏࢋՏѨౌֹϡ࠹Т۞ᇆညĂಶߏࢋᐼх̏ ΪਕдેҖ඀ёഇมхд۞ဦԛᇆညĂ׎ᆊࣃߏȈ̶ѣࢨ۞Ą఼૱Ăଋࡶ̙ ྶˢ׶ᐼхဦԛᑫ end; end; BitMap.free; finally Canvas.draw(0, 0, BitMap); end; P[x] := y; for x := 0 to BitMap.width – 1 do P := BitMap.ScanLine(y); begin for y := 0 to BitMap.height – 1 do BitMap.LoadFromFile('C:\Program Files\Borland\Delphi 3\Images\Splash\256Color\factory.bmp'); try BitMap := TBitmap.Create; begin P: PByteArray; BitMap: TBitmap; x, y: integer; var тңۡତдᕇੱဦ˯ᘱဦځ// ఺ּ࣎̄ᄲ procedure TForm1.Button1Click(Sender: TObject); ଀˘Җ۞ဦ৵Ą!פтңֹϡ ScanLine পّĂֽ˘Ѩ˞ځ఺ּ࣎̄ᄲ ଀ۢ྽ ScanLine পّ۞ࣧؕॾёĄ! ԯϤ ScanLine ٙа็۞޽ᇾĂ༊ј RGB ੱЕֽ఍நĄӎ݋Ăଋಶޢ̮Ă൒ ScanLine পّĄд˘ਠ۞ϡ౉̚ĂଋΞͽԯᕇੱဦ۞ဦ৵ॾёనؠࠎ 24 Ҝ ࣎Ҿ۞ဦ৵ॡĂྵѣड़த۞ᘱᄦᇆည͞ёߏֹϡᕇੱဦ۞פ༊ଋᅮࢋх ఍நဦԛᄃкಫវ 12-23 Щֽᐼхனѣ۞ᑫ९Ĉ ีϫ̚Ăϡֽ఍நࢦາᐼх׻Щ۞ᑫ९ăᐼхϏ׻Щ۞ᑫ९ăͽ̈́ϡາ۞ᑫ File | Save ׶ File | Save As Αਕܑ ז˭Е۞׌ְ࣎І఍ந඀ԔĂ̶Ҿజΐ т˭༼ٙࢗĄ!˘ ܮ଀ֹϡ۰ٙ޽ؠ۞ᑫ९ЩჍĂפଐԛ̚Ăᑕϡ඀ёдᐼх̝݈ĂົᅮࢋА ਕົ՟ѣᑫЩĂֹ҃ϡ۰˵Ξਕࢋԯߊѣ۞ဦԛᐼхјΩ˘࣎ᑫЩĄд׌჌ ϲ۞Ă֤ᆃιΞޙဦԛߏາڍᅮࢋϡͽᐼх۞ᑫ९ЩჍĄтڱ͞ SaveToFile Ąڱ͞ ۞ SaveToFile Іۏ Picture ̝ีטΨᇆညଠײᑫ९̚Ăኛଋזटᐼх̰۞ีטࡶࢋԯᇆညଠ І˵ਕૉΐͽྶˢăᐼхĄۏ̎۞ဦԛᑫ९ॾёĂֹ଀ဦԛ ϲ֭ͷොΊҋޙІਕૉྶˢăᐼхᇴ჌̙Тॾё۞ဦԛĂ҃ଋ˵Ξͽۏဦԛ ᑫ९̚זԯဦԛᐼх end; end; Image.Picture.LoadFromFile(CurrentFile); CurrentFile := OpenDialog1.FileName; begin if OpenDialog1.Execute then begin procedure TForm1.OpenClick(Sender: TObject); Ĉ̚ีטImage ۞ᇆညଠ ଀ᑫ९ЩჍĂତ඾ԯྍᑫ९ྶˢჍࠎפ˭Е඀ёົଂฟୁᑫ९၆ྖ͞๴̚ Ą!ڱ͞ LoadFromFile І۞ۏ Picture ̝ีטΨᇆညଠײĂኛଋีטࡶࢋԯဦԛᑫྶˢᇆညଠ ९ྶˢဦԛ۞ਕ˧Ą ֻ΁ˠٕ۰ߏ׎΁ᑕϡ඀ёֽ࣒ԼဦԛĂ֤ᆃଋ۞ᑕϡ඀ёಶᅮࢋ೩ֻଂᑫ ᑕϡ඀ё̝γĂͽזଋ۞ᑕϡ඀ёᅮࢋ࣒ԼဦԛĂٕ۰ᅮࢋԯဦԛᐼхڍт ଂᑫ९ྶˢဦԛ y ആೱဦԛ ᑫ९̚זy ԯဦԛᐼх ᄃ඀ёనࢍ͘Ίܝ12-24 ˢ ߏ˘ּĈܮ˭غOnClick ְІĄ File | New Αਕܑีϫ۞ ז̮۞ uses ̄ή̚Ąତ඾૟ְІ఍ந඀Ԕΐ ଋ͹ࢋܑॾ̝඀ёಏזࡶຐдଋ۞૞९ֹ̚ϡည఺۞၆ྖ͞๴ĂኛАԯιΐ ϲ۞Ą!ޙ۞ BMPDlg ඀ёಏ̮̚ ఺࣎পঅ۞၆ྖ͞๴ߏΒӣд GraphEx ૞९(д demos\doc\graphex ϫᐂ) HeightEdit WidthEdit ဦ12.1 дBMPDlg඀ёಏ̮̚۞ᕇੱဦ̂̈၆ྖ͞๴ тဦ 12.1 ˘ᇹĄܮֹϡ၆ྖ͞๴Ă ߏܮĂڱ࿰న̂̈ͽγ۞׎΁͎̇Ą೩ֻѩ˘Ᏼี౵ᖎಏ۞̝͞ܐֽઇࠎ౵ Ăϡפķ˘༼)Ăҭଋᑕྍ೩ֻ˘࣎ឰֹϡ۰Ᏼ̈̂۞ܐࢱ۞Ķనؠᕇੱဦ౵ ߏ˘ᇹ۞(ኛણዦд12-21ڱဦԛ۞͞ܐϲ౵ޙĂ׶ଋϡֽڱϲາဦԛ۞͞ޙ ІĄۏ Picture ۞ีטᇆညଠזဦԛĂኛଋ૟າ۞ဦԛ޽ؠ۞̚ีטࡶຐࢋആೱдᇆညଠ ΃ᖞѣ۞ဦԛĄ!פԛ۞ဦԛĂ֤ᆃĂາ۞ဦԛಶົ ଋԯາ۞ဦԛ޽ؠග̏གྷጾѣဦڍဦԛĄт۞ีטଋᐌॡౌΞͽആೱᇆညଠ ആೱဦԛ end; end; Save1Click(Sender); {ତ඾޷ϒ૱͞ёΐͽᐼх } CurrentFile := SaveDialog1.FileName; { ͽֹϡ۰ٙ޽ؠ۞ᑫЩֽхᑫ } begin ଀ᑫ९ЩჍ }פ } if SaveDialog1.Execute then begin procedure TForm1.SaveAs1Click(Sender: TObject); end; ଀ᑫЩ }פ else SaveAs1Click(Sender); { ӎ݋ ׻Щ֤ಶᐼхι }̏ڍ Image.Picture.SaveToFile(CurrentFile) { т if CurrentFile <> '' then begin procedure TForm1.Save1Click(Sender: TObject); ఍நဦԛᄃкಫវ 12-25 ‘image/delphi.bitemap’ SDelphiBitMap MIMEݭၗ CLX૱ᇴ ܑ12.4 CLX̝MIMEݭၗᄃ૱ᇴ ۞ MIME ݭၗ̝ϡĈ ІĄCLX ᑕϡ඀ё೩ֻ˭ࢗ࿰న۞૱ᇴͽֻ˭ࢗۏ ᐼхј࠹၆ᑕ۞ TStream ၆ CLX ᑕϡ඀ёֽᄲĂᐼхдગ෭ᘨ˯۞ྤफ़Ăߏͽ MIME ݭၗ۞͞ёĂ ગ෭ᘨྤफ़̝඀ёಏ̮۞ uses ̄ή̚Ą!פᅮࢋхזQClipbrd)ಏ̮ΐ ગ෭ᘨ݈Ăυืԯ Clipbrd(д CLX ̚݋ϡפІֽхۏ дଋֹϡ Clipboard ᙷݭྤफ़Ą г఍நΒ߁ဦԛд̰۞̙ТٽІឰଋՀᅅۏ ёϹೱဦԛĄVCL ۞ Clipboard ଋΞͽֹϡ Windows ગ෭ᘨд඀ё̚ኑᄦ׶෭˯ဦԛĂٕ۰ߏ׶׎΁۞඀ ֹϡગ෭ᘨ఍நဦԛ ߊѣ۞ᕇੱဦĄ!ٸĂᛖޢࠎ఺࣎ࣧЯĂ̝݈۞඀ёቅົд޽ࠁજү̝ ІĄЯۏІົჯ᜕׎ҋ֗۞̰ొဦԛۏ଀׎ጾѣᝋĄဦԛפဦԛĂҭݒ̙ົ ІΝኑᄦາ۞ۏІ۞ Graphic পّĂົֹ଀ဦԛۏො ԯາ۞ᕇੱဦ޽ؠගဦԛ end; end; end; CurrentFile := ''; { ܑϯ఺ߏ࣎Ϗ׻Щ۞ᑫ९ } ΃ဦԛ }פImage.Picture.Graphic := Bitmap; { ϡາ۞ᕇੱဦ { ޘBitmap.Height := StrToInt(HeightEdit.Text); { ֹϡٙ޽ؠ۞੼ { ޘ Bitmap.Width := StrToInt(WidthEdit.Text); { ֹϡٙ޽ؠ۞ᆵ І }ۏϲБາ۞ᕇੱဦޙ } ; Bitmap := TBitmap.Create begin ঐ၆ྖ͞๴Ă֤ಶᚶᜈ }פϡ۰՟ѣֹڍ if ShowModal <> idCancel then { т HeightEdit.Text := IntToStr(Image.Picture.Graphic.Height); { …ઇࠎ࿰నࣃ } WidthEdit.Text := IntToStr(Image.Picture.Graphic.Width); { ֹϡϫ݈۞̂̈… } ଀൏ᕇ }פ᛼Ҝޘ ActiveControl := WidthEdit; { ቁؠᆵ begin with NewBMPForm do begin Bitmap: TBitmap; { ϡֽᐼхາᕇੱဦ۞ᇶхតᇴ } var procedure TForm1.New1Click(Sender: TObject); ᄃ඀ёనࢍ͘Ίܝ12-26 ˢ ᕇੱဦҋ̝̎˯ }ז CopyRect(ARect, Image.Canvas, ARect); { ኑᄦ ଀ᕇੱဦ۞̂̈ }פ } ;( ARect := Rect(0, 0, Image.Width, Image.Height ҘតјϨҒ }ڌ CopyMode := cmWhitness; { ԯٙѣ۞ begin with Image.Canvas do ગ෭ᘨ }ז Copy1Click(Sender); { ԯဦԛኑᄦ begin ARect: TRect; var procedure TForm1.Cut1Click(Sender: TObject); ีϫ۞ OnClick ְІ׎ְІ఍ந඀Ԕٙઇ۞˘ᇹĄ! Edit | Cut Αਕܑ זତా˭غߏԯٙગ˭۞ડાనјϨҒĂтТڱ఼૱۞ઇ д̂ొЊ۞ଐԛ̝˭Ăગ˭જү۞઱˘યᗟߏĂтңពϯ̏జӁੵ۞ࣧဦͯĄ ᘨĂତ඾ӁੵࣧА۞ဦͯĄ ગ෭זગ෭ᘨΝĂኛଋАԯιኑᄦזࡶຐԯဦԛ(graphics)ଂဦԛ(picture)ગ ૟ֽ໚ဦԛӁੵĄ! ׶ኑᄦજүߏ˘ᇹ۞Ă઱˘۞मҾߏĂଋυืТॡڱગ෭ᘨ۞ઇזԯဦԛગ ગ෭ᘨ̚זԯဦԛગ end. Clipboard.Assign(Image.Picture) begin procedure TForm1.Copy1Click(Sender: TObject); ગ෭ᘨĄ!זኑᄦีטЩࠎ Image ۞ဦԛଠ тңдаᑕᕇᏴ Edit | Copy ΑਕܑีϫॡĂԯဦԛଂ˞ځѩ߱඀ёቅĂᄲ ІĄ!ۏԯဦԛ޽ؠගગ෭ᘨڱ͞ ગ෭ᘨĂኛֹϡ Assignזࡶࢋԯဦԛኑᄦ Ξͽ೩ֻගٙѣ۞ᑕϡ඀ёֹϡĄܮ෭ᘨ̝̚Ăဦԛ ગٺटĄ˘όιࣇҜ̰۞ีטગ෭ᘨ̚ĂΒ߁ᇆညଠזଋΞͽኑᄦЇңဦԛ ગ෭ᘨזԯဦԛኑᄦ ‘image/delphi.drawing SDelphiDrawing ‘image/delphi.picture SDelphiPicture ‘image/delphi.component’ SDelphiComponent MIMEݭၗ CLX૱ᇴ ఍நဦԛᄃкಫវ 12-27 end; end; Iamge.Picture.Bitmap.Assign(Clipboard); begin if Clipboard.Provides(SDelphiBitmap) then { дગ෭ᘨ̚ѣᕇੱဦ๜? } begin Bitmap: TBitmap; var procedure TForm1.PasteButtonClick(Sender: TObject); Тᇹүϡ۞ቑּົညߏ఺ᇹĈזො ֹϡ CLX ྿ end; end; Iamge.Picture.Bitmap.Assign(Clipboard); begin if Clipboard.HasFormat(CF_BITMAP) then { д Windows ۞ગ෭ᘨ̚ѣᕇੱဦ๜? } begin Bitmap: TBitmap; var procedure TForm1.PasteButtonClick(Sender: TObject); Ąีטဦԛଠזԯဦԛଂગ෭ᘨ෭ ො ˭ࢗ۞ VCL ඀ёቅϯቑ۞ߏĂтңдаᑕᕇᏴ Edit | Paste ΑਕܑีϫॡĂ ϫ۞гĄז2 ԯગ෭ᘨ޽ؠ ̚Ăኛ็ˢ SDelphiBitmapĄ д Windows ˯ീྏߏӎѣဦԛĂኛ็ˢ CF_BITMAPĄд CLX ᑕϡ඀ё а็ TrueĄࡶຐົܮગ෭ᘨӣѣдણᇴٙ̚޽ؠ̝ݭၗ۞ีϫĂ֤ᆃι ڍёĄтבࣃ۞ڒHasFormat(ٕ CLX ᑕϡ඀ё̚۞ Provides)ߏ࣎็аο Ăᑭߤ࠻࠻ગ෭ᘨߏӎӣѣဦԛĄڱ͞(ᑕϡ඀ё CLX ٺVCL ᑕϡ඀ё)ٕ Provides(ϡ ٺϡ)ڱ͞ Ψગ෭ᘨ۞ HasFormatײ 1 ࡶຐࢋ෭˯ગ෭ᘨ۞ဦԛĂኛଋ ׶ܑॾ̝˯)Ąีט І)Β߁ဦԛଠۏЇңဦԛזΞͽԯι෭ܮગ෭ᘨ̏̚ӣѣᕇੱဦԛĂଋڍт ෭˯ગ෭ᘨ۞ဦԛ end; end; CopyMode := cmSrcCopy; { аೇјϒ૱۞ሀё } ᄃ඀ёనࢍ͘Ίܝ12-28 ˢ y аᑕ໣ဂொજ ฟ໣ဂજүٸy аᑕ y аᑕ޷˭໣ဂજү y ໣ဂְІ۞̰ट Ĉ!ځώ༼ᄲ ё၆ྖ͞๴̚޷˭ Enter*ֽயϠĄ! Т˘࣎ҜཉԆј۞*Ă఺჌ᕇᏴ۞જү˵Ξͽֹϡߙ჌޷ᔣ۞જү)ညߏдሀ ฟ׌࣎જүĂ҃ͷߏдٸ޷ตĄι˵ΞͽаᑕᕇᏴ۞જү)˵ಶߏΒӣ޷˭׶ ฟ໣ဂٸଋ۞ᑕϡ඀ёΞͽаᑕ໣ဂ۞જүĈ޷˭໣ဂ޷ตăொજ໣ဂă׶ аᑕ໣ဂજү y ຋አቢ୧۞ᘱᄦ І̚ۏॾܑזy ԯϡֽ੠ᖸ໣ဂજү۞᛼Ҝΐ y аᑕ໣ဂજү ώ༼۞̰टΒ߁Ĉ ቑּ݋૟णϯтңдᕇੱဦ˯൪ဦĄ۞ ޢĂтңд͹ܑॾ۞πࢬ˯൪ဦĄൾځд˘ฟؕĂԧࣇ౅࿅ቑּ඀ёࠎଋᄲ ฟ޷ต݋ඕՁ൪ဦĄٸဦԛĈ޷˭໣ဂ۞޷ตಶฟؕ൪ဦĂ ѢॡĂдෛ඄۞൪ο൪΍ቢ୧׶ٳ΍Ąᑕϡ඀ёдаᑕ၆໣ဂ۞ᕇᏴăפٙ ໣ဂொજ۞ଐԛ̝̚Ą఺߱඀ёቅߏଂ Demos\Doc\Graphex ϫᐂ̚۞ቑּ ༊ֹϡ۰дેҖॡഇᘱᄦဦԛॡĂᅮࢋ޺ᜈ۞੠ᖸٺ௟༼ّొЊĂι˜ߏϡ ۞ڍĂдဦԛᑕϡ඀ё̚၁үӈॡՀາ(Rubber banding)ड़˞ځ఺࣎ቑּᄲ ӈॡՀາቑּ ᘨ̚Ϗӣѣ͚ٙ೯۞ॾёॡĂ෭˯Αਕܑߏ୮൑үϡ۞Ą! छ)ኑᄦซΝ۞Ąд఺ּ࣎̄̚Ăଋ̙֭ᅮࢋᑭߤગ෭ᘨ۞ॾёĂЯࠎ༊ગ෭ ҋѩᑕϡ඀ёĂ˵Ξͽߏଂ׎΁ᑕϡ඀ё(ּт̈൪פдગ෭ᘨ̚۞ဦԛΞͽ ఍நဦԛᄃкಫវ 12-29 дߏ͹ࢋ޷ต)Ă޷˭͹ࢋ)Πᙝ*޷ตົд Button ޷ต̚੃ᐂࠎ mbLeftĄ! ଋ̷ೱ࿰న۞Ķ͹ࢋķ׶ĶѨࢋķ໣ဂ޷ต)ٙͽΠᙝ໣ဂ޷ตனڍЯѩĂт ො Delphi ֹϡ׶ Microsoft Windows ࠹Т۞୧ІĂֽҿᕝٙ޷˭۞޷ตࠎңĄ ᅮࢋᑭߤ Button ֽҿᕝᛈ൴ѩְІ۞໣ဂ޷ตտౣߏ֤˘࣎Ą д̂ొЊ۞ॡ࣏Ăଋ଀ֹϡ໣ဂְІ఍ந඀Ԕ̚۞ळᇾĂҭѣॡ࣏Ăଋ˵ົ X, Y ְІயϠॡ۞ळᇾ ၗېShift ܑϯд໣ဂજүॡ̝AltăCtrlăShift޷ᔣ۞ Button ܑϯజ޷˭۞໣ဂ޷ตĈmbLeftămbMiddleăٕmbRight Іۏ໣ဂજү۞זSender ઍീ ણᇴ ຍཌྷ ܑ12.6 ໣ဂְІણᇴ т˭Ĉځᄦଋຐ၆ְІઇ΍۞аᑕĄ఺̣࣎ણᇴ̶Ҿᄲ ఍ந඀ԔĂТॡ็ˢ̣࣎ણᇴĄኛଋֹϡ఺ֱણᇴٙ೩ֻ۞ྤੈĂֽҋҖࢎ Ψଋд࠹၆۞ְІٙ̚ؠཌྷ۞ְІײ໣ဂ۞જүॡĂιົז༊ᑕϡ඀ёઍീ ᛈ൴ѩ˘ְІĄົܮ ฟ໣ဂ޷ตॡĂٸĂ҃ͷֹϡ۰˯̝ีטߙଠٺOnMouseUpְІ ༊໣ဂഫᇾҜ ᛈ൴ѩ˘ְІĄ ົܮĂ҃ͷֹϡ۰ொજ໣ဂॡĂ˯̝ีטߙଠٺOnMouseMoveְІ ༊໣ဂഫᇾҜ ᛈ൴ѩ˘ְІĄົܮ Ă҃ͷֹϡ۰޷˭໣ဂ޷ตॡĂ˯̝ีטߙଠٺOnMouseDownְІ ༊໣ဂഫᇾҜ ځְІ ᄲ ܑ12.5 ໣ဂְІ ְІĄ! ѣˬ࣎໣ဂְІĈOnMouseDown ְІăOnMouseMove ְ Іă׶ OnMouseUp ໣ဂְІົ൴Ϡдֹϡ۰дᑕϡ඀ё۞ֹϡ۰̬ࢬ˯ொજ໣ဂ̝ᅫĄVCL ̚ ໣ဂְІ۞̰ट ᄃ඀ёనࢍ͘Ίܝ12-30 ˢ ІĄᓝּֽᄲĂଋਕ൪΍˘࣎෹΍ܑॾᙝࠧ۞ቢ୧ĄۏІĂ̙ืࢋߏ࠹Т۞ ۏ۞זฟ໣ဂ޷ตॡٙ޽ٸІ׶ۏІĂ఺࣎ۏ۞זϡ۰޷˭໣ဂ޷ตॡٙ޽ ฟ໣ဂ޷ตॡົயϠ OnMouseUp ְІĄ఺ְІ఼૱ົ็ගдֹٸ༊ֹϡ۰ ฟ໣ဂજүٸаᑕ ฟ໣ဂְІĄٸฟ޷ตॡ֤˘ᕇ۞ۡቢĂଋᔘυืаᑕٸϡ۰ֹז΍˘୧ా నؠ൪ඊҜཉăనؠቢ୧۞੓ؕҜᕇĄࡶࢋ൪ົܮனдĂд޷˭໣ဂ޷ตॡ end; Canvas.MouseTo(X, Y); { నؠ൪ඊ۞Ҝཉ } begin Shift: TShiftState: X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; ตॡ۞ळᇾĈ! фҚĶHere!ķĄ˭ࢗ۞఺߱඀ё݋ົԯϫ݈۞ळᇾҜཉనؠࠎֹϡ۰޷˭޷ дᑕϡ඀ёેҖॡĂଋΞͽ޷˭໣ဂ޷ตĂд޽ᇾٙ޽۞Ҝཉдܑॾ˯ពϯ end; Canvas.TextOut(X, Y, 'Here!'); { д(X, Y)Ҝཉᆷ΍͛ф } begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; ඀ёቅд޷˭໣ဂ޷ᔣ̝Ҝཉ۞ܑॾ˯ពϯфҚĶHere!ķĈ۞˭غ аᑕ޷˭໣ဂજү end; begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; VCL ົࠎܑॾ۞໣ဂ޷˭ְІĂயϠ˘࣎۩۞ְІ఍ந඀ԔĈ OnMouseDown ְІ̚Ą! זࡶຐаᑕ໣ဂ۞޷˭જүĂኛଋ૟ְІ఍ந඀Ԕΐ Іତ඾ಶΞͽаᑕ఺ְ࣎ІĄ!ۏ۞זІĄٙ޽ ۏ۞זٙ޽זᅍ็ົܮ༊ֹϡ۰޷˭໣ဂ۞޷ᔣॡĂOnMouseDown ְІ аᑕ޷˭໣ဂજү ఍நဦԛᄃкಫវ 12-31 Ҝ̖ҖĄ І᛼ۏІ̚ΐˢ׎΁ۏଋࢋ੠ᖸߏӎ̏޷˭໣ဂ޷ตĂଋᔘυืдܑॾڍт Ϗ൪˭໣ဂ޷ต̝݈˵ົயϠĄإ໣ဂொજְІдଋ ޷ต̝݈˵ົ൪΍Ą д఺߱඀ё̚Ăдܑॾ˯ொજ໣ဂົԍᐌ඾໣ဂ൪΍ቢ୧ĂࠤҌд޷˭໣ဂ end; ϫ݈Ҝཉ۞ۡቢ }ז Canvas.LineTo(X, Y); { ൪΍˘୧ begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseMove(Sender: TObject; Button: TMouseButton; ఍ந඀Ԕົдܑॾ˯Ă൪΍˘୧ OnMouseMove ְІٙ็ˢ̝Ҝཉ۞ቢ୧Ĉ! ൪΍ᇶॡّ۞ቢ୧ĂЯѩ˵ಶਕ೩ֹֻϡ۰ధка㌅ĄOnMouseMove ְІ ּ࣎̄̚Ăֹϡ˞ொજ໣ဂ۞ְІĂ༊ֹϡ۰޷ҝ໣ဂ޷ตॡĂົдܑॾ˯ ࡶࢋаᑕ໣ဂ۞ொજĂኛଋࠎ OnMouseMove ְІؠཌྷְІ఍ந඀ԔĄд఺ ΍ᇶॡّቢ୧ֽ೩ֹֻϡ۰ӈॡّ۞а㌅Ą ІĄ఺ឰଋΞͽொજ໣ဂॡ౅࿅൪ۏ۞זдֹϡ۰޷˭޷ตॡ໣ဂ޽ᇾٙ޽ זؠഇ۞யϠ OnMouseMove ְІĄ఺ְ࣎Іົ็ົܮ༊ֹϡ۰ொજ໣ဂॡ аᑕ໣ဂொજ ቢ۞Ąۡזฟ໣ဂ޷ต̝݈ߏ࠻̙ٸ̚Ăֹϡ۰д ฟ໣ဂֽ൪΍ቢ୧Ąд఺ּ࣎̄ٸѢ֭ٳ఺߱඀ёឰֹϡ۰౅࿅޷˭໣ဂĂ end; X, Y)۞ۡቢ })ז Canvas.LineTo(X, Y); { ൪΍ଂ൪ඊҜཉ begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FromMouseUp(Sender: TObject; Button: TMouseButton; ཉ۞ۡቢĈ ฟ̝Ҝٸ໣ဂ޷ตזᖎಏ۞ OnMouseUp ְІ఍ந඀ԔĂιົ൪΍˘୧޽ޝ ߏ˘࣎˭غฟ໣ဂજүĂኛؠཌྷ OnMouseUp ְІ۞఍ந඀ԔĄٸࡶࢋаᑕ ᄃ඀ёనࢍ͘Ίܝ12-32 ˢ Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; end; Canvas.MoveTo(X, Y); Drawing := True; { నؠ Drawing ၮᇾ } begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; ฟ޷ตॡ૟׎నؠࠎ FalseĄ!ٸԯιనؠࠎ TrueĂ֭дֹϡ۰ޢ޷ต Ăኛдֹϡ۰޷˭໣ဂޢ༊ଋጾѣ˘࣎ϡֽ੠ᖸߏӎࢋ൪ဦ۞ Drawing ᛼Ҝ end; Origin, MovePt: TPoint; { ϡֽᐼхᕇ۞᛼Ҝ } Drawing: Boolean; { ϡֽ੠ᖸ໣ဂ޷ตߏӎ޷˭۞᛼Ҝ } public Shift: TShiftState; X, Y: Integer); procedure FormMouseMove(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormMouseDown(Sender: TObject; Button: TMouseButton; TForm1 = class(TForm) type ۞ Origin ׶ MovePtĄ! Drawing ۞ܑॾ᛼ҜĄιТॡ˵ΐˢ׌࣎ݭၗࠎ TPoint ᛼ҜĂϡͽᐼхҜཉ ࣃ)ăЩࠎڒӘ̚Ăؠཌྷ˘࣎ݭၗࠎ Boolean(οކІ۞ۏ඀ёቅдܑॾ۞˭غ !г͞Ą۞ڱ᛼Ҝ̈́၆ְІаᑕ̝̝͞ีטϡͽ΃ܑଠ ཉٸӘĈ఺˵ߏ Delphi ϡֽކDelphiĶጾѣ」д public ޽ϯෟ̝݈۞Їң Ҝ۞ᙊҾф׶ݭၗĄ Ăᔣˢٙ޽ؠ᛼ޢბ۞ public ޽ϯෟ̝غӘ̝ކІĂኛдۏזࡶຐ૟᛼Ҝΐ ࣃ᛼ҜĂ֭дֹϡ۰޷˭໣ဂ޷ตॡనؠ׎ࣃĄڒԧࣇ଀ΐˢ˘࣎ο д˭ࢬ۞ּ̄̚Ăܑॾᅮࢋ੠ᖸֹϡ۰ߏӎ̏޷˭˞໣ဂ޷ตĄࡶࢋтѩĂ Әొ̶ΐˢ఺࣎າ᛼ҜĄކ ҜĂٙͽ̖ਕֹϡྍ᛼Ҝ۞ЩჍֽણ҂̮ІĄኛдܑॾ඀ёಏ̮۞ܑᐝݭၗ І۞᛼ۏІ̚Ăΐˢ˘࣎ϡֽ΃ܑྍۏॾॡĂDelphi ົдܑॾܑז̮Іΐ ІĄ༊ଋԯۏॾܑזІ᛼Ҝΐۏࡶࢋ੠ᖸߏӎ̏޷˭໣ဂ޷ตĂυืԯ˘࣎ І̚ۏॾܑזԯϡֽ੠ᖸ໣ဂજү۞᛼Ҝΐ ఍நဦԛᄃкಫវ 12-33 end; awing := False; Dr Canvas.LineTo(X, Y); ੓ᕇ }ז Canvas.MoveTo(Origin.X, Origin.Y); { ԯ൪ඊொ begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; end; Origin := Point(X, Y); { ੃ᐂቢ۞੓ᕇ } Canvas.MoveTo(X, Y); Drawing := True; begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; ඀ёቅĈ۞˭غֽઇࠎቢ୧۞੓ᕇĂѣт ฟ໣ဂְІ఍ந඀Ԕಶਕֹϡ Originٸ޷ต۞ְІ൴Ϡॡనؠ OriginĂٙͽ д൪ቢॡĂኛଋֹϡ Origin ᛼Ҝֽ੠ᖸቢ୧۞੓ؕᕇĄԧࣇυืд޷˭໣ဂ ੠ᖸቢ୧੓ؕᕇ ĄֱځᖣϤೀ࣎᛼Ҝֽ੠ᖸ໣ဂ۞ொજĂԧࣇΞͽឰ൪ቢજүГᓐ ຋አቢ୧۞ᘱᄦ ٙᑕүࠎ੓ᕇ۞ҜཉĄ ฟ໣ဂҜ޷ตॡĂଋ̏གྷεΝ˞ۡቢٸொજ൪ඊ۞ҜཉĂٙͽдົڱ఺࣎͞ Ψ LineToĂײົܮયᗟ൴ϠдĂՏѨଋொજ໣ဂĂ໣ဂொજְІ۞఍ந඀Ԕ ቢĄ!ۡ۞ܪ̪൒ົயϠ˘ֱϡֽ੠ᖸ໣ဂொજ۞ᗔ˛ᗔˢቢ୧Ă̙҃ߏ˘୧႓ ฟ໣ဂ۞ְІมĂ̖ົ൪΍ဦԛĂҭ఺ٸĂಶΪົд޷˭໣ဂ׶ޢ఺ᇹአፋ end; Canvas.LineTo(X, Y); if Drawing then { Ϊд Drawing ࠎ True ॡ̖൪΍ } begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseMove(Sender: TObject; Button: TMouseButton; ΍ဦԛĈ! ࣒Լ OnMouseMove ְІ఍ந඀ԔĂֹ׎Ϊѣд Drawing ࠎ True ॡ̖൪ޢ൒ end; Drawing := False; { ୻ੵ Drawing ၮᇾ } Canvas.LineTo(X, Y); begin ᄃ඀ёనࢍ͘Ίܝ12-34 ˢ Canvas.LineTo(X, Y); { ൪΍າ۞ቢ } ੓ᕇ }ז Canvas.MoveTo(Origin.X, Origin.Y); { ொ Canvas.LineTo(MovePt.X, MovePt.Y); { ঐଫᖞ۞ቢ } ࣧᕇ }ז Canvas.MoveTo(Origin.X, Origin.Y); { ԯ൪ඊொ Canvas.Pen.Mode := pmNotXor; { ֹϡ XOR ሀёֽ൪ቢ/ঐੵቢ } begin if Drawing then begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseMove(Sender: TObject; Button: TMouseButton; end; ொજҜཉ }۞ޢ MovePt := Point(X, Y); { ޺ᜈ੠ᖸ౵ Origin := Point(X, Y); Canvas.MoveTo(X, Y); Drawing := True; begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Origin ׶ MovePt ֽঐੵྍቢ୧Ą! MovePt υืనؠࠎՏ࣎̚มቢ୧۞ბᕇĂ఺ᇹଋ̖ਕд൪΍ቢ୧ֹ̝݈ϡ ୧Ă఺ΞͽᖣϤ੠ᖸ݈۞ቢ୧ֽ྿јĄMovePt ᛼Ҝхд۞ϫ۞ϒߏࠎѩĄ! ቢ୧Ą఺ּ࣎̄ᅮࢋд൪΍˭˘࣎ቢ୧̝݈АঐੵА݈۞ቢ۞ޢᙱԱ΍౵ޝ ˯ࢬ۞඀ёົ੠ᖸϫ݈۞໣ဂҜཉĂҭ̚ม۞ᇶॡّቢ୧ᔘߏхдĂٙͽଋ end; end; Canvas.LineTo(X, Y); ੓ᕇ }ז Canvas.MoveTo(Origin.X, Origin.Y); { ொ begin if Drawing then begin Shift: TShiftState; X, Y: Integer); procedure TForm1.FormMouseMove(Sender: TObject; Button: TMouseButton; ࣎યᗟĄ ϫ݈۞Ҝཉֽ࣒ϒ఺זГ൪ޢࣧؕҜཉĂ൒זࣧᕇĄԧࣇΞͽԯᘱဦҜཉொ ϫ݈۞Ҝཉֽ൪΍ቢ୧Ă̙҃ߏۡତଂז໣ဂҜཉ(Mouse Position)Ă۞ޢ౵ ԧࣇֹϡٺϫ݈ٙᇤᆷ۞఺࣎ OnMouseMove ְІ఍ந඀ԔቑּĂ׎યᗟд ੠ᖸ໣ဂொજ ۞જү⎯ᑕϡ඀ё֭ᔘϏ͚೯Ķӈॡ൪΍ķ۞ਕ˧Ą! ቢĂҭιࣇ̙֭ົ൪΍Їң̚มۡ۞ޢ൪΍౵ޘГז఺ֱតજឰᑕϡ඀ё଀ ఍நဦԛᄃкಫវ 12-35 ඄̚ĂрឰଋពϯᇆͯĄ ΐҌܑॾෛีטControls)ဦϯ˯ా޷׌˭Ą఺ᆃઇĂົҋજг૟જ൪ଠ Win32 ࢱѨ۞ TAnimate(CLX ᑕϡ඀ё̚۞ Common ̝ۍ1 д̮Іࢬ ᑕϡ඀ёĈזࡶຐ૟൑ᓏ۞ᇆͯΐ ᑕϡ඀ё̚ĄזĂଋΞͽ૟൑ᓏ۞ᇆͯΐีט౅࿅જ൪ଠ ᑕϡ඀ёזԯ൑ᓏࢰ۞ᇆͯΐ ᑕϡ඀ёזy ૟ᓏࢰ׶(ٕ)ᇆͯΐ ᑕϡ඀ёזy ԯ൑ᓏࢰ۞ᇆͯΐ дώౢٙࢋ੅ኢ۞͹ᗟт˭Ĉ! Ăኛણዦቢ˯ HelpĄ!ځTAnimate ׶ TMediaPlayer ̮І۞ซ˘Վᄲ ٺᙯ ІĄ!̮ٸᑕϡ඀ёॡĂኛֹϡಫវᇫזΐ ᑕϡ඀ёॡĂኛֹϡજ൪̮ІĄдᅮࢋԯᓏࢰ׶)ٕ۰*ᇆͯז׍ᓏࢰ۞ᇆͯ CLX ᑕϡ඀ё)Ąдᅮࢋΐˢ̙ ٺSystem ࢱѨ۞ TMediaPlayer ̮І(̙ዋϡ Win32 ࢱѨ(CLX ᑕϡ඀ё̚۞ Common Controls)۞ TAnimate ̮Іٕߏд ̝ۍᑕϡ඀ёĄࡶࢋтѩĂଋΞͽֹϡд̮ІࢬזଋΞͽ૟кಫវ̮Іΐ ఍நкಫវΑਕ ֽ൪΍ι۞ቢ୧Ą! ฟ໣ဂ޷ตॡĂ̏གྷΞͽϡٸਕቁؠ൪ඊдܮpmCopy)఺ߏι۞࿰నࣃ*Ăଋ Ăԯ൪ඊሀёՀԼјޢߏԯဦ৵నؠјֽࣧ۞ᗞҒĄ౅࿅д൪΍ቢ୧ Ą༊ᅮࢋঐੵቢ୧ॡĂଋ၁ᅫ˯׀ਕԯቢ୧׶ࡦഀ۞ဦ৵ЪܮpmNotXorĂଋ ĄᖣϤԯ൪ඊ۞ሀёԼតј˞ڍӈॡ൪΍ቢ୧۞ड़זтѩ˘ֽĂଋಶਕ଀ end; Canvas.Pen.Mode := pmCopy; MovePt := Point(X, Y); { ੃ᐂ˭˘࣎ொજᕇ } end; ᄃ඀ёనࢍ͘Ίܝ12-36 ˢ ࢋдેҖ̝݈ٕߏдેҖॡ఺ᇹઇಶΞͽ˞Ą! ІĂ֤ Active পّಶົតј FalseĂٙͽଋυืГԯιࢦనࠎ TrueĄΪ ଋᔘࢋՀજܑॾٕߏܑॾ˯۞̮ڍĂтޢ ො дԯ Active পّనؠࠎ True Ąڱ͞ Ψ PlayײAVI ॡଋ˵Ξͽ ٸࢋᇫ AVI ᇆͯĂ֤ಶᇤᆷ޷ต۞ OnClick ְІϡֽ޽ؠ఺࣎જүĄд ٸॡᇫ Іజ޷˭ۏਕેҖ AVI ͯ߱ĄּтĂࢋд޷ตܮҖॡ۞পؠְІ൴Ϡॡ 6 ֹϡ˭ٛ୻ಏԯ Active পّనؠࠎ TrueĂٕᇤᆷְІ఍ந඀ԔĂͽдે Ξͽ૟ StartFrame পّనؠࠎٙ୬ពϯ۞ॾᇴĄܮពϯ۞ௐ˘ॾᇆͯĂଋ ฟୁॡٙีטপّĄּтĂࡶࢋՀԼдજ൪ଠ۞ีט5 ዋ༊гనؠજ൪ଠ Ąٸઃͤᇫົ̖ڱ͞ Ψ˞ StopײזĂۡٸ˘ۡࢦኑгᇫ Ѩᇴߏ 0Ă֤ಶົڍѨᇴĄт۞ٸ4 ԯ Repetitions পّనؠࠎଋࢋ AVI ᇫ ତ඾ԯ Open পّనؠࠎ TrueĄܮ၌˯Ă ଋຐ૟ AVI ᇆͯ۞ௐ˘࣎൪ࢬពϯдᏈڍᇆ̝݈ͯĂтٸᇫڱ͞ ߏ Play ૟ AVI ᑫ९ྶҌ੃ጸវ̚ĄдࢵѨֹϡ Active পّٕົܮĂޢтѩనؠ ୁ AVI ၆ྖ͞๴̚۞ฟୁ(Open)޷ต ГᕇᏴдฟޢAVI ᑫ९(CLX ᑕϡ඀ё݋ߏ GIF ᑫ)Ă൒ פᐂ̚Ᏼ Г޷˘˭࠷ர޷ตĄҋώٕ፟შྮ۞ϫޢFileName পّĂ൒ פx Ᏼ ޽ؠӣѣϤ ResName ٕ ResID ܑٙϯ̝ྤ໚ٙд۞ሀ௡ćٕ AVI ྤ໚Ąֹϡ ResHandle ֽ פx ֹϡ ResName ٕ ResID পֽّᏴ ଋٙຐϡ۞ AVIĄפCommon AVI পّĂ֭ଂ˭ٛ୻ಏ̚Ᏼ פx Ᏼ 3 ેҖ˭ЕજүĈ ෛጡĄ ІᑭۏϲְІ఍ந඀ԔॡĂኛચυۡତֹϡޙдనؠనࢍഇมপّͽ̈́ ఢ݋Ą) ॡ૟ົֹϡ఺࣎ЩჍĄ(ኛᏲч Delphi ᙊҾф۞ᇾ໤׻ЩีטΨજ൪ଠ ײາЩჍĄଋд۞ีטName পّ֭Ꮾˢજ൪ଠ פІᑭෛጡĂᏴۏϡֹ 2 ఍நဦԛᄃкಫវ 12-37 Run | Run ેҖ఺࣎જ൪થᇾෛ඄Ą פ10 Ᏼ LogoForm1.Close; Е඀ёቅрд AVI ᑫ९ઃͤॡᙯౕᑫ९Ĉ ଀൏ᕇĄдι۞ OnStop ְІ˯ా޷׌˭֭ᇤᆷ˭פឰιีט9 ᕇᏴજ൪ଠ ॾ۞̚δĄܑזٸԯι֭ีטஎᖡҒĂГᕇᏴቁؠĄᕇᏴᇾចଠ ЕфݭᇹёĈ௖វĂ̂̈Ĉ18ĂᗞҒĈ˭פপّĂᕇᏴ࠷ர(…)޷ต֭Ᏼ ι۞ Fontפّ֭Ꮾˢ Welcome to Cool Images 4.0Ąன д ଂ фݭ၆ྖ͞๴Ᏼ ι۞ Caption পפStandard ࢱѨ۞ᇾចဦϯ˯ా޷׌˭ĄᏴ ۍ8 д̮Іࢬ Logo1.Active := True; ଀൏ᕇॡેҖ AVI ᇆͯĈפܑॾௐ˘Ѩ ᇤᆷ˭Е඀ёቅрдેҖॡ༊ޢ7 дܑॾ۞ OnActive ְІ˯ా޷׌˭Ă൒ តјܑॾ۞̚δҜཉĄี טрԯજ൪ଠޘ۞ Caption পّనؠࠎ Logo WindowĄனдᒺܑ̈ॾ۞ᆵ ଀൏ᕇ֭ԯܑॾ۞ Name পّనؠࠎ LogoForm1ĂГ ԯ ιפ6 ᕇᏴܑॾֹι 5 ԯι۞ Repetitions পّనؠࠎ 5Ą ॾ۞Π˯֎ҜཉĄܑז๴አፋ͞۞ีטԯજ൪ଠڱѢ۞͞ٳ4 ֹϡᕇᏴ׶ ੃ጸវ̚Ąז఺ົԯ cool.avi ᑫ९ྶ ᐂ̚۞ cool.avi ᑫ९ĄГᕇᏴдฟୁ AVI ၆ྖ͞๴̚۞ฟୁ(Open)޷ตĄ д..\Demos\Coolstuff ϫפFileName পّĂᕇᏴ࠷ர(…)޷ตĂᏴ פ3 Ᏼ ІᑭෛጡĂԯι۞ Name পّనؠࠎ Logo1Ąۏ2 ֹϡ ဦϯ˯ా޷׌˭ĄีטWin32 ࢱѨ۞જ൪ଠ ۞ۍ1 д̮Іࢬ Гԯ Project1.dpr ᐼхј Logo.dprĄତ඾Ĉ ϲາ۞૞९֭ԯ Unit1.pas ᐼхј Frmlogo.pasĂޙࡶຐેҖ఺࣎ቑּĂኛଋ Г΍னٙࢋ۞൪ࢬĄޢԆٸᇾĄдથᇾᇫ ઄ؠଋࢋдᑕϡ඀ёฟؕેҖĂдௐ˘࣎൪ࢬ΍னॡពϯߙ࣎જ൪۞̳Φથ ΐˢ൑ᓏᇆͯ۞ቑּ ᄃ඀ёనࢍ͘Ίܝ12-38 ˢ ࢋ۞ԯ޷ตనؠј True ٕ FalseĄ ϡٕតј൑үϡćٕ۰д EnabledButoons পّ˯ా޷׌˭Ăͽॲፂଋٙ ޷ตΞͽүٸ6 ԯ AutoEnable నؠࠎ TrueĂᖣͽдેҖॡҋજгឰಫវᇫ ਕฟୁĄ̖ڱ͞ Ψ Openײཉυื AutoOpen ࠎ FalseĂ֤ᆃ྅ ڍϲॡົҋજฟୁĄтޙॾܑ̝ีטಫវଠ ҖॡĂдӣѣેีטଠٸ5 ԯ AutoOpen পّనؠࠎ TrueĄ఺ᇹ༊ಫវᇫ ർវ)ჃჄăΙ૲ඈඈ*Ą۞ٸಫវ྅ཉ˯೧ˢಫវٙх۞פॡдٙᏴ Їңдώٕ፟შྮϫᐂ̚Ξͽֹϡ۞ᑫ९Ąӎ݋ĂдેҖפྖ͞๴̚Ᏼ дฟୁ၆ޢFileName পّĂᕇᏴ࠷ர޷ตĂ൒ פкಫវᑫ९۞ЩჍĄᏴ ྅ཉߏԯι۞ಫវ̰टᐼхдᑫ९̚Ăֹ֤ϡ FileName পֽّ޽ؠڍ4 т Αਕ۞ซ˘ՎྤੈĂኛણዦܑ 12.7Ą ྅ཉݭၗ׶׎ٺॲፂଋд FileName পّ۞ઘᑫЩֽ޽ؠ྅ཉ۞ݭၗĄ)ᙯ DeviceType ߏ dtAutoSelectĂ֤྅ཉ۞ݭၗົ ڍࢋฟୁ۞ዋ༊྅ཉĄ(т ฟୁॡٙڱ͞ дֹϡ AutoOpen পّٕ OpenפDeviceType পّ֭Ᏼ פ3 Ᏼ ІᑭෛጡĄۏϲְІ఍ந඀Ԕॡኛۡତֹϡޙдనؠనࢍഇมপّ׶ Ҿф۞ᇾ໤׻Щఢ݋Ą) ॡಶົֹϡ఺࣎ЩჍĄ)ኛᏲч Delphi ᙊีטଠٸΨಫវᇫײჍĄдଋ Ꮾˢ˘࣎າ۞ЩีטଠٸName পّ֭ࠎಫវᇫ פІᑭෛጡĂᏴۏ2 ֹϡ ଋࢋΐˢкಫវΑਕ۞ܑॾෛ඄Ąזΐีטଠٸ˘࣎кಫវᇫ Іဦϯ˯ా޷׌˭Ą఺ົҋજԯ̮ٸSystem ࢱѨ۞ಫវᇫ ̝ۍ1 д̮Іࢬ ᑕϡ඀ёĈזࡶຐ૟ᓏࢰ׶(ٕ)ᇆͯΐ Ąٸො дྭπέᑕϡ඀ё۞ฟ൴̚Ă̙͚֭೯ᓏࢰٕᇆͯ۞ᇥ ˭ඈજүĄкಫវ྅ཉΞͽߏർវٕహវĄ! ăઃͤăᇶઃăᐂٸಫវ྅ཉ׶၆Ϥкಫវ྅ཉֹٙϡ۞ᓏࢰٕᇆͯซҖᇫ ᑕϡ඀ё̚ĄιົฟୁкזІĂଋΞͽ૟ᓏࢰ׶(ٕ)ᇆͯΐ̮ٸ౅࿅ಫវᇫ ᑕϡ඀ёז૟ᓏࢰ׶(ٕ)ᇆͯΐ ఍நဦԛᄃкಫវ 12-39 ඀ё WAVᑫ ӎ ӎٸࢰड़ᇫگdtWaveAudio ෛ඄۞ࢰ dtVCR ᇆͯӇ૲੃ᐂጡ ᇆͯӇ૲ ӎ ߏ dtSequencer ෛ඄۞MIDI Sequencer MIDIᑫ ߏ ӎ ӎ ӎ ବႿᇆည) дᐂ˭ॡ)ٸᇫڱdtSCanner ᇆညବႿጡ ൑ dtOverlay ࢦᝑ྅ཉ ᙷͧёᇆͯ ӎ ߏ ඀ё MMᇆͯ ӎ ߏٸdtMMMovie MM࿪ᇆᇫ ඀ё AVI-MPG-MOVᑫ ӎ ߏٸdtDigitalVideo ෛ඄۞ᇴҜёᇆͯᇫ ඀ё ᇴҜёࢰड़Ⴣ૲ ߏ ӎٸdtDAT ᇴҜёࢰड़Ⴣ૲ᇫ CDࢰड़ჃჄ ߏ ӎ ඀ёٸࢰड़ᇫ ඀ёٕCDٸdtCDAudio ෛ඄۞AVIᇆͯᇫ ඀ё AVIᇆͯᑫ ӎ ߏٸdtAVIVideo ෛ඄۞AVIᇆͯᇫ ϯෛ඄ ֹϡព ࢰ࢖ ϡֹ ٸϡֽᇫ ֹϡ۞హ/ർវ ྅ཉᙷݭ ܑ12.7 кಫវ྅ཉ۞ᙷݭ׶׎Αਕ ࢖Ă֤ԯ Tracks পّనؠࠎٙࢋ۞ࢰ࢖Ą ྅ཉֹϡкࢦࢰڍĄтีט֤ԯ Display পّనؠࠎϡֽពϯಫវ۞ଠ ಫវᅮࢋពϯෛ඄Ăڍనؠઇ׎΁۞ԼតĄּтĂт۞ีטଠٸ8 ၆ಫវᇫ ྅ཉĄטStepăBackăStart!RecordingăEject*ֽଠ PlayăPauseăStopăNextăPreviousă)ڱΨዋ༊۞͞ײFalseĂ֭ͷΞͽ ІдેҖॡ̙ࢋពϯ΍ֽĂ֤ԯ Visible পّనؠࠎ̮ٸଋࢋಫវᇫڍт ҜཉĄ۞ีטଠٸአፋಫវᇫֽڱዋ༊۞አፋ͞פٛ୻ಏ̚Ᏼ Align পّ֭ଂ˭ פॾ˯۞ዋ༊ҜཉٕߏᏴܑזีטѢଠٳ7 ᖣϤᕇᏴ֭ ĄטNextăPrevious ඈ)ֽΐͽଠ PlayăPauseăStopă)ڱઃͤ۞જүĄ྅ཉ˵Ξͽֹϡᄃ޷ต࠹၆۞͞ ăᇶઃăٸІ۞޷ตॡĂಫវ྅ཉಶਕૉซҖᇫ̮ٸ༊ֹϡ۰ᕇᏴಫវᇫ ᄃ඀ёనࢍ͘Ίܝ12-40 ˢ ! Run | Run ેҖ AVI ᇆͯĄ פ10 Ᏼ VideoPlayer1.Play; ᕇॡેҖ AVI ᇆͯĈ ଀൑פдܑॾܮ9 дܑॾ۞ OnActive ְІ˯ా޷׌˭֭ᇤᆷ˭Е඀ёቅͽ Ą̈̂۞ีטDelphi_AdĄତ඾አፋܑॾ۞̂̈ࠎજ൪ଠ ॾ۞ Name পّ֭Ꮾˢܑפ଀൏ᕇĂᏴפ8 ᕇᏴܑॾрឰܑॾࢦາ Animate1Ą פಏ̚Ᏼ ι۞ Display পّ֭ࢦ˭ٛ୻פ଀൏ᕇĄᏴפ඀ёឰιࢦາٸ7 ᕇᏴಫវᇫ ॾ۞ν˯֎ҜཉĄܑזѢٳטᏴ֭ԯજ൪ଠ পّనؠࠎ FalseĂHeight পّనؠࠎ 175ĂWidth পّనؠࠎ 200Ąᕇ Win32 ࢱѨ۞જ൪̮Іဦϯ˯ా޷׌˭Ąԯι۞ AutoSize ̝ۍ6 д̮Іࢬ 5 ԯ AutoOpen পّనؠࠎ TrueĂ֭ԯ Visible পّనؠࠎ FalseĄ speedis.aviĄᕇᏴдฟୁ၆ྖ͞๴̚۞ฟୁ޷ตĄ פᐂᏴ FileName পّĂᕇᏴ࠷ர(…)޷ตĂଂଋ۞//]Demos\CoolStuf ϫ פ4 Ᏼ dtAVIVideoĄ פDeviceType পّ֭ଂ˭ٛ୻ಏ̚Ᏼ פ3 Ᏼ Name পّనؠࠎ VideoPlayer1Ą ۞ีטଠٸІᑭෛጡĂԯಫវᇫۏ2 ֹϡ Іဦϯ˯ా޷׌˭Ą̮ٸSystem ࢱѨ۞ಫវᇫ ̝ۍ1 д̮Іࢬ ᑫᐼхј DelphiAd.dprĄତ඾Ĉ ϲ˘࣎າ۞૞९֭ԯ Unit1.pas ᑫᐼхј FrmAd.pas ֭ԯ Project1.dprޙኛ ࣎кಫវᇃӘ۞ AVI ᇆͯĄࡶࢋેҖ఺࣎ቑּâٸͽ˭۞఺࣎ቑּĂົᇥ ΐˢࢰड़׶(ٕ)ᇆͯ۞ቑּ ᇤᆷкેҖჰ඀ё 13-1 Җड़தĄ ࿅ԯ̍ү̶јᇴ࣎ેҖჰĂ֭Тॡд̙Т۞఍நጡ˯ેҖĂᖣͽԼචે Җ඀ё۞ր௚ΞેҖкࢦ఍நጡĂ֤඀ёΞͽ౅ેڍy кࢦ఍ந඀ԔĄт ࢋ۞̍ү˯Ą ેҖჰֽ޽ؠ̙Т඀ё̍ү۞ᐹАᝋĂ఺ᇹΞͽឰ CPU ۞ॡมϡдՀࢦ Җ۞඀ԔĄֹϡкેҖჰֽТॡેҖ఺ֱπҖొЊ۞Տ˘࣎ొЊĄֹϡ y ௡ᖐ඀ё۞ҖࠎĄ఼૱Ă඀ё۞ҖࠎΞͽ௡ᖐјᇴ࣎Ξͽ፾ϲྻү۞π Ąڍၙి̝඀Ԕ۞ેҖඕ Ξͽд̙Т۞ેҖჰᚶᜈ̍үĂ҃ឰΩ˘࣎ેҖჰඈ࣏ܮჰĂᑕϡ඀ё ಶυืઃͤٙѣ۞ેҖĄд඀ԔԆјͽ݈ CPU ಶົ՟ְઇĄֹϡкેҖ ९ăᄃ׎΁۞፟ጡ໛఼ăٕߏពϯкಫវ۞̰टඈ఺ᙷྵҲి۞఍நॡĂ дჃჄ˯۞ᑫפညхޞy ᔖҺயϠ஬ᐚĄΪѣ˘࣎ેҖჰ۞ྖĂ඀ёдඈ ҂ĂιΞͽᖣϤ˭ЕΑਕֽΐૻଋ۞඀ёĈޥેҖჰᅮࢋ౅ၔ۞ (Multi-threaded)඀ёĂߏ˘჌ਕૉТॡેҖᇴ࣎ેҖྮश۞඀ёĄҭֹϡк ĄٙᏜ۞кેҖჰٽІਕૉᇤᆷкેҖჰ඀ёត଀Հࠎटۏѣధк ᇤᆷкેҖჰ඀ё ᄃ඀ёనࢍ͘Ίܝ13-2 ˢ TMyThread = class(TThread) type Classes; uses interface unit Unit2; ඀ёĈ۞˭غTMyThreadĂ֤ι۞̰ट࠻੓ֽಶົည ଋԯેҖჰ׻ЩࠎڍІ۞ߛၹ඀ёቅĄтۏҋજயϠ۞ᑫ९̚ົӣѣາેჰ ྖ͞๴̙֭ົҋજдଋٙ೩ֻ۞ᙷҾЩჍ̝݈ΐˢ˘࣎ĶTķфϓĄ! ො ׶̂ొд IDE ̚ᅮࢋᙷҾЩჍ۞၆ྖ͞๴̙Т۞ߏĂNew Thread Object ၆ ۞ĶેҖჰ׻Щķ˘͛Ą Җჰ׻Щ۞ซ˘ՎྤੈĂኛણ҂13-16ࢱ̚ેٺ၁үેҖჰ۞඀ёಏ̮ᑫĄᙯ ϲ˘࣎ϡͽޙົܮ ĂCode Editorޢ гдੵ᏾ॡΐͽ੠ᖸĄд޷˭ OKٽᅅ VCL ᑕϡ඀ё)Ąࠎଋ۞ેҖჰ׻ЩĂΞͽՀ ٺ֭ͷᏮˢેҖჰЩჍ(่ዋϡ ๴Ă͞פNamed Thread ८ פҾ Щ ჍĂּ т TMyThreadĄࠎ˞ΐͽ׻ЩĂኛ८ І۞ᙷۏThread ObjectĂ֭ͷᏮˢາેҖჰ פNew Items ၆ྖ͞๴̚ĂᏴ File | NewĂ֭д פІĂኛд͹Αਕܑ˯Ᏼۏϲ TThread ۞ᚶٚޙࡶຐࢋ ϲ׎ࢉϠᙷҾĄޙ ІĂଋυืଂ TThreadۏࡶຐࢋдᑕϡ඀ёֹ̚ϡેҖჰ Ąځዦቢ˯ᄲ Ăኛણځϡ BeginThread ۞ซ˘Վᄲֹٺр఍Ąᙯז଀̚ڱІᄃ͞ۏჰТՎ አેҖჰķ˘༼ٙࢗ̚۞ĂкેҖםBeginThreadĂଋ̪൒ਕଂд13--9ࢱ̝Ķ ёĄ̙࿅ӈֹߏֹϡב ఺ֱ̰टĂ֤ᆃଋυืֹϡ BeginThreadטࢋଠ ଋᅮڍҖჰ۞ુᝑ̂̈Ăٕ۰ߏщБᛳّĄтેטІ̙̯֭ధଋଠۏො ેҖჰ ᖎ̼кેҖჰᑕϡ඀ё۞ᇤᆷĄ! ྅ેҖჰٙᅮࢋֹϡ۞̂ొЊΑਕĂֽދІĂᖣϤۏ۞˘࣎ેҖჰĄેҖჰ ІĂֽܑϯдᑕϡ඀ё̚ۏ၆̂ొЊ۞ᑕϡ඀ё҃֏ĂଋౌΞͽֹϡેҖჰ ІۏؠཌྷેҖჰ ᆸ۞ർវ೩ֻ˞࠹ᙯ͚೯Ą!غΪߏሀᑢкࢦ఍நůӈֹܮ ٙѣ۞үຽր௚ౌ၁үৌϒ۞кࢦ఍நĄᓝּֽᄲĂWindows 9xܧ֭ ො ᇤᆷкેҖჰ඀ё 13-3 tpLower ેҖჰͧπ૱ેҖჰ۞ᐹАᝋ͌˘Ą tpLowest ેҖჰͧπ૱ેҖჰ۞ᐹАᝋ͌˟Ą ҖჰֽેҖ׍ѣtpIdleᐹАᝋ۞ેҖჰĄ ፟ॡેҖĄWindows̙֭ົ̚ᕝ׎΁۞ેޞtpIdle ેҖჰΪдր௚ నؠࣃ ᐹАᝋ ܑ13.1 ેҖԔ۞ᐹАᝋ ٙϯĈ дᇤᆷ Windows ᑕϡ඀ёॡĂPriority ࣃົརд˛࣎̂̈۞ડાĂтܑ 13.1 І۞ᐹАᝋĂኛଋనؠ׎ Priority পّĄ!ۏેҖჰ ࢋՐ۞̍үĂֹ҃ϡҲᐹАᝋֽેҖ׎΁۞̍үĄࡶຐࢋܑϯޘેҖॡมໂ ଀۞ᐹАᝋĄֹϡ੼ᐹАᝋ۞ેҖԔֽ఍ந၆פม۞ଵ඀ॡĂેҖჰٙᅮࢋ ᐹАᝋ(Priority)΃ܑ඾үຽր௚၆ᑕϡ඀ё̚۞ٙѣેҖԔĂซҖ CPU ॡ ޽ؠ࿰న۞ᐹАᝋ Җჰ۞г͞Ą!ેٸĂߏӎᅮࢋҋજᛖޢдιેҖඕՁځ̈́޽ ࣃ۞඀ёቅĄ఺˵ߏଋΞͽϡֽ޽ؠેҖჰ۞࿰నᐹАᝋĂͽؕܐᆷనؠ׎ ӘొЊĂ֭д၁үొЊᇤކҖჰᙷҾ۞ેזёΐבၹޙĄԯາ۞ڱ͞ Create ࣃ۞඀ёĂ֤ଋυืᖬᆷؕܐଋᅮࢋᇤᆷϡֽనؠາેҖჰᙷҾ̝ڍт ІۏҖჰે̼ؕܐ !Ąځౢ༼̚ΐͽᄲ۞˭غ඀ёቅĄ఺ֱՎូд۞ڱ͞ ଋυื๱ˢ Execute end; end; { дѩ఍ཉˢ඀ёቅ } begin procedure TMyThread.Execute; { TMyThread } implementation end; procedure Execute; override; protected Ә }ކ { ռѣ private ᄃ඀ёనࢍ͘Ίܝ13-4 ˢ ҖჰĄ ௐ˘࣎ેٸдௐ˟࣎ેҖჰ̚ᛖ̖ޢΞͽ૟ FreeOnTerminate నࠎ FalseĂ൒ ଫௐ˘࣎ેҖჰĄଋٸĂ̖ᛖޢࠎѩĂଋಶົԓ୕дௐ˟࣎ેҖჰа็ࣃ̝ Ω˘ેҖჰАа็ࣃĄޞֽᄲĂଋΞਕ଀д˘ેҖჰ̚ેҖߙજү̝݈Ăඈ አĄᓝּם̙࿅Ăᔘߏѣֱॡ࣏ĂેҖჰ۞௣ͤજүυื׶׎΁ેҖჰซҖ পّనؠࠎ TrueĄ! Ąࡶຐ఺ᇹઇĂኛଋԯ FreeOnTerminate۞ٽιҋ̎ĂߏՀΐटٸІҋ̎ᛖۏჰ ߏ఺ᇹ۞ྖĂ֤ឰેҖڍ఼૱ᑕϡ඀ё၆পؠ۞ેҖჰߏΪેҖ˘Ѩ۞Ąт Җჰેٸߏӎᅮࢋᛖځ޽ end; Priority := tpIdle; inherited Create(CreateSuspended); begin constructor TMyThread.Create(CreateSuspended: Boolean); ᑕϡ඀ё̝׎΁үຽ۞ેҖĈזёĂι̙ᑕྍ̒ᕘב ၹޙâ࣎׍ѣྵҲᐹАᝋ̝ેҖࡦഀүຽેҖჰ۞˞ځᄲܮ඀ёቅ۞˭غ !γొְІ۞ેҖჰĂనؠࠎྵ੼۞ᐹАᝋĄޞඈ Њॡมొ̂܅ၗĄٙͽ౵рΪԯֱ֤ົې۞׎΁ેҖჰརˢĶ੹ዴ(starve)ķ ᅮࢋ CPU ࢍზ̍ү̝ેҖჰ۞ᐹАᝋనࠎ౵੼Ăົֹ଀ᑕϡ඀ё̚૱ܧᛋӘ ԯ Ąځ଀Հྎ௟۞ᄲפĂͽځTThread ᄃ Priority ቢ˯ᄲ ۞ۍ ኛଋણ҂ CLX ۞পّࣃĄд Linux ˯ĂPriority ࣃ࠰ࠎፋᇴࣃĂດ̈۞ᇴф׎ᐹАᝋດ੼Ą ො дᇤᆷ CLX ᑕϡ඀ёॡĂଋ଀ͽ̙Т۞඀ёቅֽ޽ؠ Windows ᄃ Linux ˯ tpTimeCritical ౵੼ᐹАᝋĄ tpHighest ેҖჰͧπ૱ેҖჰ۞ᐹАᝋк˟Ą tpHigher ેҖჰͧπ૱ેҖჰ۞ᐹАᝋк˘Ą tpNormal ેҖჰ׍ѣπ૱۞ᐹАᝋĄ నؠࣃ ᐹАᝋ ᇤᆷкેҖჰ඀ё 13-5 ĄڱҖ็ˢ۞͞ે̖ޢ͹ࢋેҖჰซˢੈिਫ਼઻ޞSynchronize ົඈ end; M Synchronize(PushTheButton); M begin procedure TMyHread.Execute; M end; Button1.Click; begin procedure TMyThread.PushTheButton; ۞૱ёĄּтĈ! Ψ఺࣎፾ϲײ̚ڱ͞ ેҖٙᅮજү۞፾ϲ૱ёĄ҃дેҖჰ۞ Synchronize ϲ˘࣎ϡֽޙѩ̒ᕘĄࡶຐࢋֹϡ͹ࢋેҖჰĂኛكІົۏ֤ଋಶ̙υፉ͕ Ăڱιࣇ۞পّ֭ેҖιࣇ۞͞פІΪдಏ˘۞ેҖჰ̚Ăхۏٙѣ۞ڍт ٙѣ Windows ੈिĄ۞ז ІĄѩેҖჰົ఍நଫᑕϡ඀ё̮̚Іٙତќۏ ிк۞ VCL ٕ CLXפͽх నؠ͹ࢋ۞ેҖჰĂᖣົܮ఺࣎நϤĂٺͽ֨ͤ׎΁ેҖჰֽΐͽֹϡĄૄ ధкֹϡ੃ጸវ۞જүĂ҃఺ֱ੃ጸវΞਕ՟ซҖ᜕ܲજүĂזΞਕົેҖ Ăڱ఺ֱপّ׶͞פᙋдેҖჰֹ̚ϡιࣇߏщБ൑ཱ۞Ą఺˵ಶߏᄲĂх ̙֭ܲڱІ۞পّ׶͞ۏІॡĂ఺ֱۏІߛၹ̚۞ۏ ༊ଋֹϡ VCL ٕ CLX ֹϡ͹ࢋ VCL/CLX ેҖჰ Җ໛఼Ą! Т࠹Т۞ેҖ඀Ԕ۩มĂٙͽଋ˵ΞͽֹϡВϡ۞੃ጸវֽ׶׎΁ેҖჰซ ΁ેҖჰֹٙϡ۞੃ጸវ۩มĄдΩ˘͞ࢬĂЯࠎેҖჰ׶׎΁۞ેҖჰВ ፾ϲ۞඀ёߏѣᕇ̙͉˘ᇹ۞ĄЯࠎଋυืቁؠ̙ົᖬᆷଫдᑕϡ඀ё̚׎ ё׶ᇤᆷבѩมВϡ඾࠹Т۞ેҖ඀Ԕ۩ม̝γĄᇤᆷેҖჰكůੵ˞ιࣇ ёĄଋΞͽԯιຐညјߏϤᑕϡ඀ёٙୁજ۞඀ёבӈࠎેҖჰڱ͞ Execute ёבᇤᆷેҖჰ ᄃ඀ёనࢍ͘Ίܝ13-6 ˢ ώůTThreadList ֽആ΃ TListĄۍჰֹ̚ϡ۞Ω˘࣎ І̙֭ਕۡତдેҖჰֹ̚ϡĂҭଋΞͽֹϡΞۡତдેҖۏy ᔵ൒ҚЕ Іķ˘༼)Ąۏγజֹϡ(ኛଋણዦд13-9ࢱ۞Ķᗆؠ̝ڱ͞ д SynchronizeטІΞͽᖣϤᗆؠ፟ۏTDrwaing(่ CLX)ٕ TIconĄ൪ο TFontăTPenăTBrushăTBitmapăTMetaFile(่ VCL ̖ѣ)ă פҖჰ̚Ăх Җჰ̝˯Ąଋ̙ᅮࢋֹϡ͹ࢋ VCL ٕ CLX ેેٺІΞщБгϡۏy ဦԛ Җჰ̝˯ĄેٺщБгϡڱ൑ีטy ଠ ซ˘ՎྤੈĂኛଋણ҂ௐ 26 ౢ۞Ķგநк࣎ sessionsķ˘༼Ą д BDE-enabled ᑕϡ඀ё̚Ăֹϡྤफ़ऱ sessions ລ੨ֹϡેҖჰ۞ٺᙯ Ψ˞Ą!ײफ़ะ̚۞᛼Ҝྤफ़ಶ̙ᅮࢋТՎྤפΨĄҭхײͽ फ़ะ఺ᙷ۞જүĂֹϡТՎ۞͞ёֽΐྤזඕాีטপّĂֽԯྤफ़ଠ І̝ DataSet ۞ۏΨĄЯѩĂଋ̪ᅮࢋᖣϤనؠྤफ़໚ײ۞ีטຏۢଠ ĂΒ྅ٙѣ၆ྤफ़̚ڱ͞ ІॡĂଋ̪଀д Synchronize̮פдֹϡྤफ़х Җჰ˯ĄેٺІ࠰ΞщБгϡ ҖჰĄADO ᄃ InterBaseExpress ̮ેٺΞщБгϡܮᆃ dbExpress ̮І ҖჰĂ֤ેٺdbExpress ҃֏ĂΪࢋᇄથ۞ϡ͗ბ඀ёऱߏΞщБгϡ Җჰ˯Ą၆ેٺщБгϡڱ۞ Access ᜭજ඀ёॡ݋ࠎּγĂι֭൑ ҃֏ĂՏ࣎ેҖჰౌυืጾѣҋ̎૞ᛳ۞ session ̮ ІĄҭ ֹ ϡ Microsoft Җჰ۞ĂΪࢋĈ၆ BDE-enabled ྤफ़ะેٺІߏΞщБгϡ̮פy ྤफ़х Ĉڱ͞ Synchronize זᅮࢋֹϡ̙֭˭ڶिਫ਼઻ĄٙͽĂଋд˭Еଐ VCL ٕ CLX ેҖჰซˢ׎ੈ ޞυ౅࿅ Synchronize ֽેҖજүĂ˵̙υඈ Ă఺ᇹ̄ઇΞͽ೩̿ેҖड़தĄЯࠎߊ̙ڱ͞ ॡĂኛᔖҺֹϡ Synchronize Җჰ(thread-safe)ેٺІΞజщБгֹϡۏ۞(thread-aware)Ą༊ଋۢ྽ߙ Іߏѣਕ˧ۢ྽ેҖჰхдۏ̙֍଀଀дٙѣಞЪౌֹϡ͹ࢋેҖჰĄѣֱ ĄפІ۞хۏ ሀё۞ᑕϡ඀ё᜕ܲ̚၆ VCL ٕ CLX Ăညߏᙯᔣડા(critical section)Ăᖣͽд͹ଠטྻүĄଋυืֹϡ׎΁۞፟ д͹ଠሀё۞ᑕϡ඀ё̚ڱො Яࠎ Synchronize ֹϡ۞ߏੈिਫ਼઻Ăٙͽι൑ ᇤᆷкેҖჰ඀ё 13-7 ԯેҖჰ۞ Terminated পّనؠࠎ TrueĄົڱ͞ ĄTerminateڱ͞ Terminate ΨײTerminated পّӈΞĄ༊׎΁۞ેҖჰྏ඾ࢋඕՁଋ۞ેҖჰॡĂιົ ଋΞឰ׎΁ેҖჰֽӘ෦ଋેҖჰĂߏӎᑕྍඕՁેҖĂΪื౅࿅ᑭߤ γొ۞୧ІјϲॡĂ̖ົඕՁ۞ેҖჰĄ! үĂ֭дιԆјॡ̖͞ઃͤ۞ሀёĄ൒҃Ăѣॡ࣏ᑕϡ඀ёົᅮࢋ˘࣎ਕд ߏેҖჰેҖপؠ̍ܮІķ˘༼)֭ͷົ޺ᜈેҖҌ Execute ඕՁࠎͤĄ఺ۏ ΨॡฟؕેҖ(ኛଋણዦд13-14ࢱ۞ĶેҖેҖჰײజڱ͞ ેҖჰд Execute Ϥ׎΁ેҖჰᑭߤώ֗ߏӎඕՁ фҚĂ˵̙ਕүࠎેҖჰડાតᇴĄ!ܜညߏ फ़ݭၗĂྤ۞טેҖჰડાតᇴĄֱ֤҃ଳϡᆷˢॡኑᄦ(Copy-on-write)፟ Әࠎކёតᇴ̙ਕజבӘБાតᇴĄ޽ᇾ׶ކд threadvar ડ߱̚Ăଋ่ਕ ࣎ҾેҖჰֽᄲĂ݋тТБાតᇴ˘ਠĄ! Ә˞˘࣎Ăдᑕϡ඀ё̚۞Տ࣎ેҖჰ࠰ࠎռѣ۞ፋᇴݭၗតᇴĂҭ၆ކܮ ; x: Integer threadvar ӘેҖჰડાតᇴĄּтĂ!ކthreadvar ડાĂᖣͽ ٺӘཉކӘࠎેҖჰડા(thread-local)តᇴֽԆјĄኛଋԯតᇴކԯតᇴ ֱតᇴ˫̙ࢋд࠹ТેҖჰᙷҾ۞׎΁ᇹּ̚ВϡĄࡶຐтѩĂଋΞͽᖣϤ ൒҃Ăѣॡ࣏ଋΞਕົᅮࢋĂֹϡдેҖჰ̚Ξͽֹϡ۞БાّតᇴĂҭ఺ Ą!טѣ˧۞፟ Җჰ̝ม۞໛఼Ă೩ֻ˞˘࣎ૻેٺ۞БાّតᇴĄְ၁˯ĂБાّតᇴ၆ ٙѣפᇴĂಶည׎΁۞ Object Pascal ૱ё՟ѣ̦ᆃ׌ᇹĄ఺ֱ૱ё˵Ξͽх Ψ۞Їң૱ё˘ᇹĂΞͽጾѣҋ̎۞ડાّតײĂ׶׎ٙڱ͞ ଋ۞ Execute ֹϡેҖჰડાតᇴ Ψ۞જүߏщБ൑ᇋ۞ĄײڱቁܲдࡦഀેҖჰ̚ĂซҖ͞ ၗ۞ॡ࣏˞(ּтĂд OnIdle ְІ఍ந඀Ԕ̚)Ą఺ᇹΞͽې඀ёдยཉٺ࿅ Ψ CheckSynchronize ۞౵ָಞٙĂంײཉٸჰĂ׶͹ેҖჰซҖТՎજүĄ ёĂΞͽឰࡦഀેҖ۞ኜેҖב Ψ CheckSynchronizeײؠഇгд͹ેҖჰ̚ ᄃ඀ёనࢍ͘Ίܝ13-8 ˢ ۞ࣃ)̙ΞͽֹϡЇңેҖჰડાតᇴĄ ଋຐࢋ͹ࢋ VCL ٕ CLX ેҖჰܧy ଋд OnTerminate ְІ఍ந඀Ԕ̚(ੵ ඾׌ІְĈקιߏдᑕϡ඀ё۞͹ࢋ VCL ٕ CLX ેҖჰ̚ેҖ۞Ą఺ຍ OnTerminate ְІ఍ந඀Ԕ̙֭ົజ༊јેҖჰ۞˘ొЊֽેҖĄ࠹ͅ۞Ă д OnTerminate ְІ఍ந඀Ԕ̚ĂಶਕቁܲιυؠົజેҖĄ!ٸԯ୻ੵ඀ёቅ Җ࿅඀ࠎңĂે۞ڱ͞ ᙯౕ̝݈Ăົᛈ൴ OnTerminate ְІĄ̙ኢ Execute ଋΞͽԯдેҖჰඕՁॡĂٙᅮࢋ۞࠹ᙯ୻ੵ඀ёቅะ̚д˘੓ĄдેҖჰ ᇤᆷ୻ੵ඀ёቅ end; end; { ఍நּγ } except PerformSomeTask; while not Terminated do try begin procedure TMyThread.Execute; Ĉ̚ڱ͞ Execute ଋ۞זёٙ̚൴Ϡ۞ּγĂኛ૟ try…except ડ߱ΐבࡶଋຐॏ॓дેҖჰ ጱ࡭ેҖॡഇ۞᏾ᄱĂТॡᑕϡ඀ё˵ົઃͤેҖĄ ົܮѩ˘ּγĄΞߏ༊ଋ۞ᑕϡ඀ёдઍ᏾ጡ̝γેҖॡĂѩּγזົॏ॓ ពĂЯࠎፋЪฟ൴ᒖဩځᄱĄ༊ଋ൴णᑕϡ඀ёॡĂ఺࣎᏾ᄱΞਕ̙ߏໂࠎ ࿁ఢ۞᏾פѣΞਕጱ࡭хܮё̚۞ּγĂ֤ᆃଋ۞ᑕϡ඀ёב൴ϠдેҖჰ זଋ՟ѣॏ॓ڍυืࢋਕૉॏ॓ٙѣ൴ϠдેҖჰ̚۞ּγĄтڱ͞ Execute ё̚఍நּγבдેҖჰ end; PerformSomeTask; while not Terminated do begin procedure TMyThread.Execute; Ą˭ࢬ۞ּ̄Ә෦ଋтңઇĈ!ڱ͞ ᅮࢋ౅࿅ᑭߤ׶аᑕ Terminated পّĂֽ၁ү Terminateڱ͞ ଋ۞ Execute ᇤᆷкેҖჰ඀ё 13-9 Ă̖ົྋฟᗆؠĄޢΨԆБ̽੨ײΨ׶ᗆؠ۞ײྋฟ ࣎˘۞ޢĄдТ˘࣎ેҖჰ̚౵۞ېΨΞͽߏ૰ײ۞ ׶ TThreadList.LockList Ψ UnLockList ̖ົྋฟֻ׎΁ેҖჰֹϡĄ၆ TCanvas.LockײזҚЕĂۡ ІĂТॡ˵ົ֨ͤ׎΁۞ેҖჰֹϡྍۏΨ TThreadList.LockList ົа็ҚЕ ײІĂTThreadListĄۏVCL ᄃ CLX ˵ӣѣΞͽдેҖჰ̚ҋϤֹϡ۞ҚЕ Ą!ڱ͞ ൪ο۞ Lockפϡֽ֨ͤ׎΁ેҖჰх ĂΞ݈̝ڱ͞ Ψ Unlockײ׍ѣ˘࣎д(ۏІ(TCanvas ׶׎ࢉϠۏּтĂ൪ο ІᇹּĄۏྍפᗆؠΑਕĂͽ֨ͤ׎΁۞ેҖჰх۞ޙІ׍ѣ̰ۏѣֱ Іۏᗆؠ р఍Ą!۞זঐ˞ֹϡкࢦેҖჰٙਕ଀ٯ ᇶઃ˞׎΁̙֭ᅮࢋᇶઃ۞ેҖჰĄ఺ᇹઇົౄјેҖड़தᚑࢦгࢫҲĂ֭ ҖჰԆјٙࢋ۞જүࠎͤĄચυࢋ͕̈Ă̙ࢋેזઃ׎΁ેҖჰ۞ેҖĂۡ ІٕតᇴॡĂᔖฟ׶׎΁ેҖჰ۞኏ࡎĂଋΞਕ଀ᇶۏБાّפࡶຐࢋдх פᔖҺТॡх ؠĄ!҃ڍҖ̝̍ү۞ඕ ІٕតᇴĄѩγĂдߙ࣎ેҖჰ̚۞඀ёቅĂΞਕ଀ॲፂд׎΁ેҖჰٙે ۏ̝ેҖჰ۞ҖࠎĄপҾߏࢋᔖҺ׌࣎ેҖჰĂТॡྏ඾ֹϡ࠹Т۞Бાّ ׎΁ΞਕТॡેҖזдᇤᆷેҖჰેҖॡٙࢋેҖ۞඀ёቅॡĂଋυื҂ᇋ አેҖჰם ჰķ˘༼Ą Ăኛણዦд13-5ࢱ۞Ķֹϡ͹ࢋ VCL/CLX ેҖځ͹ેҖჰ۞ซ˘Վᄲٺᙯ ІĂ̙υፉ͕ιົ׶׎΁۞ેҖჰயϠ኏ࡎĄۏ CLX Їң̮І׶ VCL ٕפҋϤгхޝy д OnTerminate ְІ఍ந඀Ԕ̚Ξͽ ᄃ඀ёనࢍ͘Ίܝˢ 13-10 פధк࣎ેҖჰТॡ᝝̯ܮ˘ᇹĂҭΪࢋߏ՟ѣЇңેҖჰຐᆷˢྤफ़Ăι І׶ᓜࠧડાۏϡ TMultiReadExclusiveWriteSynchronizer ֽΐͽ᜕ܲĄ఺࣎ ᆷˢ۞Бાّ੃ጸវॡĂଋΞͽֹ͌ޝĂҭפ༊ଋጾѣ˘ֱેҖჰົ૱૱᝝ Ă֭՟ѣЇңПᐍĄ!פ࠹Т۞੃ጸវѣк࣎ેҖჰТॡซҖྤफ़᝝ ІٕតᇴĄΪࢋ՟ѣેҖჰົᆷˢྤफ़Ăۏᆷˢྤफ़۞͌ޝ׎ྤफ़Ăҭפ૱᝝ ଋጾѣ˘࣎υื૱ڍĂΞਕ෹΍ଋ۞ᅮࢋĂপҾߏтޘጸវĄ఺჌᜕ܲ۞ૻ ༊ଋֹϡᓜࠧડા᜕ֽܲБાّ੃ጸវॡâѨΪѣ˘࣎ેҖჰΞͽֹϡ੃ ͷଵγᆷˢ۞ТՎጡפֹϡкࢦ᝝ end; LockXY.Release; finally Y := sin(X); try LockXY.Acquire; { ᗆؠͽ֨ͤ׎΁ેҖჰֹϡ } Ψ۞඀ёߛၹֹֽϡĈײ၆ᓜࠧડા˭ غĂ݋Їңֹϡ X ٕ Y ۞ેҖჰĂυืͽᙷҬפ၆Бાّតᇴ X ׶ Y ۞х ּтĂ઄న˘࣎׍ѣБાّᓜࠧડાតᇴ LockXY ۞ᑕϡ඀ёĂιυื֨ͤ ॡ൴ϠયᗟĄפវĂ҃дТॡх Бાّ੃ጸפΨ Acquire ֽхײүϡĄ̙გᓜࠧડા۞ેҖჰĂົЯࠎ՟ѣ ࠹ᙯ۞Бાّ੃ጸវॡĂ̖ѣפᛋӘ ᓜࠧડાΪѣдՏ࣎ેҖჰౌֹϡιࣇֽх Бાّ੃ጸវĄפΨ Acquire ֽх ײĂрឰ׎΁ેҖჰΞͽᖣϤڱ͞ Ψ ReleaseײдֹϡιĄдԆјॡĂેҖჰ Ăֽቁؠ՟ѣ׎΁۞ેҖჰϒڱ͞ ّ੃ጸវ۞ેҖჰĂυืАֹϡ Acquire ྍБાפՏ˘࣎ᓜࠧડાĂౌ׶ଋٙࢋ᜕ܲ۞Бાّ੃ጸវٙᙯĄՏ࣎ࢋх Acquire(֨ͤ׎΁۞ેҖჰેҖ఺࣎߱ར)׶ Release(ொੵ֨ͤ۞ᗆؠ)Ą! Ăڱϲ˘࣎Бાّតᇴ TCriticalSectionĄTCriticalSection ׍ѣ׌࣎͞ޙኛ ĄࢋֹϡᓜࠧડાĂܝડા۞ྻүĂಶည˘࣎˘ѨΪ̯ధ˘࣎ેҖჰซˢ۞ ᗆؠĂଋᔘΞͽֹϡᓜࠧડા(Critical Section)Ąᓜࠧ۞ޙІ̙͚೯̰ۏڍт ϡᓜࠧડાֹ ᇤᆷкેҖჰ඀ё 13-11 ΁ેҖჰӘۢι̏Ԇј˞̍үĄ ׎ޞԆјٙેҖ۞̍үĂٕ۰˵Ξͽඈغ׎΁ેҖჰၔޞͤેҖĄଋΞͽඈ ׎΁۞ેҖჰԆјߙֱ̍үĂଋΞͽӘ෦ેҖჰᇶॡઃޞҖჰυืඈેڍт ׎΁۞ેҖჰޞඈ д13-7ࢱ۞ĶֹϡેҖჰડાតᇴķ˘༼Ą! ĂኛણዦځҖჰડાតᇴ۞ซ˘ՎᄲેٺؠĂͽ֨ͤ׎΁۞ેҖჰֹϡĄᙯ ᗆޞតᇴֽആ΃БાّតᇴĄֹϡેҖჰડાតᇴĂଋ۞ેҖჰಶ̙ᅮࢋඈ Бાّ੃ጸវ՟ѣυࢋдЧ࣎ેҖჰ̝มВϡĂኛଋ҂ᇋֹϡેҖડાڍт д13-5ࢱ۞Ķֹϡ͹ࢋ VCL/CLX ેҖჰķ˘༼Ą Ăኛણዦځ͹ࢋ VCL/CLX ેҖჰ۞ซ˘ՎᄲٺІֹϡ۞੃ጸវĄᙯۏ CLX ٙѣ˵జд׎΁ેҖჰ̝ VCL ٕפІĂ̙ົมତгхۏࢋેҖჰΞͽቁܲ ІॡĂኛֹϡ͹ࢋેҖჰֽેҖ඀ёቅĄֹϡ͹ۏ۞̚ дֹϡ VCL ٕ CLX Вϡ੃ጸវ۞׎΁ԫμ ጱ࡭યᗟĄٽॡĂಶȈ̶टפჰâόѣ׌࣎ેҖჰͽ˯Тॡх Бાّ੃ጸវ۞ેҖפΨ BeginRead ׶ BeginWrite ಶۡତхײՎጡҭ՟ѣ ˘࣎БાТՎጡតᇴॡ̖ѣүϡĄࡶѣѩᅮՐҭϏֹϡТՎጡĂٕ۰ֹϡТ ଵγᆷˢТՎጡĂΪົдՏ࣎ેҖჰౌֹϡТפᛋӘ ಶ׶ᓜࠧડા˘ᇹĂкࢦ᝝ ੃ጸវ۞ેҖჰಶਕฟؕજүĄפ᝝ޞĂ఺ᇹඈڱ ͞ Ψ EndWriteײ੃ጸវ̚Ą༊ેҖჰԆјᆷˢ੃ጸវજүĂኛזԯྤफ़ᆷ फ़ăٕྤפĄBeginWrite ቁܲ՟ѣેҖჰϫ݈ϒд᝝ڱ͞ Ψ BeginWriteײА ĄЇңᅮࢋᆷˢ఺๴੃ጸវ۞ેҖჰĂυืڱ͞ Ψ EndReadײ੃ጸវજүĂ פ੃ጸវ̚Ą༊ેҖჰԆј᝝זBeginRead ቁܲ՟ѣેҖჰϫ݈ϒԯྤफ़ᆷ Ąڱ͞ Ψ BeginReadײ఺࣎੃ጸវ۞ેҖჰĂυืАפ੃ጸវĄᅮࢋ᝝ TMultiReadExclusiveWriteSynchronizer БાតᇴĂᙯᓑҌଋࢋ᜕ܲ۞Бાّ ଵγᆷˢ۞ТՎጡĂኛଋ૟פଋຐࢋֹϡкࢦ᝝ڍт TMultiReadExclusiveWriteSynchronizer ᜕ٙܲ۞੃ጸវĄ ᝋĂ̖ਕԯྤफ़ᆷˢϤפ੃ጸវĄ҃ࢋᆷˢྤफ़۞ેҖჰಶυืጾѣଵγх ᄃ඀ёనࢍ͘Ίܝ13-12 ˢ ĄҭଋΞͽдՏ࣎ેҖჰԆјڱ͞ ಏಏֹϡ׎̚ߙ˘࣎ેҖჰ۞ WaitForڱ Ԇј۞ેҖჰĂտౣߏ֤˘࣎ેҖჰĂଋ൑ޢĄЯࠎଋ̙֭୻຾ົ౵ڶېҖ ᇴ࣎ેҖԆјιࣇ۞̍үĂ̙҃გಏ˘ેҖჰ۞ેޞּтĂѣॡ࣏ଋᅮࢋඈ Ąڱ͞ Ăኛଋֹϡ ResetEventཱིܫј˞Ąࡶຐᙯౕ ҖჰĂಶົۢ྽ྻზ̏གྷԆે۞ཱིܫĂٙͽЇңᑭߤྍཱིܫSetEvent ͽχฟ Ψ TEvent.SetEventĄײܮĂιޢдેҖჰԆј׎΁ેҖჰٙᅮࢋ۞ྻზ ٙͽι̖ਕ༊јੈཱི֭ឰٙѣ۞ેҖჰֹϡĄ ϲĂޙІ(TEvent)ᑕྍͽБા۞ቑಛΐͽۏІĄְІۏࢋ఺ᇹઇĂֹϡְІ ҖჰඕՁેҖĄેޞҖჰԆјߙֱྻზĂ̙҃ߏඈેޞѣॡ࣏Ăଋᅮࢋ۞ߏඈ ׎΁۞̍үԆјޞඈ ຍཌྷĄ а็ ReturnValueĄа็ࣃߏፋᇴࣃĄଋ۞ᑕϡ඀ёΞͽҋҖՙؠι۞ڱ͞ ΨॡĂГϤ WaitForײనؠ ReturnValue পّĄତ඾дజ׎΁ેҖჰົڱ͞ а็ЇңࣃĄ࠹ͅ۞ĂExecuteົ̙֭ڱ͞ Execute ۞඀ёቅĂٙͽ Execute ΨײĂ̙҃ߏڍΨ WaitFor ۞ેҖჰຐࢋۢ྽ેҖჰેҖ۞ඕײ൒҃ĂЯࠎ ޽ؠĄֽڱ͞ Җჰ۞ Executeે̝ޞҚЕีϫĄ׎а็ࣃυืϤ׎ٙࢋඈפ ޽΍ҚЕ̏జјΑ۞๱ࣃॡĂ̖ਕхڱ͞ д݈˘ּ࣎̄̚ĂΪѣд WaitFor end; ThreadList1.UnlockList; end; ProcessItem(Items[I]); for I := 0 to Count – 1 do begin with ThreadList1.LockList do begin if ListFillingThread.WaitFor then ІĄ!ۏҖჰ๱ˢેҖჰҚЕ ׎΁ેޞІ̝݈ĂົඈۏдҚЕ̚۞פаĄּтĂ˭Е඀ёቅฟؕхܔົ̖ ҖĂٕЯּγ҃ඕՁॡĂે۞ڱ͞ WaitFor Ϊѣд׎΁ેҖჰԆј׎ Execute Ąڱ͞ ΨેҖჰ۞ WaitForײ׎΁۞ેҖჰԆјેҖ۞̍үĂኛଋޞࡶࢋඈ ׎΁ેҖჰԆјેҖ۞̍үޞඈ ᇤᆷкેҖჰ඀ё 13-13 { னдᚶᜈ͹ેҖჰ۞ેҖĄٙѣЧ࣎̍ү۞ેҖჰ̏གྷԆј˞ } raise Exception; if Event1.WaitFor(20000) <> wrSignaled then ϲ֭ୁજЧ࣎̍ү۞ેҖჰ }ޙ } ;( TaskThread.Create(False for I := 1 to Counter do Event1.ResetEvent; { дୁજેҖჰ̝݈୻ੵְІ } ᚶᜈેҖĈޢҖჰԆј Ă͹ેҖჰߏтңгୁજЧְ࣎ี۞ેҖჰĂ֭дٙѣે˞ځ඀ёᄲ۞˭غ ॡ൴Ϡ᏾ᄱĄޞwrError дඈ Ą˞ٸІ̏జᛖۏwrAbandoned д޽ؠ۞ॡม෹࿅ְ̝݈І ϏనؠĄإཱིܫwrTimeout ̏෹࿅˞޽ؠ۞ॡม҃ ĄཱིܫwrSignaled ̏གྷనؠ˞ְІ۞ а็ࣃ ຍཌྷ ܑ13.2 WaitForа็ࣃ జనؠĂ֭а็дܑ 13.2 ̚۞ࣃĄཱི ܫޞĄWaitFor ົд޽ؠ۞ഇม̰ĂඈཱིܫٙѣેҖჰ̏Ԇј۞ޞඈֽڱ͞ Ψ WaitFor ײ ޢ ࣃăેҖЧ࣎̍ү۞ેҖჰăĂ൒ؕܐ۞ ͹ેҖჰనؠ Counter end; M ၆ࢍᇴጡ۞ᗆؠ }ٸ CounterGuard.Release; { ᛖ ࣎ેҖჰ۞ੈཱི }˘ޢ Event1.SetEvent; { χ΍఺ߏ౵ if Counter = 0 then Dec(Counter); { ᅍഴБાّࢍᇴጡតᇴ } ଀ࢍᇴጡ۞ᗆؠ }פ } ; CounterGuard.Acquire M begin procedure TDataModule.TAskThreadTerminate(Sender: TObject); ჰ۞ᇴϫĄ ҖჰТॡֹϡࢍᇴጡĄCounter ߏ˘࣎БાّតᇴĂϡֽࢍზ̏Ԇј̝ેҖ ІĂͷਕ֨ͤк࣎ેۏࢬ۞඀ёቅĄCounterGuard ߏ˘࣎Бાّᓜࠧડાޢ ĂٙѣυืԆј̝ેҖჰĂ׎ OnTerminate ְІ఍ந඀Ԕځ඀ёቅᄲ۞˭غ Ąཱིܫ̍ү۞ ࣎ેҖჰֹϡనؠְІֽχ΍ιࣇ̏གྷԆј˘ޢॡ௢ΐ˘࣎ࢍᇴࣃĂ֭д౵ ᄃ඀ёనࢍ͘Ίܝ13-14 ˢ SecondProcess.Resume; { னдેҖેҖჰ } SecondProcess.Priority := tpLower; { ԯᐹАᝋనؠࠎͧπ૱Ҳ˘ᕇ } ϲҭ̙ࢋેҖ }ޙ } ;(SecondProcess := TMyThread.Create(True ฟؕેҖેҖჰĈ̖ޢϲેҖჰăనؠι۞ᐹАᝋă൒ޙၗېଋͽᇶઃ ؠ۞Ă֤ᆃኛטҖჰ۞ᐹАᝋĂߏдેҖჰેҖॡ̖ેڍĄ൒҃Ăт˞ځᄲ Җჰķ˘༼̏ࠎଋે̼ؕܐё̚నؠ۞Ą఺д 13-3ࢱ̚۞Ķבၹޙّ݋ߏд CPU ॡมĂߏϤдેҖჰ̍ү̰ٙ̚ؠ۞Ă҃఺ֱপ ۞זેҖჰᑕྍֹϡ ᖬᆷ࿰న۞ᐹАᝋ ٙ࿰ഇ۞аᑕॡมĄזેҖჰ྿ ͽдаᑕߙֱֹϡ۰۞જүॡĂୁજ˘࣎ેҖჰ۞າᇹּĂ఺ᇹਕૉឰՏ࣎ ϲ࠹ТેҖჰݭၗ۞к࣎ᇹּĂͽેҖπҖ۞඀ёቅĄּтĂଋΞޙଋΞͽ ၗĂ֤ଋΞਕࢋֹϡՀ͌۞ેҖჰĄېҖჰߏдજүેڍІĄт γొְޞᇴϫߏ઄నࣃĂ఺ֱેҖჰ̂ొЊົඈטк 16 ࣎ેҖჰĄ఺࣎ࢨ ߏĂдಏ˘఍நጡր௚̚Տ˘࣎఍ந඀Ԕ౵טᛉ۞ࢨޙᜩેҖड़தĄԧࣇٙ ϲ͉к۞ેҖჰĄϡֽგநкࢦેҖჰ۞ᗝγ࢑ፉົᇆޙᛋӘ ̙дࢋᑕϡ඀ё̚ ϲ֭ેҖેҖჰ }ޙ } ;(SecondProcess := TMyThread.Create(false ેҖĈ ϲેҖჰ֭ฟؕޙົܮ඀ё۞˭غCreateSuspended ણᇴؠࠎ FalseĄּтĂ ё۞בၹޙϲӈેҖ۞ેҖჰĂኛଋ૟ޢϲ˘࣎ୁજޙᖣͽฟؕેҖĄࡶຐ ڱ͞ Ψ Resumeײ̖ޢϲેҖჰĂ҃дႬޙᇹּĂٕ۰ଋ˵Ξͽͽᇶઃሀё ĂϲӈેҖેҖჰ۞ޢ඀ёĄଋΞͽдેҖ̝۞ڱ͞ ֹϡιֽୁજ Execute ĂଋಶΞͽд඀ё̚ޢ၁үેҖჰᙷҾֽڱ͞ дଋؠཌྷ˞ેҖჰ۞ Execute ІۏેҖેҖჰ Җჰົϖᅈଭд֤྆Ą! Ăેཱི݈ܫ࿰ഇ۞זઇࠎણᇴࣃĄдֹϡ INFINITE ॡኛ͕̈ĂЯࠎдϏќ ˢ INFINITE็̚ڱ͞ ІĂд WaitForְޞઃͤඈޢଋࢋдপؠ۞ॡมڍො т ᇤᆷкેҖჰ඀ё 13-15 ĄځThread Status ෛ඄۞௟༼Ăᄲણዦቢ˯ᄲ ٺᙯ ٙа็۞ࣃĄ! Ψ BeginThreadײߏᖣϤܮІĂ֤ᆃՏ࣎ેҖჰ۞ IDĂۏଋ՟ѣֹϡેҖჰڍ ߏ ThreadID পّ۞నؠࣃĄтົܮ ІĂ֤ᆃેҖჰ IDۏଋֹϡ۞ߏેҖჰ ڍThread Status ͞๴ົֶፂેҖჰ۞ IDĂЕ΍д඀ё̚۞ٙѣેҖჰĄт Ă˭˘࣎ՎូٕેҖ۞ྻზಶົߏ׶ྍેҖჰѣᙯ۞Ąޢ۞ેҖჰ ቅҜཉĂٕԯΩ˘࣎ેҖჰតјϫ݈ેҖჰ۞׻΄ĄдԯેҖჰᇾϯࠎϫ݈ ၆ᑕ۞ࣧؕ඀ёזၗ͞๴˯޷˭໣ဂΠᔣĂᖣͽԱې ၗĄд Threadsېჰ۞ ពϯ΍Տ࣎ેҖົܮၗېдੵ᏾ְІ൴Ϡॡ(̚ᕝᕇăּγăᇶઃ)ĂેҖჰ View | ThreadsĄ פၗ͞๴Ăኛд͹Αਕܑ̚Ᏼې ҖჰĄࢋពϯ Threads ӄ੠ᖸ֭఍நдᑕϡ඀ё̚۞ٙѣેםၗ͞๴ֽې ᕘĄଋΞͽֹϡ Threads ໂࠎӧזٕд̚ᕝᕇᇶઃॡࢋҿᕝտౣߏ֤˘࣎ેҖჰдેҖĂΞਕົຏ ၗĂې၆кેҖჰᑕϡ඀ёซҖੵ᏾ॡĂࡶࢋ੠ᖸٙѣТॡેҖ̝ેҖჰ۞ ၆кેҖჰ඀ёซҖੵ᏾ ؠഇ۞ᑭߤ Terminated পّĂ֭д Terminated ࠎ True ॡઃͤેҖĄົܮ Ă֤ᆃιڱ͞ ଋ̏ዋ༊г၁ү˞ ExecuteڍTerminated পّనؠࠎ TrueĄт Ăૻ࢝̚ᕝેҖĄTerminate ົԯેҖჰ۞ڱ͞ Ψ TerminateײଋΞͽ Ψ Suspend Ѩᇴ݈ĂેҖჰ̙ົᚶᜈેҖĄײזϏ྿إ۞Ѩᇴ Ψ Resume ײΨ Suspend ׶ ResumeĄײ௢ΐ̰ొ۞ࢍᇴጡĂٙͽଋΞͽкѨг ĄSuspend ົڱ͞ Ψ ResumeײĄ҃дΞͽᚶᜈેҖॡĂڱ͞ Ψ Suspendײଋ ેҖჰдιඕՁેҖ̝݈Ξͽୁજ׶ઃͤЇຍѨᇴĄࡶຐᇶॡઃͤેҖĂኛ ฟؕ׶ઃͤેҖჰ Ąځ଀Հྎ௟۞ᄲפĂͽځTThread ᄃ Priority ቢ˯ᄲ ۞ۍ ੼Ąኛଋણ҂ CLX ˯۞পّࣃĄд Linux ˯ĂPriority ࣃ࠰ࠎፋᇴࣃĂດ̈۞ᇴф׎ᐹАᝋດ ො дᇤᆷྭπέᑕϡ඀ёॡĂଋ଀ͽ̙Т۞඀ёቅֽ޽ؠ Windows ᄃ Linux ᄃ඀ёనࢍ͘Ίܝ13-16 ˢ FType: LongWord; // must be 0x1000 TThreadNameInfo = record type {$IFDEF MSWINDOWS} //------------------------------------------------------------------------ Ĉڱ ͞ 3 д implementation ߱ར̚Ăΐˢ TThreadNameInfo ੃ᐂᄃ SetName //------------------------------------------------------------------------ end; procedure!Execute; override; protected procedure SetName; private TMyThread = class(TThread) type //------------------------------------------------------------------------ ΐҌଋ۞ેҖჰᙷҾ̚Ĉڱ͞ 2 д interface ߱ར̚Ă૟ SetName //------------------------------------------------------------------------ Classes {$IFDEF MSWINDOWS} , Windows {$ENDIF}; uses //------------------------------------------------------------------------ ӘࠎĈކଋેҖჰಏ̮۞ uses ̄ή̚Ăז1 ૟ Windows ಏ̮ΐ ូĂ૟׎ᖼೱࠎ׍Щ۞ેҖჰĄ ϲଋ۞ેҖჰᙷҾĂ֤ᆃኛֹϡ˭ࢗ۞ՎޙώֽۍDelphi 6 ٕՀѝ̝݈۞ ଋֹϡڍଋΞͽ૟̙׍Щ۞ેҖჰᖼೱјࠎ׍Щ۞ેҖჰĄᓝּֽᄲĂт ૟̙׍Щ۞ેҖჰᖼೱࠎ׍Щ۞ેҖჰ ො ଋΪਕд VCL ᑕϡ඀ё̚ࠎેҖჰ׻ЩĄ Ąڱ͞ Ψ SetNameײАົܮؕેҖॡĂι ଋ۞ેҖჰᙷҾ̚Ą༊ેҖჰฟזΐڱ͞۞ ࠎેҖჰ׻Щົ૟Щࠎ SetName ޷˭ OKĄޢ๴ăᏮˢેҖჰЩჍă൒͞פNamed Thread ८ ˞ פϲາ۞ેҖჰᙷҾॡĂੵ˞ᏮˢᙷҾ۞ЩჍ̝γĂТॡ˵८ޙ၆ྖ͞๴̚ ࣎ેҖჰĂٙͽଋΞͽҋҖࠎଋ۞ેҖჰᙷҾ׻ЩĄ༊ଋд Thread Object ડ̶΍տౣߏ֤ٽЯࠎಏያ Thread Status ͞๴̚۞ેҖჰ IDĂ၁дߏ̙ट Җჰ۞׻Щે ᇤᆷкેҖჰ඀ё 13-17 ેҖॡഇࠎ̙Т۞ેҖჰᇹּĂ޽ࠁ̙Т۞ЩჍĂΪࢋֶೈ˭ࢗ۞ՎូӈΞĈ ٙѣ࠹ТેҖჰᙷҾ۞ેҖჰᇹּౌົ׍ѣ࠹Т۞ЩჍĄ̙࿅Ăଋ˵Ξͽд ޽ؠ̙Т۞ЩჍග࠹Ҭ۞ેҖჰ //------------------------------------------------------------------------ end; { ԯેҖჰ۞඀ёቅᑣд఺׊ } SetName; begin ---------------------------------------------------------------- procedure TMyThread.Execute; //-------- ΨĈײ۞ڱ͞ ฟؕ۞г͞Ăΐˢ၆ SetName˘ڱ͞ 4 дଋેҖჰ Execute ϯેҖჰ۞ЩჍĄ д Thread Status ͞๴۞ેҖჰ ID ᛼Ҝ̚ĂពົܮซҖੵ᏾ॡĂੵ᏾ጡ ੵ᏾ጡົᑭෛּγĂ֭ͷдଋٙ็ˢ۞ඕၹ̚ຩವેҖჰ۞ЩჍĄдଋ ො ኛ૟ TThreadNameInfo నࠎଋેҖჰᙷҾ۞ЩჍĄ //------------------------------------------------------------------------ end; {$ENDIF} end; except @T meInfo ); hreadNa RaiseException( $406D1388, 0, sizeof(ThreadNameInfo) div sizeof(LongWord), try ThreadNameInfo.FFlags := 0; ThreadNameInfo.FThreadID := $FFFFFFFF; ThreadNameInfo.FName := 'MyThreadName'; ThreadNameInfo.FType := $1000; {$IFDEF MSWINDOWS} F} begin {$ENDI ThreadNameInfo: TThreadNameInfo; var {$IFDEF MSWINDOWS} procedure!TMyThread.SetName; { TMyThread } {$ENDIF} end; FFlags: LongWord; // reserved for future use, must be zero FThreadID: LongWord; // thread ID (-1 indicates caller thread) FName: PChar; // pointer to name (in user address space) ᄃ඀ёనࢍ͘Ίܝ13-18 ˢ ༼Ą c ޭೇેҖჰ۞ેҖĄኛણ҂д13-15ࢱ̚۞Ķฟؕ׶ઃͤેҖჰķ˘ b ޽ࠁ׎ЩჍĂּт MyThread.ThreadName := ‘SearchForFiles’; ˘༼Ą ІķۏϲĄኛણ҂д13-14ࢱ̚۞ĶેҖેҖჰޙၗֽΐͽېa ͽᇶઃ۞ ІॡĈۏ3 ༊ଋயϠેҖჰ ThreadNameInfo.FName := ThreadName; Լࠎ ThreadNameInfo.FName := 'MyThreadName'; Ă૟̚ڱ͞ 2 д SetName property ThreadName: string read FName write FName; ఍ӈΞĈ ᙷҾ۞ؠཌྷזҖჰᙷҾĂΪࢋ૟˭ࢗ۞̰टΐેז૟ ThreadName পّΐ 1 ּγ఍ந 14-1 ͷؠཌྷ၆ྍ᏾ᄱ۞аᑕߏइϡྍፋ࣎ડ߱Ą дТ˘࣎ડ߱̚Ă֭׀ᄱౌаᑕ࠹Т۞˘ాҚୃࢗॡĂଋΞͽ૟఺ֱୃࢗЪ ༊ଋᇤᆷ၆ּγ۞аᑕજүॡĂଋΞͽᆷ˭ᇴ࣎඀ёቅડ߱Ą༊ଋ၆ߙֱ᏾ ᑕů͍׎ߏдֱ֤᏾ᄱΞਕົጱ࡭ྤफ़ٕր௚ྤ໚᏷ε۞ᑕϡᅳાĄ ؠཌྷаޢߏԱ΍᏾ᄱΞਕົ൴Ϡ۞г͞Ă൒ܮੈि͞๴Ą҃ଋ۞̍үĂତ඾ ពϯೡࢗ᏾ᄱ۞ົܮଋ֭Ϗ޽ؠаᑕજүĂ֤ᆃᑕϡ඀ёڍͷΐͽаᑕĄт ࡶຐֹଋ۞ᑕϡ඀ёՀΐᘦ׽Ăଋ۞඀ёቅಶ଀дּγ൴ϠॡΐͽᏰᙊĂ֭ ۞ጱЯĄ ૱Βӣ˞׶ּγᛈ൴࠹ᙯ۞ྤੈĄ఺ֹ଀඀ё۞Ω˘࣎ొЊਕૉ෧ᕝ΍ּγ І఼ۏĂଋᇤᆷϡͽ఍நּγ۞ௐ˘࣎гᕇĄּγזιٙԱזͷឰુᝑаೇ ІĂ֭ۏᛈ൴ּγĂ఺࣎જү΃ܑ඀ёົயϠּγົܮ༊᏾ᄱ൴ϠॡĂ඀ё ੠ᖸă࣒ϒ඀ё˯۞ਙᖪĄ ࿰ഇ̚યᗟ۞൴ଧĂ೩ֻ˞˘࣎ᇾ໤౉शĄТॡĂι˵ឰฟ൴۰ਕૉᏱҾăܧ ּтੵͽ࿬Ăͽ̈́Ξϡ۩ม۞ਈႽඈඈĄּγ఍நࠎ᏾ᄱ۞఍நă࿰ഇٕ̚ ĂΒ߁˞ેҖॡഇ۞᏾ᄱĂڶٙᏜ۞ּγĂߏ˘჌ᅮࢋপҾΐͽ఍ந۞ள૱ଐ γ఍நּ ᄃ඀ёనࢍ͘Ίܝ14-2 ˢ Ψ۞ײγĄּγΞਕߏۡତд try block ̚జ͔൴Ăٕߏ try block ̚ୃࢗٙ ᜕ܲડ߱۞ௐ˘࣎ొЊಶߏ try blockĄtry block ̚۞඀ёቅѣΞਕົ͔൴ּ ᇤᆷ try block ̚ΞਕயϠ۞Տ჌ּγĂౌ೩ֻ׎఍ந඀ԔĄ ኛྎዦд14-9ࢱ۞Ķᇤᆷ௣ͤડ߱ķ˘͛)Ąּγ఍நડાᑕྍ੫၆д try block blockĂኛྎώౢ۞Ķᇤᆷּγ఍ந඀Ԕ̚ķ˘͛)ٕ௣ͤડ߱(finally blockĂ Ăଋ˘ؠࢋତ඾೩ֻּγ఍நડ߱(exception handlingޢ̝ д try block ... {* ඀ё߹඀ົଂ఺׊Ă˵ಶߏ᜕ܲડ̝߱γĂᚶᜈેҖ *} end; E.Min, E.Max, E.Value)); ShowMessage(Format('Expected value between %d and %d, but got %d', on E: EIntegerRange do except SetFieldValue(dataField, userValue); try ົពϯ᏾ᄱੈिĄତ඾඀ё߹඀ົଂડ̝߱γᚶᜈેҖĄ ᜙Ҍּγ఍ந۞ొЊĂд఺࣎ొЊ̚ྯົܮEIntegerRange ּγĂ҃ેҖ߹඀ ൴͔ົܮҖεୀĂ֤ᆃેڱ͞ SetFieldValue ڍĄтڱࠎଋϯቑ׎ᄬܮ Ă֭ͽ except ᙯᔣфࠎࢵĂϡͽ΃ܑ try block ۞ඕՁĄ˭ࢗ۞඀ёቅޢ̝ ଋᑕֹϡ try ᙯᔣфֽୁ᜕ؕܲડ߱Ąּγ఍ந඀Ԕυืϲӈତд try block ொΝĂ҃ਕயϠՀಏ৷ăՀ׍Ξ᝝ّ۞඀ёቅĄ ͹ࢋ߹඀̚۞ڱΞͽ૟᏾ᄱᑭߤᄃ᏾ᄱ఍ந۞જүĂҋଋႊზܮ۞ྻϡĂଋ ྍּγĂ֭ͷ޽ؠЯᑕ۞જүĄ౅࿅ try block ᄃּγ఍ந඀Ԕז॓(catch)ķ Ăּγ఍ந඀ԔజჍઇߏĶॏ˭ڶּγ఍ந඀ԔĂତ඾ᗓฟྍડ߱Ąд఺჌ଐ ொᖼҌ఍நྍᙷݭּγ۞ົܮ۞ߙҖୃࢗ۞ቁ͔൴˞ּγĂ֤ᆃ඀ё۞߹඀ ׎̚ڍtry block ̚Ąт ٺତּγॡĂଋ଀૟Ξਕົ͔൴ּγ۞ୃࢗཉܓχზ ؠཌྷ᜕ܲડ߱ ਕૉ֨ͤᑕϡ඀ё۞ඕٕͤྤफ़۞ຫᗼĄ ϡֽаᑕּγ۞ડ߱జჍࠎ᜕ܲડ߱(protected blocks)ĂЯࠎ఺჌ડ߱ܝ૞ ּγ఍ந 14-3 Ψܲ঻ф raise ֽ͔൴ּγĄײĂତ඾ڶІೡࢗ˞᏾ᄱ۞ଐ ۏІ۞ᇹּĂѩּγۏၹ΍ּγޙĂଋΞͽڶࠎ˞ܑϯߙ჌৔ᗼّ۞᏾ᄱଐ ͔൴ּγ ՎូĄ ՟ѣּγĂଋಶ଀ՏѨซҖᑭߤĂͽቁؠଋΞͽᚶᜈࢍზ྆۞Տ࣎ڍĄтڶ ዋϡ۞ּγଐڱٙ൑ڱүĂତ඾೩ֻႊზྻ۞˭ڶдϒ૱ଐڱೡࢗଋႊზ ΞͽͿ௟ܮ΍˞યᗟĂ֤ᆃЇң˘࣎ՎូౌΞਕົεୀĄҭߏֹϡּγĂଋ ೀȈ࣎Ꮾˢ̚۞ߙ˘࣎ڍдેҖΒӣᇴѺ࣎Վូ۞ኑᗔࢍზॡՀߏтѩĂт ពĄځ ߹඀Հࠎ۞ڱд඀ёЧ఍ĂଋΞ૟׎ะ̚дּγ఍ந඀Ԕ̚Ăֹ҃଀ଋႊზ ዦ᝝Ą̙Г૟᏾ᄱ఍ந۞඀ёቅᇩٺٽtry block ۞ֹϡົֹ଀ଋ۞඀ёቅՀ end; howMessage('Exception Raised'); end; S else on EFOpenError do ShowMessage('EFOpenError Raised'); except fileStream.Free; (* ఍நᑫ९۞̰ट... *) fileStream := TFileStream.Create('NOT_THERE.FILE', fmOpenRead); (* ྏ඾ฟୁ˘̙࣎хд۞ᑫ९* ) try tream: TFileStream; begin fileS var procedure TForm1.Button1Click(Sender: TObject); І۞ּγĄۏ TFileStream ٺтңॏֽ॓ҋ˞ځ˭ࢗ۞ቑּĂᄲ ൴ּγĄ ёٕ׎΁۞̮ІĂౌΞਕ͔ב Ψ RTLײଋ۞඀ёĄдଋ۞ᑕϡ඀ё̚Ăٺҋ try block ̚࠹၆ᑕ۞ּγ఍ந඀ԔĄኛ˼༱ҾԞ˞Ăּγ̙֭ಏΪົֽ זᅍ ็ົܮё͔̚൴˞ּγĂ֤ᆃבдྍڍёĂ֤ᆃтב׎ҋѣּγ఍ந඀Ԕ۞ Ψ˞˘࣎Ϗؠཌྷײд try block ̚۞඀ёቅĂڍ඀ёቅ͔ٙ൴Ą˵ಶߏᄲĂт ᄃ඀ёనࢍ͘Ίܝ14-4 ˢ ಶ੼˯ధкĄޘညߏ੃ጸវਈႽĂᑕϡ඀ёֹٕϡд఍ந˯۞ᙱ ಶΞͽ࣒ϒ֭ͷࢦາГྏ۞Ąҭߏѣ˘ֱּγĂٽटޝᑫ९ķĂߏזԱڱĶ൑ ࠧࢨĄߙֱּγĂညڱჃჄ۩ม̙֖ݒྏ඾ᆷˢྤफ़ăٕߏࢍზજү෹࿅Ъ ᜈેҖĄଋΞਕົ఍ந۞ּγᙷݭĂΒ߁˞ฟୁ˘̙࣎хд۞ᑫ९҃εୀĂ ఼૱Ăଋົؠཌྷּγ఍ந඀Ԕͽֹଋ۞ᑕϡ඀ёਕૉଂ᏾ᄱ̚аೇĂ֭ͷᚶ ІĂͽֹᑕϡ඀ёਕૉᚶᜈેҖĄۏĂ֭ͷၨāଫּγڶົ୻ੵଫ᏾ᄱ۞ଐ ּγ఍ந඀Ԕࠎߙ჌পؠᙷݭ۞ּγĂ೩ֻপؠ۞аᑕĄ၆ּγ۞఍நજү Ąѩડ߱Β߁˘ٕ࣎кּ࣎γ఍ந඀ԔĄޢ̝ ּγ఍நડ߱ღତд try block ᇤᆷּγ఍ந඀Ԕ ზёĂּтߙ࣎ᙊҾфĄ Гତ඾ҜӬޢΐ˯ܲ঻ф atĂ׎ޢࡶຐ޽ؠּγ۞᏾ᄱҜӬĂኛдּγᇹּ ᛋӘ ଋҋ̎˼༱Ҿۡତ޽ؠ ErrorAddr ̝ࣃĂιᑕྍߏ࣎઱᝝ࣃĄ ົ΍னд ErrorAddr ̚۞ࣃĄ ఼ֹۢϡ۰᏾ᄱ൴Ϡ۞гᕇĄଋ˵Ξͽдּγ൴ϠॡĂд raise ̄ή̚޽ؠ γ۞ҜӬĄᓝּֽᄲĂଋΞͽдଋ۞ּγ఍ந඀Ԕ̚ણ҂ ErrorAddr ࣃĂͽ ּγ۞͔൴ົ૟ System ඀ёಏ̮̚۞ ErrorAddr តᇴనࠎᑕϡ඀ё͔൴ּ raise EPasswordInvalid.Create('Incorrect password entered'); if word <> CorrectPassword then Pass ቅ൑ड़ķ۞ּγĂಶည఺ᇹĈ Ψ raise ֽ͔൴ EPasswordInvalid ۞ᇹּĂͽ͔൴Ķ૜ײଋΞͽдЇңॡมᕇĂ EPasswordInvalid = class(Exception); type ӘĈކᓝּֽᄲĂගؠ˭ࢗ۞ ྍּγᇹּĂٙͽଋͦᅮΐͽၨāĄ ၨāົܮޢؠјֽҋߙ࣎পؠ۞ҜӬĄ༊ּγ఍ந඀Ԕ၁ᅫ఍நॡĂдԆј ІĄ఺ົឰּγజనۏ඾ּγྫྷޢΨܲ঻ф raiseĂ׎ײࡶຐ͔൴ּγĂኛଋ ּγ఍ந 14-5 ShowMessage(Format('Expected value between %d and %d', E.Min, E.Max)); on!E: EIntegerRange do! ᇶॡّ۞តᇴֽᐼхᇹּĂᓝּֽᄲĈ ଋ଀೩ֻטࢨڱγᇹּĄѩপঅ۞ᆷּפΞͽឰଋхڱĂ఺჌ᆷڱ۞পঅᆷ γᇹּ۞পؠྤੈĂଋΞͽֹϡ on..doּٺᙯפࡶຐдּγ఍ந඀Ԕ̚Ă᝝ ĂଋΞਕົᅮࢋдּγᇹּ̚۞ߙֱྤੈĄ˭ڶ̙࿅Ăдߙֱଐ ࢗĂ่੫၆ྍּγݭҾĄୃ۞ޢ̝ γ۞ྤੈĂٙͽд on..doּٺᅮࢋЇңᙯ ̂кᇴॡ࣏ĂಶтТּ݈˘ᇹĂੵ˞ּγ۞ݭҾ̝γĂּγ఍ந඀Ԕ̙֭ົ end; on EIntUnderflow do Value := 0; on EIntOverflow do Value := 0; on EZeroDivide do Value := MAXINT; except { ࢍზϡ۞ୃࢗ } try ԔĂ఺ֱ඀Ԕົ఍நдზఙࢍზ̚Ξਕົ͔൴ּγĈ Β߁˞к࣎఍ந̙Тּγ۞ּγ఍ந඀ܮᓝּֽᄲĂ˭ࢗ۞ּγ఍நડ߱ on! do ; ඀ԔĂߏ჌ԛёт˭۞ୃࢗĈ дּγ఍நડ߱̚ĂଋΞͽΐˢ˘ٕ࣎кּ࣎γ఍ந඀ԔĄٙᏜ۞ּγ఍ந γ఍நડ߱ౌజෛࠎߏಏ˘ try…except ୃࢗ۞˘ొЊĄ ᙯᔣф၁ᅫ˯జෛࠎ׶ try block ߏТ˘࣎ୃࢗĄ˵ಶߏᄲĂtry block ᄃּ ּγ఍நડ߱ߏଂ except ᙯᔣфฟؕĂ֭ͷд end ᙯᔣф఍ඕՁĄ఺׌࣎ ּγ఍நୃࢗ ІĄ඀ё߹඀ົдϫ݈ડ̝߱ϐฟؕᚶᜈેҖĄۏၨāּγ ҖୃࢗĂତ඾ҋજгેົܮĂιޢ఍நּγ۞ּγ఍ந඀Ԕז༊ᑕϡ඀ёԱ ྍּγ۞఍ந඀ԔࠎͤĄ ΞइϡдזԱזγ఍ந඀ԔĂֶԔವԱপؠ۞ּγ఍நୃࢗĂּۡזϲӈྯ ົܮγ఍ந඀Ԕ̚۞ୃࢗĄ༊ try block ̚۞ߙҖୃ͔ࢗ൴ּγॡĂ඀ё߹඀ Ϊѣд̝݈۞ try block ̚۞ୃࢗдેҖॡ൴ϠּγĂᑕϡ඀ё̖ົેҖдּ ᄃ඀ёనࢍ͘Ίܝ14-6 ˢ ତᇹּĂ҃ͷ˵ົॏ॓ٙѣࢉϠҋྍᙷҾ۞ᇹּĄᓝּֽᄲĂ˭ࢗ۞ּγ఍ ྍᙷҾ۞ۡٺᛳז༊ଋࠎૄᖂּγᙷҾ೩ֻּγ఍ந඀ԔॡĂι่̙ົॏ॓ ࢉϠᙷҾĄ ր۞ּγᙷҾĄᓝּֽᄲĂVCL ົؠཌྷ ERangeError ּγઇࠎ EIntError ۞ ϤᙷҾܑϯĄಶ఺ІְଐֽᄲĂଋ఼૱ົࢬ၆۞ߏ˘ፋ࣎ลᆸ୉ౌޠ˘ּγ ఍நּγᙷҾ ଀Հซ˘Վ۞ྤੈĄפ˘͛Ăͽ finally blockĂଋΞͽણ҂д14-9ࢱ۞Ķᇤᆷ௣ͤડ߱ķ ٺfinally blockĄᙯ γ۞ྤੈĂ҃ͷۢ྽тңΐͽ఍நĂ֤ᆃଋΞͽֹϡּٺԔᆷјۢ྽Հкᙯ ଋຐࢋ఍ந୻நજүĂ֭૟ּγ఍ந඀ڍଋ၁ᅫ˯ۢ྽тңΐͽ఍ந۞Ąт Ą˘ਠֽᄲĂଋ۞඀ёቅᑕྍΪ఍ந۞זٙѣ۞ּγĂΒ߁ଋԆБ՟ѣफ़ຐ ᛉֹϡ఺˘჌БΒ˭ֽ۞࿰నּγ఍ந඀ԔĄelse ̄ήົ఍நଫޙᛋӘ ԧࣇ̙֭ ఍நଫּγĂЯѩдΒӣι۞ડ߱̚Ăົᖬᄏଫٙѣ఍நજүĄ ડ߱̚Ăਕૉቁܲྍડ߱ᓁߏΞͽ౅࿅ߙ჌͞ёĂזΐט૟࿰నּγ఍ந፟ end; { ࿰న۞ּγ఍ந඀ёቅ }; else { পؠ۞ּγ఍ந඀ёቅ }; on ESomething do except { ୃࢗ } try ຐ఺ᆃઇĂኛଋдּγ఍நડ߱ΐ˯ else ొЊĈڍԔ۞ּγĄт ଋΞͽ೩ֻಏ˘࣎࿰న۞ּγ఍ந඀ԔĂֽ఍நٙѣ۞Ϗ޽ؠ׎ּγ఍ந඀ ࿁ఢ۞᏾ᄱĄפϠх ΐͽၨ໑ĂЯ҃யޘဘྏГົܮІĂ֤ᆃᑕϡ඀ёۏଋҋҖၨ໑ྍڍІĄт ۏІĄּγ఍நજүົҋજгၨ໑ּγۏᛋӘ ኛ˼༱̙ࢋҋҖၨ໑ᇶॡּّγ јࠎՀপؠ۞ݭҾĄ υࢋ۞ྖĂଋΞͽֹϡ as ྻზֽ̄૟ּγ۞ݭҾᖼݭڍEIntegerRange)Ąт ᇶॡّតᇴ( ώּ̚۞ E) ӈࠎдཱི݂̝఍ٙ޽ؠ۞ݭҾ( ώּ̚۞ ּγ఍ந 14-7 { পঅ۞ୃࢗ } try { ୃࢗ } try நજүĄᓝּֽᄲĈ ડ̝߱γ۞఍זડֽ߱ؠཌྷડાّ۞পؠּγ఍நજүĂͽᖬᆷ۞ېֹϡ૰ ёֽщཉଋ۞ּγ఍ந඀ёቅĄ˵ಶߏᄲĂଋΞͽ͞۞ېЯѩĂଋΞͽͽ૰ ߙ࣎఍நଫྍּγ۞ᆸ৺˯Ąזᑕϡ඀ё౵γᆸ۞ቑಛĂٕߏ ྿ٯγּזၗĄ఺࣎඀Ԕົ˘̙ۡᕝͅᖬгᕖ̂ቑಛĂۡېᖞ఍நజ͔൴۞ Ψྍડ߱۞඀ёቅ఍)Ă҃ྍּγ̪ײаܔͷа็ҌΒӣྍડ߱۞ડ߱(ٕߏ ᗓฟྍડ߱Ă֭ົܮߙ࣎ડ̙֭߱఍நߙ࣎পؠ۞ּγĂ֤ᆃ඀ё߹඀ڍт ଋдߙડ߱̚ຐࢋপҾΐͽ఍ந۞ּγĂ೩ֻ఍ந඀Ԕಶр˞Ą ଋ̙֭ᅮࢋдՏ࣎ડ߱̚ĂౌࠎՏ჌ᙷݭ۞ּγ೩ֻ఍ந඀ԔĄଋΪᅮࢋࠎ ּγ఍ந඀Ԕ۞ቑಛ ྿఍ந ERangeError ۞఍ந඀ԔĄٯᆃ඀ё߹඀૟ϖᅈౌ̙ົ EIntError ۞఍ந඀Ԕ΍னд ERangeError ۞఍ந඀Ԕ̝݈Ă֤ ڍຍĂтڦኛ end; on EIntError do {၆׎΁ፋᇴݭᇴጯ᏾ᄱ۞఍ந }; on ERangeError do { ၆෸ࠧ۞఍ந }; except { ેҖፋᇴᇴጯྻზ۞ୃࢗ } try ׎΁۞఍நજү݋д఍நፋᇴݭ۞ᇴጯ᏾ᄱĈ ᓝּֽᄲĂ˭ࢗ۞఺࣎ડ߱ਕૉࠎቑಛࣃ۞᏾ᄱ೩ֻՀপؠ۞఍நજүĂ҃ ֽĂΪࢋֶଋԓ୕ּγజᕗ΍ॡ۞ຩವึԔĂֽщཉ catch ୃࢗ۞ึԔӈΞĄ ੓׀ଋΞͽ૟၆ߙૄᖂᙷҾ۞᏾ᄱ఍ந඀Ԕᄃ၆ࢉϠᙷҾ̝఍ந඀ԔගЪ end; ఍நፋᇴᇴጯ᏾ᄱ };ܝon EIntError do { ૞ except { ેҖፋᇴᇴጯྻზ۞ୃࢗ } try ̈́ EIntOverflowĈ ந඀Ԕົ఍நٙѣፋᇴᙷ۞ᇴጯּγĂΒ߁ ERanageErrorăEDivByZeroăͽ ᄃ඀ёనࢍ͘Ίܝ14-8 ˢ ତ඾ેҖγಛּγ఍நડ߱̚Հ˘ਠ̖ޢᆃ̰ᆸ۞ּγ఍நડ߱ົેҖĂ̝ дĶপঅ۞ୃࢗķ̚۞඀ёቅ͔൴˞ּγĂ֤ڍ఍நડ߱ົેҖĄ̙࿅Ăт дώּĶୃࢗķ̚۞඀ёቅ͔൴˞ ESomething ּγĂಶΪѣγಛ۞ּγڍт end; { ڶon ESomething do ...;{ ఍நٙѣ۞ଐ except end; end; raise;{ ࢦາ͔൴ּγ } { Ϊ఍நপঅ۞ୃࢗ } begin on ESomething do except { পঅ۞ୃࢗ} try { ୃࢗ } try ޽΄Ąѩӈּγ۞ࢦາ͔൴ٕࢦາᕗ΍Ą˭ּӈϯቑѩ˘ԫμĈ ІĂ҃ឰγಛ۞఍ந඀Ԕѣ፟ົΐͽаᑕĄଋΞͽֹϡ̙૲͔ᇴ۞ raiseۏγ ಛડ߱۞఍ந඀Ԕಶϖᅈ̙ົүજĄ̙࿅Ăଋ˵Ξͽ̙ឰ఍ந඀Ԕၨ໑ଫּ ༊൒Ă༊ଋ۞ડొ఍ந඀ԔԆј˞఍நજүॡĂιົၨ໑ּγᇹּĂٙͽγ ΃ĄפΨγಛ۞ડ߱Ă̙҃ߏΐͽײѣॡ࣏༊ଋдԊొ఍நּγॡĂଋົຐࢋ ࢦາ͔൴ּγ ᄃ finally blockĄ טĂٕ஄ϡּγ఍ந፟(ځ̚(ኛણ҂д14-9ࢱ۞Ķᇤᆷ௣ͤડ߱ķ˘༼̚۞ᄲ γ఍நડ߱Ąଋ˵Ξͽ૟ιֹϡд finally blockּٺᙷݭĂ̙ࢨ۞ېො ఺჌૰ end; end; { ఍நٙѣ۞ୃࢗͽ̈́Հк۞ୃࢗĂҭߏ̙఍நপঅ۞ୃࢗ } begin on ESomething do except { Հк۞ୃࢗ } end; end; { Ϊ఍நপঅ۞ୃࢗ } begin on ESomething do except ּγ఍ந 14-9 AnInteger := 10 div ADividend;{ ఺ົயϠּγ } GetMem(APointer, 1024);{ ੨ཉ 1K ۞੃ጸវ } ADividend := 0; eger, ADividend: Integer; begin AnInt APointer: Pointer; var procedure TForm1.Button1Click(Sender: TObject); ёĈ ιٙ੨ཉ̝੃ጸវ۞͞ٸᛖڱγֹ଀ᑕϡ඀ё൑ּځ˭ְࢗІ఍ந඀Ԕᄲ І(ଋᑕϡ඀ё̚۞ᙷҾᇹּ)ۏ y І)ۏ y ෛ඄ྤ໚ٕෛ඄̍׍ะ඀ёऱྤ໚(Qt y ੃ጸវ y ᑫ९ ਠّྤ໚ѣĈ˘۞ٸߙֱଋᑕྍቁؠιࣇ඗၆ົజᛖ ඀ёቅĄ۞ٸॡĂଋົᅮࢋቁܲᑕϡ඀ё̪ᖞΞͽેҖྤ໚ᛖ ඀ёቅӈΞĄҭߏĂ༊ּγ൴Ϡ۞ٸ̏੨ཉ۞ྤ໚ĂΪࢋଋᇤᆷ˞੨ཉᄃᛖ ଫٸĂଋΞͽቁܲᑕϡ඀ёᛖ˭ڶ૟ᑫ९ᙯౕĄдϒ૱۞ଐົޢቁܲιдൾ Ξͽܮ඀ёฟୁ˞ᑫ९Ă֤ᆃଋڍଫ੃ጸវĄтٸଋ˵Ξͽቁܲι౵௣ົᛖ ଋ۞ᑕϡ඀ё੨ཉ˞੃ጸវĂڍଫůӈֹּγ൴ϠĄЯѩĂтٸ໚Ăౌົజᛖ Ξͽቁܲଋᑕϡ඀ёٙ੨ཉ۞ྤܮ౅࿅ finally block(௣ͤડ߱)۞ֹϡĂଋ д᜕ܲડ̝݈߱ಶ̏੨ཉ۞ྤ໚Ąٸ۞඀ёቅߏϡֽซҖ୻ந۞જүĂּтᛖ Ăଋົԓ୕ેҖߙֱ඀ёቅůӈֹѣּγ൴ϠĄ˘ਠֽᄲĂ఺ᇹޢ᜕ડ̝̝ ᜕ܲડ߱ٙ̚ᛈ൴۞ּγĄ̙࿅Ăѣֱॡ࣏ଋ̙ົᅮࢋ఍நּγĂҭߏдܲ ּγ఍ந඀Ԕӈࠎ˘߱඀ёቅĂѩ඀ёቅົ఍நপؠ۞ּγٕ൴Ϡд඀ёቅ ᇤᆷ௣ͤડ߱ Ą۞ځraise ٕ throw ୃࢗĂಶтТд14-3ࢱĶ͔൴ּγķ˘͛ٙ̚ᄲ ఍ந඀Ԕຐࢋᕗ΍Ω˘჌̙Т۞ּγĂιΞͽ౅࿅ϒ૱۞͞ёĂֹϡڍт γ೩ֻপঅّ۞఍நજүĂ̙҃ົεΝ(ٕߏࢦᖬ)ߊѣ۞఍ந඀ԔĄ Ăࠎּ˭ڶΞͽдপؠ۞ଐܮ఍நજүĄ౅࿅ࢦາ͔൴ּγ۞͞ёĂଋ۞ّ ᄃ඀ёనࢍ͘Ίܝ14-10 ˢ end; FreeMem(APointer, 1024);{ ߹඀ົଂ఺׊ᚶᜈેҖĂጐგ൴Ϡ˞ּγ } finally AnInteger := 10 div ADividend;{ ఺ົயϠּγ } try GetMem(APointer, 1024);{ ੨ཉ 1K ۞੃ጸវ } ADividend := 0; eger, ADividend: Integer; begin AnInt APointer: Pointer; var procedure!TForm1.Button1Click(Sender: TObject); ଫ੃ጸវĈٸ੃ጸវ֭யϠ᏾ᄱॡĂι̪൒ົᛖ ˭ࢗ۞඀ёቅٙϯቑ۞ְІ఍ந඀ԔĂֹϡ˞ finally blockĂٙͽ༊ι੨ཉ ĄޢેҖԆல ͽϒ૱۞ึԔેҖĂ˵ಶߏд try block ̚۞ٙѣୃࢗົܮ֤ᆃ୻ந۞඀ёቅ ՟ѣּγ൴ϠĂڍΨĄтײົܮĂּγ఍ந඀Ԕޢг͞Ąд finally ొЊેҖ Ψ୻ந඀ёቅ۞ײfinally ొЊĂ˵ಶߏ זྯົܮĂ඀ё߹඀ޢγ఍ந඀Ԕּ זઃҝĄ༊Աົܮё)͔൴˞ּγĂ֤ᆃдྍᕇ˯඀ё߹඀ב۞זΨײёቅٙ try block ̚Ą༊ try block ̚۞඀ёቅ(ٕߏజ try block ̚۞඀ ٺּγ൴Ϡ д try…finally ୃࢗĂᑕϡ඀ё˘ؠ଀ેҖд finally ొЊ۞ٙѣୃࢗůӈֹ end; Ψ఺ֱୃࢗ }ײົ˵{ ӈֹд try block ̚՟ѣּγ൴ϠĂ finally { Ξਕົ͔൴ּγ۞ୃࢗ } try ԛёт˭Ĉ finally block ߏଂ finally ᙯᔣфࠎࢵĂઇࠎ try…finally ୃࢗ۞˘ొЊĂ׎ ᇤᆷ finally block blockĄ ଫĂଋΞͽລ੨ finally block ֹֽϡ tryٸຐቁܲ੃ጸវ˘ؠົజᛖڍт ੃ጸវ۞ୃࢗಶϖᅈౌ̙ົజેҖĄٸּγົྯ΍ડ߱Ăٙͽᛖ ࣎ࢦᕇĈ༊ּγ൴Ϡॡâ˞ځពĂҭߏώּγᄲځᔵ൒̂кᇴ۞᏾ᄱౌ̙ end; ĂЯࠎ൴Ϡ˞ּγ }זΨײFreeMem(APointer, 1024);{ ఺Җϖᅈౌ̙ົ ּγ఍ந 14-11 end; end; ShowMessage('List box contains fewer than four strings'); on EStringListError do! n := ListBox1.Items[3];{ set form caption to fourth string } except Captio try ListBox1.Items.Add('still another string');{ ...and a third string } ListBox1.Items.Add('another string');{ add another string... } ListBox1.Items.Add('a string');{ add a string to list box } begin procedure TForm1.Button1Click(Sender: TObject); Ĉפ৶͔ࣃхڱܧ ˭ࢗ۞ְІ఍ந඀ԔٙΒӣ۞ּγ఍ந඀ԔĂົ఼ֹۢϡ۰дЕϯ͞๴̚۞ γĄ ൴ĶList index out of boundsķ۞ּ͔ົܮበཱི 3 ۞ีϫĂЕϯ͞๴פ඾х ߙ࣎Еϯ͞๴д׎Еܑ̚ѣˬ࣎ีϫ(0..2)Ă҃ͷଋ۞ᑕϡ඀ёྏڍֽᄲĂт Ąᓝּפߏ৶ّ͔পّ۞෸ࠧхܮᄃ׎ጱЯĄ̮І̚൴Ϡ᏾ᄱ۞૱֍ࣧЯĂ ຩವּγᙷҾĄιٙ೩ֻ۞ྤੈ૱૱ਕૉᑒӄଋҿᕝ᏾ᄱ۞൴Ϡг̚ځ˯ᄲ ੈि۞͞ёពϯٙ൴Ϡ۞᏾ᄱᙷݭĄд၆ଋ۞ᑕϡ඀ёੵ᏾ॡĂଋΞͽдቢ ͽ࿰న۞͞ёֽΐͽ఍நĄ˘ਠֽᄲĂົͽົܮ ଋ̙఍நଫּγĂVCLڍт ׶఍ந׎΁ᙷݭּγ۞͞ё՟ѣ̦ᆃ̙ТĄט఍ந̮Іּγ۞፟ నࢍ˯۞᏾ᄱĂ҃யϠેҖॡഇ۞᏾ᄱĄ ൴ϠॡĂົజҋજ۞ᕗ΍Ą˘ਠֽᄲĂ఺ֱּγ΃ܑ඾඀ёڶ̙Ξ࿰ഇ۞ଐ ёĂ҃ͷдߙֱבၹд VCL ̚۞ధкᙷҾᄃޙĄּγజטVCL ּγ఍ந፟ ଋдᑕϡ඀ёֹ̚ϡ˞ VCL ̮Іٕ VCL ેҖॡഇ඀ёऱĂଋಶ଀˞ྋڍт д VCL ᑕϡ඀ё̚఍நּγ ҖҌ finally blockĄેົܮγĂ֤ᆃ߹඀ д try ొЊ֭Ϗ͔൴ּڍд finally block ̚۞ୃࢗ׶ּγߏӎ൴Ϡ൑ᙯĄт end; ᄃ඀ёనࢍ͘Ίܝ14-12 ˢ ൴Ą͔ົܮજүॡĂ۞ڱܧEInvalidOperation ༊ྏ඾д̮І˯ซҖ EInvalidGraphics ܑϯ఍ந̙ΞᙊҾ۞ဦԛᑫ९ॾёĄ ݭҾᖼೱĄ۞ڱܧEInvalidCast ᑭߤ ෹࿅ٙ੨ཉᇶхጡٙਕटৼ۞̂̈Ąڍඕ۞ޢEIntOverflow ΃ܑፋᇴྻზ EInOutError ܑϯᑫ९I/O᏾ᄱĄ EExternalException ܑϯ̙ΞᙊҾ۞ּγቅĄ EDivByZero ॏ॓ፋᇴ۞ੵ࿬᏾ᄱĄ EDBEditError ॏ॓׶޽ؠዌཊ̙࠹ट۞ྤफ़Ą EDatabaseError ޽ؠྤफ़ऱ᏾ᄱĄ І۞ᖼೱ᏾ᄱĄۏEConvertError ΃ܑфҚٕ ොΊٕՀЩĄ۞ڱܧEComponentError ܑϯ၆̮ІซҖ Ąפх۞ڱܧЕซҖੱڒEBitsError ֨ͤ၆ο ᏾ᄱĄפ੃ጸវх۞ڱܧEAccessViolation ᑭߤ EAbort ઃͤ˘ాҚ۞ְІ̙҃ពϯ᏾ᄱੈि၆ྖ͞๴Ą ּγᙷҾ ೡࢗ ܑ14.1 ߄Ᏼ΍ֽ۞ּγᙷҾ VCL ̚۞ּγᙷҾĈ ٺܑ 14.1 Е΍˞߄Ᏼ΍ֽొЊؠཌྷ ि۞фҚĄ ពϯઇࠎੈົ˭ڶ೩ֻ˞˘࣎˘࡭̼۞̬ࢬĄι೩ֻ˞ VCL ּγд࿰నଐ ІĄException ࠎᑕϡ඀ёдּγ఍ந˯ĂۏࢉϠҋЩࠎ Exception ۞ಏ˘ॲ Ąٙѣ۞ VCL ּγᙷҾౌڶݭҾᖼೱăͽ̈́ధк׎΁۞ּγଐ૱ܧ᏾ᄱă γᙷҾĂֽҋજ̼۞఍நੵͽ࿬۞᏾ᄱăᑫ९ I/Oּ۞ޙVCL Β߁˘ፋइ̰ VCL ּγᙷҾ Гົ͔൴ּγĄ Еϯ̚Ăٙͽι̙ז൴ּγĄ޷˭ௐ˟ѨॡĂົΐˢՀк۞фҚ͔ົܮфҚ ׎ௐα࣎פҘĂٙͽхڌ༊ଋௐ˘Ѩ޷˭޷ตॡĂЯࠎЕϯ͞๴ಶΪѣˬᇹ ּγ఍ந 14-13 Ψ HandleExceptionĄײᛋӘ ኛ˼༱ҾдેҖჰ۞ּγ఍ந඀ёቅ྆ end; end; Ψ HandleException }ײ };(Application.HandleException(Self begin on eption do Exc except { পঅ۞ୃࢗ } try ΨĈײ۞ڱ͞ ̎ΐ˯၆ HandleException ຐּ֨ͤγ౅࿅఺჌͞ё੟௲ĂଋΞͽҋڍІ۞ೠ೪Ąтۏ ௲ᗓ Application ёऱॡĂּγౌົבё۞בΨ׎ײёĂٕߏᇤᆷγొᑕϡ඀ёົב callback γĂౌ̙ົజ HandleException ٙॏ॓ă఍நĄ༊ଋᇤᆷּ۞ޢ̝ٕ݈̝ڱ ͞ Ą൴Ϡдᑕϡ඀ё Run۞זΨײߏ HandlerException ̙ົజڶᔘѣ˘ֱଐ ពϯ၆ᑕҌѩּγ̝᏾ᄱੈि۞ੈि͞๴Ąົܮ HandleException EAbort)ॡĂ ܧ՟ѣ OnException ְІ఍ந඀Ԕ(҃ͷּγڍ۞ྖĄт ѣڍΨ OnException ְІ఍ந඀ԔůтײHandleException ၆ٙѣ۞ּγౌົ ٙॏ֭॓఍நĄੵ˞ EAbort ̝γĂڱ͞ І۞ HandleExceptionۏ Application జБાົܮॏ֭॓ͷ఍ந͔ٙ൴۞ּγĂּγ౵௣ڱଋ۞ᑕϡ඀ёቅ൑ڍт טд VCL ̚࿰న۞ּγ఍ந፟ EZeroDivide ॏ॓ঙᕇ۞ੵ࿬᏾ᄱĄ ERegistryException ܑϯ൳ᐂี᏾ᄱĄ ιٙజ޽ࠁ۞ݭҾٙटৼĄڱERangeError ΃ܑፋᇴࣃ࿅̂Ă൑ ൴ϠĄົܮEPropertyError дనࢍপّࣃεୀॡ EPrinterError ܑϯЕОॡ۞᏾ᄱĄ EOleError ޽ؠOLE automation۞᏾ᄱĄ ॡ΍˞યᗟĄีטEOleCtrlError ాඕҌActiveXଠ EMenuError Αਕܑีϫ΍˞યᗟĄ EInvalidPointer 導因於非法的指標操作。 γᙷҾ ೡּࢗ ᄃ඀ёనࢍ͘Ίܝ14-14 ˢ ਫ਼઻Ă̙҃ಏΪߏ̰ᆸ۞ਫ਼઻Ą ຍĂд఺ּ࣎̄̚ĂAbort ົֹ଀඀ё۞߹඀̚Тॡ̚ᕝ̰ᆸᄃγᆸ۞ڦኛ end; end; ୢ }ٸޢif I = 7 then Abort;{ дγᆸਫ਼઻ેҖௐ 7 Ѩ ListBox1.Items.Add(IntToStr(I) + IntToStr(J)); begin for J := 1 to 10 do { ࢦᖬ 10 Ѩ} for!I := 1 to 10 do{ ࢦᖬ 10 Ѩ } Integer; begin I, J: var procedure TForm1.Button1Click(Sender: TObject); ޷ต۞ OnClick ְІ˯Ĉז˯Ăኛ૟˭ࢗ۞඀ёቅాତ ୢଫߙ࣎જүĄдӣѣ۩Её͞๴ᄃ޷ต۞ܑॾٸ˭ࢗ۞඀ёĂϯቑ˞тң ො Abort ᄃ abort ߏ̙Т۞Ąabort ົ௣ͤଫᑕϡ඀ёĄ ົពϯ᏾ᄱੈिĄ ඀ԔӈΞĄAbort ົҋજ۞͔൴ EAbort ּγĂ่̙ົ̚ᕝϫ݈۞જүĂϺ̙ Ψ AbortײІĂΪࢋۏϲޙĄଋͦᅮ͘જڱд͔൴ᔳԛּγॡѣ࣎ԣి۞͞ έᑕϡ඀ёĂ᏾ᄱੈि၆ྖ͞๴ົពϯдϏ఍ந۞ EAbort ּγ˯Ąטଠٺො ၆ γ۞᏾ᄱੈिĄ ඀ԔĂٙϡͽពϯ᏾ᄱੈि۞၆ྖ͞๴̚Ă̙ົពϯ఺ֱࢉϠҋ EAbort ۞ּ ٙѣᔳԛ࠰ּγࢉϠҋᇾ໤ּγݭҾ EAbortĄVCL ᑕϡ඀ё࿰న۞ּγ఍ந ડ߱Ąېߏ࠹Ҭ۞ĂҭߏΞͽ˘Ѩ̚ᕝрೀᆸ۞૰ ୢߙ࣎જү۞͞ёĂಶ׶ֹϡ Break ٕ Exit ඀Ԕֽ̚ᕝડ߱۞͞ёٸѣϡĄ ୢߙ࣎જүॡĂȈ̶۞ٸᔳԛ۞ּγдଋ̙χზ૟ּγаಡගֹϡ۰ăҭຐ ពϯ᏾ᄱੈिĄົ̙˭ ڶिфҚĄଋ˵ΞͽؠཌྷĶᔳԛ(silent)ķ۞ּγĂֹ଀ᑕϡ඀ёд࿰న۞ଐ ΍۞ੈפІٙۏߏពϯ˘࣎ੈि͞๴Ăдੈि͞๴̚ពϯҋּγܮ఍ந͞ё VCL ᑕϡ඀ёົ఍நଫ̂кᇴдଋ඀ёቅ֭̚ϏপҾΐͽ఍ந۞ּγĂι۞ ᔳԛּγ ּγ఍ந 14-15 ͔൴۞າּγᙷҾĄ ߏଋٙܮιזΞͽ࠻ܮពϯ͔ٙ൴ּγ۞ЩჍĂଋົܮException ۞ᇾ໤જү Exception ۞఍ந඀Ԕ(ٕ࿰న۞ּγ఍ந඀Ԕ)̪൒ົΐͽ఍நĄЯࠎ఍ந ఍ந඀ԔĂ֤ᆃ఍ந۞ܝଋ͔൴˞ EMyExceptionĂҭݒϏࠎι೩ֻ૞ڍт EMyException = class(Exception); type ӘĈކ҂˭ࢗ۞ޥᓝּֽᄲĂኛ ΐͽ఍நĄົܮ˘ּγ۞఍ந඀Ԕ᜕ٙܲĂ֤ᆃᇾ໤۞఍ந඀Ԕ̝ ఍நྍܝଋдଋ۞඀ёቅડ͔߱̚൴ଋ۞າּγĂ҃ྍາּγ̙֭జ૞ڍт າ۞ּγᙷҾᑕྍࢉϠҋ Exception ٕ׎΁ᇾ໤ּγ̝˘Ą౅࿅఺჌͞ёĂ ఍ந඀ԔΪົ఍நࢉϠҋ Exception ۞ּγĄ І۞ᇹּֽઇࠎּγĂҭߏᇾ໤۞ VCL ּγۏᖎಏĄᔵ൒ଋΞͽ͔൴Їң Әາᙷݭ˘ᇹ۞ކЯࠎ VCL ּγౌߏᙷҾĂٙͽؠཌྷາ۞ּγᙷݭĂಶ׶ ؠཌྷଋҋ̎۞ VCL ּγ 14-16 ˢܝᄃ඀ёనࢍ͘Ί ฟ൴ྭπέ۞ᑕϡ඀ё 15-1 πέᑕϡ඀ёॡĂኛֹϡ DelphiĄฟ൴ Linux ۞ྭπέᑕϡ඀ёॡĂኛֹϡ ତ඾በᛌăീྏă֭૟ι̶൴Ҍଋٙ୬ેҖ۞πέ˯Ąฟ൴ Windows ۞ྭ y ࣒Լҋߊѣ۞ VCL ᑕϡ඀ё ϲາ۞ᑕϡ඀ёޙ y ଋຐฟ൴ྭπέ۞ᑕϡ඀ёĂଋΞͽĈڍт ְֱ֤ଐߏ̙Т۞Ą д Windows ׶д Linux ˯ฟ൴ᑕϡ඀ёĂտౣѣځّ۞඀ёቅĂ˵ࠎଋᄲ ᄃ Linux ˯በᛌĂ˵̬௜˞тңд఺׌჌ᒖဩ̚Ăᇤᆷ׶πέ൑ᙯă׍Ξᛸ Windows ٺдώౢ̚Ăೡࢗ˞тң࣒Լ Delphi ᑕϡ඀ёĂֹ଀඀ёਕૉТॡ ΨЇң׶үຽր௚࠹ֶ۞ APIĄײ۞ CLX ̮ІĂ҃ͷ̙ົ Borland Component Library for Cross-Platform(Borland ̝ྭπέ̮І)̚ Linux ᄃ Windows ׌̂үຽր௚̝˯Ąྭπέᑕϡ඀ёֹϡ۞ߏ ٺҖ ଋΞͽֹϡ Delphi ֽ൴णྭπέ۞ 32 Ҝ̮ᑕϡ඀ёĂֹᑕϡ඀ёТॡΞે ฟ൴ྭπέ۞ᑕϡ඀ё ᄃ඀ёనࢍ͘Ίܝ15-2 ˢ ѣᙯĂ˵׶඀ёտౣ׶ Windows кღ૜ඕЪѣᙯĄޘᄃኑᗔ ׶ଋᑕϡ඀ё۞ώኳޘͽ૟ιࣇொങҌ Linux ᒖဩ̝̚Ą఺Іְଐ۞ӧᙱ඀ Ξܮ࣐ࡶଋ̏ѣࠎ Windows ᒖဩٙᇤᆷ۞ Borland RAD ᑕϡ඀ёĂ֤ᆃଋ ொങ VCL ᑕϡ඀ё Ąځϡ඀ёķ̚۞ᄲ д15-27ࢱ۞Ķྭπέྤफ़ऱᑕϡ඀ёķᄃд15-36ࢱ۞Ķྭπέ Internet ᑕ тңᇤᆷྭπέ۞ᑕϡ඀ёĂኛଋણ҂ٺĄᙯځVCL ᑕϡ඀ёķ˘༼̚۞ᄲ ࡶຐ࣒Լ VCL ᑕϡ඀ёֹ׎јࠎྭπέ۞ᑕϡ඀ёĂኛଋણ҂15-4Ķ࣒Լ ۞࿪ཝ˯Ą ࡶࢋд Kylix ˯በᛌᑕϡ඀ёĂଋ଀А૟ଋ۞ᑕϡ඀ёொᖼҌ྅ѣ Linux िĂͽԱ΍ЇңᅮࢋซҖ۞ԼតĄ 3 дՏ࣎ଋຐࢋેҖ۞πέ˯Ă̶ҾซҖበᛌᄃീྏĄᑭෛٙѣΞਕ۞ੈ ඀ё̚Ą ଋ۞ᑕϡٺ2 д IDE ̚ฟ൴ଋ۞ᑕϡ඀ёĄ˼༱ҾԞ˞Ϊਕଳϡ CLX ̮І CLX ᑕϡ඀ё̚۞̮ІĄ ٺពϯΞϡົܮ˯ۍ̮Іࢬ 1 д IDE ̚ĂᏴፄ File|New|CLX applicationĄ ฟ൴ CLX ᑕϡ඀ё۞͞ёĂೀͼಶ׶ฟ൴ Delphi ᑕϡ඀ё՟ѣ̦ᆃ׌ᇹĄ ฟ൴ CLX ᑕϡ඀ё ώ۞ Delphi ˯Ăౌ̙Ξϡ CLX ᑕϡ඀ёĄۍො дٙѣ ιொᖼҌ WindowsĄ ଋ˵Ξͽ̙ଳϡ WindowsĂ҃ଂ Kylix ฟؕฟ൴ྭπέᑕϡ඀ёĂତ඾Г૟ ൴ă̶൴ᑕϡ඀ёĄ KylixĄKylix ߏ Borland ۞ Delphi ᄃ C++హវĂιឰଋ଀ͽд Linux ˯ฟ ฟ൴ྭπέ۞ᑕϡ඀ё 15-3 Ăѩ͞ޢચĄ౵ڇд౵˯ᆸ၁үЧ࣎পؠ۞ޢଋᑕ૟ྭπέ۞ొЊ࿣ᗓĂ൒ ߏ˘ּĈд׌࣎πέ˯۞̬ࢬໂბг࠹ҬĂ҃׎၁үݒߏ̂ள׎኷Ąܮёऱ ధкπέ̝˯࠻੓ֽߏ࠹ТĂҭ׎၁ү͞ёݒߏЧπέ࠹ளĄેҖॡഇ۞඀ Ăѩ̰ొ̬ࢬдޢચ˜ߏ٩෪гᖟдߙ˘̰ొ̬ࢬ̝ڇ۞ԛёܑϯĄధк۞ ྭπέ۞ொങ͞ёߏͧྵр۞͞ёĂЯࠎ׎ྤफ़఍நࣧ݋ົజͽ׶πέ൑ᙯ ࠹ᙯ۞Ķ၁үొЊķ஄д˘੓Ą ົዎ࿃ໂࠎ౫໭۞ଐဩĂ˵ಶߏᄲֱ֤׶πέ൑ᙯ۞Ķ఍நࣧ݋ķĂݒ׶πέ г࠹ᙯĄ઄ࡶ඀ёቅд൴णॡԆБ̙҂ᇋπέ۞፾ϲّĂ֤ᆃଋΞਕޘߏ੼ έ̝˯Ąдன၁ᑕϡ̚Ă൴णྭπέᑕϡ඀ёٙᅮ۞̍үณĂ׶ߊѣ඀ёቅ Ă҃ͷТॡΞொങҌк̙࣎Т۞ϫᇾπڱྭπέ۞ொങ͞ё఼૱ߏ౵ԣ۞͞ ྭπέொങ πέ૞ѣ۞ᐹᕇĄٙͽĂᑕϡ඀ё఼૱ਕૉેҖгྵԣĄ ྍүຽր௚ĂЯѩΞͽԆБгӀϡྍٺЯࠎ੫၆Տ࣎পؠπέ۞ொങ࠰૞ᛳ ᇾĄ఺჌͞ёົயϠధк௡۞඀ёቅĂ఺ົֹ଀඀ёቅត଀ᙱͽჯ᜕Ą̙࿅Ă ă҃ͷ่ਕய΍ಏ˘ϫڀপؠπέ۞ொങ͞ёົͧྵ঎෱ॡมăјώྵࠎ੼ পؠπέொങ ሀᑢWindowsொങ ܲ঻ࣧѣ۞඀ёቅ֭ொങ׎ֹٙϡ۞API ྭπέொങ ͽྭπέ۞APIࠎϫᇾ পؠπέொങ ͽ˘࣎үຽր௚׶׎ֹϡ۞APIࠎϫᇾ ځԫఙ ᄲ ܑ15.1 ொങԫఙ ۞჌჌߱͘Ĉ ĂӈࠎଋΞͽϡͽ૟ᑕϡ඀ёҌ˘πέொങҌΩ˘πέڱ˭ࢗ۞ᇴ჌̙Т͞ ொങԫఙ ТॡࠎଋӔ˯׎ฟ൴໤݋Ă͔ጱଋтңฟؕซҖᑕϡ඀ё۞ொങ̍үĄ Windows ᄃ Linux ᒖဩ̚۞ೀ̂͹ࢋ۞̙ТᕇĂ ٺ̬˞ೡࢗܮЕೀ༼̚Ă˭ ᄃ඀ёనࢍ͘Ίܝ15-4 ˢ ۞ྤੈĄ) д15-10ࢱ۞ĶWinCLX ᄃ VisualCLX ಏ̮۞ͧྵķ˘༼Ă֤׊ѣ඾Հк 3 ՀԼٙѣ۞ uses ̄ήĂֹ׎ણ҂Ҍ VisualCLX ̚ϒቁ۞ಏ̮Ą(ኛણ֍ {$R *.xfm} Լࠎ {$R *.dfm} ᓝּֽᄲĂд implementation ડ߱̚૟၆ܑॾ۞ણ໰ҋ Windows ˯Ą ٺܑॾᑫ९д Kylix ׶ Delphi ˯ౌΞͽүϡĂҭ.dfm ܑॾ่ਕүϡ тĂ૟ unit1.dfm ՀЩࠎ unit1.xfmĄٕ۰ߏΐ˯$IFDEF በᛌጡ޽΄Ą.xfm 2 ኛ૟ଋ۞ܑॾᑫ९(.dfm ᑫ९)ኑᄦјྭπέ۞ܑॾᑫ९(.xfm ᑫ९)Ăּ 1 д Windows ˭Ăฟୁӣѣଋ୬࣒Լ̝ VCL ᑕϡ඀ё۞૞९Ą Linux ˯Ĉ ٺኛֶͽ˭۞Վូֽ࣒Լଋ۞ VCL ᑕϡ඀ёĂͽֹ׎ਕેҖ Windows ᄃ Linux ۞඀ёቅડ࿣ฟֽĄ ٺϡ ଀࣒Լଋ۞඀ёቅĂٕ۰ߏֹϡበᛌጡ۞୧І޽΄Ăֽ૟̶Ҿܮ˯Ă֤ᆃଋ ׌࣎πέ̝ٺଋԓ୕ٙொങҌ Linux ۞ VCL ᑕϡ඀ёĂΞͽТॡેҖڍт ࣒Լ VCL ᑕϡ඀ё Windows ᄃ Linux ۞඀ёቅડ࿣ฟֽĄ ٺ૟̶Ҿϡ ༊ଋຐࢋሀᑢ Windows APIs ॡĂଋΞͽֹϡበᛌጡ۞୧І޽΄$IFDEFs ֽ ໂᙱჯ᜕ĄڱLinux ̝˯Ąଂ̍඀۞៍ᕇֽ࠻Ăѩ ٺ૟ Windows ۞Αਕ၁ү υืڱϠ۞ Linux ᑕϡ඀ё࠻੓ֽົՀညߏߊѣ۞ Windows ᑕϡ඀ёĄѩ Ą̙࿅ĂٙயڀĂ҃ͷ΃ᆊΞਕໂࠎ੼ڱሀᑢ Windows ߏ׎̚౵ኑᗔ۞͞ ሀᑢ Windows ொങ ёߛၹ۞ԼචĂЯ಼҃̂гࢫҲჯ᜕˯۞јώĄ Α͈۞ྋՙ̝྽ĂЯࠎιਕૉ౅࿅λณ඀ёቅ۞Вֳăᑕϡ඀܅ߏ౵̙ົڱ ฟ൴ྭπέ۞ᑕϡ඀ё 15-5 ̚Ąኛֹϡ PathDelim ఺࣎૱ᇴؠཌྷ(д SysUtils ̚)Ăֽ޽ؠዋϡ д Linux ր௚̚۞ధк̙Тϫᐂٸ/usr/lib)Ă҃ͷᑫ९Ξਕົజཉ x д Linux ̚۞ྮशЩჍֹϡ୆ቢ(/)ֽઇࠎؠཌྷ௑ཱི(ᓝּֽᄲĈ शЩჍ۞ొЊĄྮז7 ຩವٙѣ૞९ᑫֹ̚ϡ [$ENDIF] IniFile.LoadfromFile('/home/name/x.txt'); [$IFDEF LINUX] [$ENDIF] IniFile.LoadfromFile('c:\x.txt'); [$IFDEF MSWINDOWS] πέ۞඀ёቅĈ ߙ˘ٺ૞ᛳֱ֤טּтĂଋΞͽдଋ۞ࣧؕᑫֹ̚ϡ୧Іበᛌ޽΄ֽଠ д15-16ࢱ۞Ķֹϡ୧Іበᛌ޽΄ķ˘༼Ą) Windows ۞ྤੈĄ(ኛણዦ ٺϡ$IFDEFs(ኛᖰຕгֹϡ)ֽࢨؠֱ֤૞ᛳ 6 ࡶѣߙ˘Αਕд Linux ˯ߏ̙Т۞Ă֤ᆃኛԱ΍׎ඈᆊ۞ΑਕĂତ඾ֹ ࢱ۞Ķྭπέྤफ़ऱᑕϡ඀ёķ˘༼Ą) ѩĂኛֹϡજၗॡഇ඀ёऱ̚۞඀ёĂͽ̈́૱ᇴ۞ؠཌྷĄ(ኛણ҂д15-27 5 ࢦາᇤᆷ׶ Windows ୮̙࠹ֶ۞඀ёቅĂֹ඀ёቅՀ׍πέ፾ϲّĄࠎ ̼ొЊĄ дТ˘ᑕϡ඀ё̚Тॡֹϡ VisualCLX ͽ̈́ WinCLX ۞ෛᛇڱІĄଋ൑ ෛᛇ̼۞ WinCLX ̮ܧଋ۞඀ёĂኛ˼༱̙ࢋдଋ۞ᑕϡ඀ё̚Ăֹϡ ଋχზд Linux ˯በᛌڍWindows ۞ྭπέᑕϡ඀ё੓үϡĄٙͽĂт πέᑕϡ඀ё̚ĂҭΪਕдྭٺෛᛇ̮ІΞజϡܧො ߙֱ Windows ̖ѣ۞ ᑕϡ඀ё̚۞̮ІĄ CLX ٺពϯ΍Ξϡົܮ˯ۍ4 ᐼхѩ૞९ГࢦາΐͽฟୁĄ֤ᆃĂ̮Іࢬ QStdCtrls; uses SysUtils, Types, Classes, QGraphics, QControls, QForms, QDialogs, Լࠎ Dialogs, StdCtrls; uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, ૟˭ࢗ۞ uses ̄ήĂҋܮּ˭ ᄃ඀ёనࢍ͘Ίܝ15-6 ˢ Әކт˭ࢗ۞ݭҾ ̙֭ᅮࢋ૟ TWinControl Լј TWidgetControlĄд QControls.pas ࣧؕᑫ̚Ă ̮І(ּт TScrollingWidget)д VisualCLX ̚݋ѣ඾࠹၆ᑕ۞ЩჍĄ̙࿅Ăଋ ΃˞ VCL ̚۞ TWinControlĄ׎΁۞ WinCLXפ CLX ̚۞ TWidgetControl Ąᓝּֽᄲีטଫ˞ Windows ۞ଠפд VisualCLX ̚۞ෛ඄̬ࢬ̍׍ะĂ Ąפwindow+gadget)۞х ۞ĂVisualCLX ˵೩ֻ˞၆ Qt Вֳ඀ёऱ̝̚ Qt ෛ඄̬ࢬ̍׍ะ(ଂ ౉शĄТᇹٽᖎ۞ีטWindows ଠ פ೩ֻ˞хีטд WinCLX ̚Ăధкଠ ҃ CLX ᑕϡ඀ё݋ֹϡ VisualCLXĄ ёऱ̚۞ᙷҾĄVCL ᑕϡ඀ёົֹϡ WinCLXב̄ WinCLX ᄃ VisualCLX ёऱ̚۞ᙷҾᄃপّ׍ѣ࠹Т۞ЩჍĄVCL ׶ CLX ઱˘۞मҾߏĂבֱ̄ ёऱĄ఺בёऱķ̬ٙ̚௜۞̣࣎̄ב׶ CLX Тᇹౌӣѣдௐ 3 ౢ̚Ķ˞ྋ ΃࿅Ν۞ Visual Component Library(VCL)ĄVCLפPlatform (CLX)Ăϡͽ CLX ᑕϡ඀ёֹٙϡ۞˜ߏ Borland Component Library for Cross WinCLX vs. VisualCLX ො ኛણ҂д15-20ࢱ۞ĶLinux ˯۞඀ёనࢍमளķĄ ё̙ົԼតᑫ९ЩჍ۞̂̈ᆷĂٕ۰ߏ࿰నιࣇົ׍౯ߙ჌ԛёĄ x Яࠎд Linux ۞ᑫ९ЩჍߏડ̶̂̈ᆷ۞Ăٙͽኛቁؠଋ۞ᑕϡ඀ ྮश̶࿣ф̮Ą ྍր௚۞ٺཱི(:)Ąֹ ϡ PathSep ૱ᇴؠཌྷ(д SysUtils ̚)ֽ޽ؠዋϡ x дଋ޽ؠк࣎ྮशЩჍ̝఍Ă૟ྮश۞̶࿣ф̮ĂϤ̶ཱི(;)Լј݂ ྍր௚ԛё۞ҜཉĄٺ૱ᇴؠཌྷ(д SysUtils ̚)ֽ޽ؠዋϡ ф̮ߏӎࠎཱི݂ĂᖣͽವԱჃჄ፟ф௑۞඀ёቅĄኛֹϡ DriveDelim x Լត၆ჃჄ፟ф௑۞͔ϡ(ညߏ C:\)ͽ̈́ߙֱӀϡͧ၆фҚ۞ௐ˟࣎ ۞ϒቁҜཉĄ ྍր௚۞ྮशЩჍؠཌྷ௑ཱིĄኛТॡଋቁᄮд Linux ˯Տ࣎ᑫ९ٺ ฟ൴ྭπέ۞ᑕϡ඀ё 15-7 ଋдڍWinCLX ̚ĂEnter ᔣ۞ᔣࣃߏ 13Ă҃д Linux ˯݋ߏ 4100Ąт y д WinCLX ᄃ VisualCLX ְІ̚۞ᔣࣃ˵Ξਕົ̙ТĄᓝּֽᄲĂд ౵౤ბ۞ีϫĄזϫĂ҃ߏೈᒖгГа ࣎ี˘ޢଋ޺ᜈг޷඾Ķ˭ķĂ֤ᆃι̙֭ົઃዸд௡Ъ͞๴୻ಏ۞౵ ௡Ъ͞๴۞୻ಏ̚Ą҃ͷĂ઄тזͽ૟˘࣎۩Ϩ(՟ѣфҚ̰ट)۞ีϫΐ EnterĄଋΞͽ૟ InsertMode నј ciNone ᖣͽᙯౕѩΑਕĄ҃ͷଋ˵Ξ ΐҌ˘˭ٛё୻ಏ̚ĂΪืд௡Ъ͞஼۞͛фበᏭડᏮˢ͛фă޷˭ д WinCLX)̚ĂଋΞͽ૟˘ีϫܧ҃)WinCLX ̙̚ТĄд VisualCLX y д VisualCLX ̚Ă௡Ъ͞๴(combo box)дેҖॡഇ۞Җࠎ˵׶д ҃ͷ̂̈׽ؠ۞Ą ߏ modal ٕ̂̈׽ؠ۞Ąд Windows ˯ĂTColorDialog ˘ؠߏ modal ϡ۞ෛ඄გநࣶ(Window Manager)҃ѣ̙ٙТĂTColorDialog ̙֭˘ؠ ҋࢎᗞҒᏴፄ၆ྖ͞๴۞γ៍ᄃΑਕĄТᇹ۞Ăд Linux ˯ົֶଋٙٙ ڱy д VisualCLX ̚ĂTColorDialog ̙֭׍౯ Options পّĄЯѩĂଋ൑ ĄีטWinCLX ̚݋՟ѣΑਕ࠹Ⴭ۞ଠ ѣ࣎Щࠎ ToggleButton ۞পّĂ҃дีטy VisualCLX ۞ TButton ଠ ᇤᆷ CLX ᑕϡ඀ёॡᑕྍࢋ˞ྋ۞मளĄځᄲܮдώ༼̚Ă ᔵ൒ VisualCLX ೀͼ၁ү۞׶ WinCLX ˘ᇹĂҭ̪ᖞхдֱధ۞̙ТĄ҃ VisualCLX ۞̙Т̝఍ ಏ̮۞၁үડ߱˵Ξͽӣѣιҋ֗۞ uses ̄ήĄ) ಏ̮۞ЩჍĄ(̂кᇴ۞૞९ᑫ९ͽ̈́ಏ̮̝ࠧ̚ࢬડ߱࠰ӣѣ uses ̄ήĄ ͽঐੵ၆ֱ֤д VisualCLX ̙̚хд۞ಏ̮ણ໰ĂТॡ૟׎ЩჍՀԼࠎ CLX д CLX ̚ĂߙֱᙷҾ۞ಏ̮ЩჍᄃҜཉߏ̙Т۞Ąଋົᅮࢋ࣒Լ uses ̄ή ІĄۏ hook ۞טநְІ፟ Іć࠰׍ѣ˘Щࠎ Hooks ۞পّĂϡͽણ໰Ҍ఍ۏ ۞পّĂϡֽણ໰Ҍ Qt ͽᖎ̼඀ёቅ۞ВֳયᗟĄTWidgetControl ᄃ׎ࢉϠ۰࠰׍ѣ˘Щࠎ Handle TWinControl = TWidgetControl; ᄃ඀ёనࢍ͘Ίܝ15-8 ˢ BDE dbExpressᄃ˘ਠ۞ྤफ़ऱ̮І Automation Servers ՟ѣ೩ֻ ADO̮І ೩ֻ˞˘ਠ۞ྤफ़ऱ̮І Windows/VCL۞Αਕ Linux/CLX۞Αਕ ܑ15.2 Հજᄃ࠹ள۞Αਕ ѣ۞ྖ)ĄڍΑਕ(т Е΍˞׌πέ̚࠹ள۞ΑਕĂТॡ˵Е΍˞д Linux ٕ VisualCLX ̚ඈᆊ۞ BDEăCOM ࠰ࠎ Windows ˯۞পؠԫఙĂ҃՟ѣд Kylix ̚೩ֻĄ˭ܑ̚ Linux ᒖဩ˯ĄѣֱΑਕĂт ActiveX ăADOă זΑਕĂ֭՟ѣజۡତгວ ˘ਠֽᄲĂVCL ᄃ CLX ˯۞Αਕߏ࠹Т۞ĄҭߏĂ̪ѣֱ Windows ૞ᛳ۞ ொങٕ;̝ᗒт۞Αਕڱ൑ ІĄଋ˵Ξͽણ҂[щ྅ϫᐂ]\Delphi\Source\CLX ̚۞ࣧؕቅĄۏ ٙѣ CLXٺ଀ᙯפ͘ΊĂͽځᔘѣ˘ֱ׎΁۞मҾĂኛଋણ҂ CLX ቢ˯ᄲ Αਕ)Ąٸٳy DragCursor ᄃ DragKind(ҭ̪ѣ y а໖࠹ट۞ΑਕĂּт Win3.1 ˯۞ࢱច(tab)ͽ̈́ Ctl3D ඈ̮ІĄ Ąڱy Docking পّᄃ͞ І̪൒׍ѣ୆ࢬّኳ)ۏຍѣֱڦ୆ࢬপّ(ኛ۞˯ีטy д˘ਠଠ ϤΠҌν۞͛фᏮˢᄃᏮ΍۞ᗕШপّ(BidiMode)Ąٺy ϡ ăְٕІĈڱߙֱ VisualCLX ᙷҾ̪൒৿͌ߙֱপّă͞ ᛉଋֹϡࢲॾĄޙ൒̪൒Ξͽд Linux ˯ֹϡ owner drawĂҭԧࣇᔘߏ ΞͽଳϡБາ۞γ៍Ąᔵܮߏֹϡ˞ࢲॾĂෛ඄̬ࢬ̍׍ะٕᑕϡ඀ё ϡ TApplication.Style পֽّ޽ؠᑕϡ඀ё̝ဦԛ̼̮৵۞ෛᛇγ៍Ąࡶ OwnerDraw পّ̝γĂଋ˵Ξͽֹ ٺy ᑕϡ඀ёቑಛ۞Ķࢲॾķੵ˞జϡ ᑕϡ඀ёொങҌ LinuxĂٕߏଂ Linux ொങҌ WindowsĄ ଀ΐͽԼតĂͽ૟ WindowsܮᑭߤᔣࣃĂ֤ᆃଋֽڱ඀ё̚ͽᆷѪ۞͞ ฟ൴ྭπέ۞ᑕϡ඀ё 15-9 y Borland ۞ make ̳ϡ඀ёĄኛԼϡ GNU ۞ make ̳ϡ඀ёĄ y ඀ёऱሀ௡ᄃइІ࠰ͽ.so ᑫ९၁үĄ var Var2: Byte absolute Var1; ˘࣎តᇴćᓝּֽᄲĈ Ә˯ֹϡ۞ߏ඗၆ҜӬĄଋΞͽֹϡѩ˘඗၆ҜӬֽ޽ঘΩކy дតᇴ۞ Ķ̰ӣ௡Ъᄬ֏ቅķ˘༼)Ą ΨůЯࠎ Delphi ົࠎଋயϠϒቁ۞඀ёቅĄ(ኛણ҂д15-19ࢱ۞ײё۞ בᛌ޽΄)ĄଋΪѣдֹϡ௡ᛌጡॡ̖ᅮࢋፉ͕Бા੃ጸវ۞ؠӬᄃγొ Linux ˯Ă̙̯ధតᇴؠӬҌ੃ጸវ̚۞඗၆ҜӬ(ֹϡ absolute ఺࣎በ Ψ̝มజ޺ᜈгܲх඾Ą఺ຍᏜ඾ĂдײҖĂ҃ EBX ᇶхጡ۞ࣃυืд EBX ᇶхጡ۞͞ёซ ٺΨĂ࠰ͽ࠹၆ײё۞בጸវ۞ؠӬăͽ̈́၆γొ ᑫ९)Ă׎̚ӣѣٙᏜĶ׶Ҝཉ൑ᙯ۞඀ёቅ(PIC)ķĄЯѩĂ၆Бા۞੃ І඀ёऱ(.soۏߏٙᏜ۞Вֳܮy Linux ̚׶ Windows ۞ DLL ඈᆊ۞Ă ׎΁д Kylix ˯Ϗ͚೯Ăٕߏ͚೯͞ё̙Т۞ొЊ݋ѣĈ Winsock BSD sockets QtְІ טWindowsੈि፟ Ψײёב۰׎΁ր௚඀ёऱ̚۞ ΨăٕײёבΨălibcײёבăQtڱΨ VisualCLX͞ײWindowsր௚ ̄ฎІੈिĄ SMTP/POP3ឰଋΞͽ૙ਖ਼ăତќăͽ̈́ᐼх࿪ ё۞ᇾ໤඀ёऱבטੈि፟ Interface(MAPI)̚உ߁˞Windows Message Application Programming ՟ѣ೩ֻ ۞̮І) ᖞѣ۞̮І(ညдWin 3.1̮ІࢱѨ˯ Ϗ೩ֻإ Internet Express FastNet ՟ѣ೩ֻ Web ServicesٺDataSnap Ϊϡ COM+̮І(ΒӣActiveX) ՟ѣ೩ֻ Windows/VCL۞Αਕ Linux/CLX۞Αਕ ᄃ඀ёనࢍ͘Ίܝ15-10 ˢ Classes Classes CheckList QCheckList Button QButtons ActnList QActnList WinCLXಏ̮ VisualCLXಏ̮ ܑ15.3 WinCLX-onlyᄃඈᆊ۞VisualCLXಏ̮ γొᇄથ۞ಏ̮݋̙ΐͽЕ΍ĄٺЩჍ࠹Тٕߏᛳ ͽ˭۞ܑॾЕ΍˞д WinCLX ᄃ VisualCLX ಏ̮̚ЩჍ̙Т۰Ąд˟۰̚ ่ѣ۞Ą VisualCLX ಏ̮Ą˵Е΍˞ֱ֤ಏ̮ߏ WinCLX ่ѣ۞Ăֱ֤ߏ VisualCLX дώ༼̚۞ܑॾĂܑЕ΍่д WinCLX ̚۞Ч࣎ಏ̮Ăͽ̈́࠹၆ᑕ۞ ಏ̮ٕᇾᗟᑫЩჍ̝݈ĄזՀજĂಶߏԯ Q ΐ ଋಶົᅮࢋдᑕϡ඀ё۞ uses ̄ή̚ĂԼត఺ֱಏ̮۞ЩჍĄ౵૱ઇ۞ЩჍ ଋࢋ૟ VCL ᑕϡ඀ёଂ Windows ொങҌ LinuxĂڍёऱ̚۞̙ТĄтב̄ ёऱ̚۞ CLX ಏ̮Ă݋׶ WinCLXב̄ ̚۞ಏ̮ǬĄ̙࿅Ăд VisualCLX DateUtilsăDBăSystemăSysUtils ͽ̈́ధధккдેҖॡഇ඀ёऱ(RTL) ߙֱ VCL ᑕϡ඀ё̚۞ಏ̮˵Тᇹ΍னд CLX ᑕϡ඀ё̚Ăּт Classesă ̮ߏࢋᙥඕҌ૞९̚۞Ą జΐҌ uses фή̚ĂϡͽӘ෦በᛌጡྍಏົܮІॡĂྍಏ̮۞ЩჍۏ˘ֹϡ ॾ˯Ăٕ۰ߏдଋ۞ᑕϡ඀ёܑ̚ٺІཉۏ˘ᖂᙷҾ TComponentĄ༊ଋ૟ TObject ۞၁үĂ҃ Classes ಏ̮̚݋ؠཌྷ˞ૄ זଋΞͽд System ಏ̮̚Ա ІĂ࠰ͽಏ̮ᑫ(.pas ۞ࣧؕᑫ)۞͞ёؠཌྷĄᓝּ҃֏Ăۏٙѣд̮Іऱ̚۞ WinCLX ᄃ VisualCLX ಏ̮۞ͧྵ જၗ۞ᕱᜓྤ໚Ąڱ໚ЩჍĂଋ൑ྤ۞זϡ y ̙͚֭೯ resource introspectionĄᑕϡ඀ёдበᛌॡഇυืۢ྽ٙѣજ AssemblerĄ Ăּт NASM ᄃ Netwideڱ͚೯۞Һ෱ăΞᛸ之 x86 ௡ᛌጡ۞ᄬ ιࣇֹϡ Kylix ٙܧ๗ˢγొ۞௡ᛌጡ૱ёĂੵڱy Ϗ͚೯ TASMĄଋ൑ ฟ൴ྭπέ۞ᑕϡ඀ё 15-11 ADOConst ৿ͻADOΑਕ ಏ̮ЩჍ జଵੵ۞ࣧЯ ܑ15.5 WinCLXٙ፾ѣ۞ಏ̮ ۞ಏ̮Ą Windows ٺညߏ CtlPanelăMessagesăRegistryăͽ̈́ Windows ఺ᙷ่ϡ Windows ૞ᛳ۞ΑਕপҒĂኜт ADO ಏ̮ăBDE ಏ̮ăCOM ಏ̮ăͽ̈́ ٺ˭Е۞ Windows VCL ಏ̮Ăд CLX ̚ೀͼౌ՟ѣĄЯࠎ఺ֱಏ̮࠰ᑕϡ ёऱ۞̬ࢬבQt Qt QStyle GUI۞ෛᛇγ៍ DirSel ϫᐂᏴፄ ಏ̮ЩჍ ೡࢗ ܑ15.4 VisualCLXٙ፾ѣ۞ಏ̮ ˭Е۞ಏ̮ᛳ VisualCLX ፾ѣĈ VclEditors ClxEditors StdCtrls QStdCtrls StdActns QStdActns Search QSearch Printers QPrinters Menus QMenus Mask QMask ImgList QImgList Grids QGrids Graphics QGraphics Forms QForms ExtCtrls QExtCtrls DBGrids QDBGrids DBCtrls QDBCtrls DBActns QDBActns Controls QControls ComCtrls QComCtrls Clipbrd QClipbrd WinCLXಏ̮ VisualCLXಏ̮ ᄃ඀ёనࢍ͘Ίܝ15-12 ˢ mxConsts ৿ͻCOMΑਕ Mtx ৿ͻCOMΑਕ MtsRdm ৿ͻCOMΑਕ Mtsobj ৿ͻCOMΑਕ ඀ёٸWindowsٙপѣ۞ಫវᇥזMPlayer ᅮϡ MidasCon Я࿅ॡ҃஌՛ Messages Windowsٙপѣ۞ొЊ MConnect ৿ͻCOMΑਕ Ϗ͚೯إListActns ϫ݈ FileCtrl Я࿅ॡ҃஌՛ ExtDlgs ̙׍౯ဦԛ၆ྖ͞๴ ExtActns Delphi6̖̚ѣ۞າΑਕ DRTable ৿ͻBDEΑਕ DdeMain ৿ͻBDEΑਕ DBTables ৿ͻBDEΑਕ DBPWDlg ৿ͻBDEΑਕ DbOleCtrl ৿ͻCOMΑਕ DBLookup Я࿅ॡ҃஌՛ DBInpReq ৿ͻBDEΑਕ DBExcept ৿ͻBDEΑਕ DBCGrids ৿ͻBDEΑਕ DataBkr ϏֽΞਕົ͚೯ Ϗ͚೯إCustomDlg ϫ݈ CtlPanel ̙͚೯Windows۞Control Panel CorbaVCL ৿ͻCorbaΑਕ CorbaStd ৿ͻCorbaΑਕ CorbaCon ৿ͻCorbaΑਕ ConvUtils ̙׍ѩΑਕ ComStrs ৿ͻCOMΑਕ ColorGrd ϫ݈֭Ϗ͚೯ CmAdmCtl ৿ͻCOMΑਕ Ϗ͚೯إChat ϫ݈ Ϗ͚೯إCalendar ϫ݈ BdeConst ৿ͻBDEΑਕ AxCtrls ৿ͻCOMΑਕ ІۏAppEvnts ৿ͻTApplicationEvents ADODB ৿ͻADOΑਕ ಏ̮ЩჍ జଵੵ۞ࣧЯ ฟ൴ྭπέ۞ᑕϡ඀ё 15-13 ྿јĄֽڱ͞ І۞ Createۏॾ̝˯ĄΩ˘۰݋ߏۡତд඀ёቅ̚Ă౅࿅ྍܑٺ Іཉۏϲ۞͞ёĄ׎̝̚˘ߏдܑॾనࢍ̍׍̚Ă૟ྍޙІజۏ ѣ׌჌ CLX मள۞ڱၹ͞ޙІۏ CLX ኛӁଫ uses ̄ή۞ಏ̮Ă֭ࢦາဘྏĄ File not found: 'unitname.dcu' ќ˭ࢗ۞᏾ᄱੈिĈົܮ۞ಏ̮Ă֤ᆃ ଋྏ඾በᛌ۞ᑕϡ඀ё̚Ăӣѣྭπέᑕϡ඀ё̙ٙ̚׍౯ڍҾ۞ણ໰Ąт Linux ˯Ăಶ଀ोଫ၆఺ֱಏ̮̚ಏ̮ᄃᙷ ٺଋԓ୕ଋ۞ᑕϡ඀ёેҖڍт Windows ৿ͻWindows۞API WebConst Windowsٙপѣ۞૱ᇴ VCLCom ৿ͻCOMΑਕ Ϗ͚೯إVarConv ϫ݈ Ϗ͚೯إVarComplx ϫ݈ Ϗ͚೯إValEdit ϫ݈ ToolWin ৿ͻDockingΑਕ Tabs Я࿅ॡ҃஌՛ Tabnotbk Я࿅ॡ҃஌՛ SvcMgr ᅮࢋNT Services Ϗ͚೯إStdConvs ϫ݈ SHEDocVw_ocx ৿ͻActiveXΑਕ ؠםSConnect ̙͚֭೯ాቢ఼ੈ ΃פScktComp ͽSocketsΐͽ ΃פScktCnst ͽSocketsΐͽ Registry Windowsٙ፾ѣ۞ր௚൳ᐂ Outline Я࿅ॡ҃஌՛ OleServer ৿ͻCOMΑਕ OLEDB ৿ͻCOMΑਕ OleCtrls ৿ͻCOMΑਕ OleCtnrs ৿ͻCOMΑਕ OleConstMay ৿ͻCOMΑਕ ώۍObjBrkr Ξਕົ΍னдϏֽ۞ ಏ̮ЩჍ జଵੵ۞ࣧЯ ᄃ඀ёనࢍ͘Ίܝ15-14 ˢ Windows ҃ ٺᄃ CLX ̚ѣॡ࣏Ξਕົ̙ТĄӈֹଋ۞ CLX ᑕϡ඀ёેҖ ְІĄЯࠎ఼ӘְІֹϡ۞ߏ̙Т۞ր௚ĂְІ۞ึԔᄃ൴Ϡॡ፟Ăд VCL ᆸෛ඄̍׍ะᆸ۞఼ӘغౢĶ఍நੈिᄃր௚఼ۢķ)Ąιࣇ҃ͅߏаᑕֽҋ Windows ̝˯(ኛણ҂ Component Writer’s Guide ۞ௐ 7 ٺੈिĂӈֹેҖ ତаᑕ Windowsۡົ̙֭ีטĂVisualCLX ଠٺ׍ะְІĄ౵ࢦࢋ۞मளд ߏր௚ᄃෛ඄̍ܮдᇤᆷ͛ІॡĂVCL ᄃ CLX д఍ந˯Ă౵͹ࢋ۞मளĂ ఍நր௚ᄃෛ඄̍׍ะְІ д InitWidget ̖̚నؠྍপّ̝ࣃĄޢռ૜۞ྤफ़᛼Ҝតᇴ̚Ă൒˘ٺ Ψ Qt ֽనؠ׎ᗞҒĄӎ݋۞ྖĂଋ଀૟ྍࣃхײг͕ٸΞͽܮ˞Ă֤ᆃଋ ଀ Qt ۞ handleĄ࣐ࡶ Handle జ੨ཉפHandleAllocated ᑭߤ࠻࠻ଋߏӎ̏ ᓝּֽᄲĂ઄నଋѣ࣎Щࠎ Color ۞পّĂд SetColor ̚ĂଋΞͽͽ ၹॡ̖ซҖĄޙၹજүĂజؼᏵҌι۞ቁᅮࢋజޙІ۞ۏ ̚Ą఺˵ֹ଀ Qt InitWidget ˞זপّࣃ޽ࠁજүĂ݋జວ۞̚ڱၹ͞ޙ ѣֱࣧώд Create ੵΝĄ۞׀˘ᆸ۞ෛ඄ࠧࢬ̍׍˵ົజغІĂ֤ᆃ ۏ Ă઄ࡶଋӁੵྍ CLXޢ̝ Ψ OwnHandleײᆸ۞ෛ඄ࠧࢬ̍׍Ąдغጾѣ ઄నֽڱ͞ ІĂּт TBrush ᄃ TPenĂ̯ధଋֹϡ OwnHandleۏ ѣֱ CLX ׍ݒ̙ົĄ఺ߏ׶ VCL ̙ٙТ۞˘ᕇĄ ᆸ۞ Qt ෛ඄ࠧࢬ̍غІົజੵΝĂ҃ۏ ॡĂ่ѣྍ CLXڱ͞ Ψ׎ FreeײГ ĂޢІ̝ۏϲྍޙ̙ጾѣజ็ˢ۞ Qt ෛ඄ࠧࢬ̍׍ĄЯѩĂ༊ଋͽ఺჌͞ё І֭ۏ ၹॡٙϡĄଋυืկ੃˘ְĂ˵ಶߏѩ CLXޙІдۏІĂͽ೩ֻྍۏ QWidget_Create()ֽ྿ј۞Ąଋ଀૟ߊх۞˘Њ Qt ෛ඄ࠧࢬ̍׍็ᅍග CLX Ψ Qt ̬ࢬ඀ёऱĂּтײІॡĂ˜ߏ౅࿅ۏ ϲ CLXޙ༊ଋۡତͽ඀ёቅ Ąזϡ඀ё̚۞̮Іऱ྆ᐝ࠻ ᆸෛ඄ࠧࢬ̍׍˵ົТॡгజӁੵĄѩᙷ۞Αਕଋ˵Ξͽд Windows ᑕغ ІॡĂιٙጾѣ۞ۏІ۞ͭटጡҋજгӁੵྍۏΨ҃జӁੵĂٕ۰ߏྍײజ ڱ͞ І۞ FreeۏІ݋ົጾѣྍЊෛ඄ࠧࢬ̍׍Ą༊ྍۏ (widget)Ą҃ѩ CLX ᆸෛ඄ࠧࢬ̍׍غІ۞ۏྍٺϲ˘Њ࠹၆ᑕޙϲॡĂ˵ົТॡޙІజۏ༊ ฟ൴ྭπέ۞ᑕϡ඀ё 15-15 πέ҃ள۞યᗟĄ ؠཌྷĄᓝּֽᄲĂֹϡ PathDelim ૱ᇴؠཌྷֽ࿣ᗓĶ/ķᄃĶ\ķ఺჌ົᐌ඾ ѩĂ˵ኛචϡд SystemăSysUtilsăͽ̈́׎΁ેҖॡഇ඀ёऱಏ̮̚۞૱ᇴ ኛྏ඾ֹϡᄃπέ൑ᙯ۞ેҖॡഇ඀ёऱ૱ёֽᇤᆷଋ۞඀ёቅĄ่̙т ͚೯Ą(ણዦд15-19ࢱ۞Ķ̰ӣ௡Ъᄬ֏ቅķ˘༼Ą)۞ڱֻ၆ TASM ᄬ TASM ௡Ъᄬ֏ቅĄGNU ۞௡ᛌጡЩࠎĶasķĂ̙֭೩ ۞זy ொങٙѣϡ y ៍၅ăܲ঻ᑫ९̈́ϫᐂЩჍ۞̂̈ᆷĄ ΃ TRegIniFileĄפֽ y ֹϡ TMemIniFile CLX аᑕր௚఼Әķ˘͛Ą І۞ซ˘ՎྤੈĂኛଋણ҂ Component Writer’s Guide ̚۞ௐ 7 ౢĶֹϡ ᇤᆷаᑕր௚ᄃෛ඄̍׍ะְІ̝̮ٺĄᙯڱ͞ QApplication_sendEvent SendMessage) Ąд CLX ̚ĂኛԼϡ QApplication_postEvent ͽ̈́ ϡ(PostMessage ăֹ۞טy ঐੵдᑕϡ඀ё̚၆ Windows ੈि፟ ёऱΐͽആ΃Ąב Qt ٕڱ͞۞̚ Ψćኛͽ CLX ײ۞(y ഴٕ͌۰ߏ࿣ᗓ၆πέপؠ̝ API(̙გߏ Windows ٕߏ Linux гд Windows ᄃ Linux ̝มொങ۞ᑕϡ඀ёĂኛ੃଀ĈٽϲΞᅅޙࡶຐ ௚˯۞मளĄ ଋΞͽᚶᜈଋд Windows ˯۞඀ёቅᇤᆷ̍үĂТॡ҂ᇋд Linux үຽր ͽֹϡд̙Т୧Іనؠ˭በᛌ۞͞ёĂֽᇤᆷଋ۞඀ёቅĄֹϡ୧ІበᛌĂ ׌࣎үຽր௚̝˯ĄଋΞٺ઄ࡶଋຐࢋᇤᆷྭπέ۞ᑕϡ඀ёĂТॡгેҖ ᇤᆷ׍Ξᛸّ۞඀ёቅ ણ҂ Component Writer’s Guide ̚۞ௐ 7 ౢĶֹϡ CLX аᑕր௚఼Әķ˘͛Ą CLX ̮Іٙ൴Ҷְ̝І)̝̮І۞ซ˘ՎྤੈĂኛଋ ܧ҃)ᄃෛ඄̍׍ะְІ ᇤᆷаᑕր௚ٺΞਕ଀ԼតְІ఍ந඀Ԕаᑕ۞͞ёĂͽЯᑕѩ˘मளĄᙯ ࢋொങ VCL ᑕϡ඀ёҌ LinuxĂଋڍLinux ˯Ă̪൒ົхд఺࣎मҾĄт ܧ ᄃ඀ёనࢍ͘Ίܝ15-16 ˢ જϡ$IFDEF ߏӎਕૉᇤᆷ఺߱඀ёቅĉķ ׸ĉ౵ࣧؕ۞׌࣎યᗟᑕྍߏĶࠎ̦ᆃ఺߱඀ёቅ଀ֹϡ$IFDEFĉķͽ̈́Ķ̙ Ϩңॡ̖ߏֹϡ$IFDEFs ۞Ъநॡ፟Ąңॡ̖ߏֹϡ۞рॡ፟ځЯѩଋᅮࢋ ᄃ Linux ̝˯۞඀ёቅĄ̙࿅ĂЯࠎ$IFDEFs ົֹ଀ࣧؕቅᙱͽநྋᄃჯ᜕Ă Ъந۞߱͘Ăֽ୧І̼ଋд Windowsޝֹϡ$IFDEF በᛌጡ޽΄Ă˜ߏ˘࣎ ֹϡ୧Іበᛌ޽΄ Linux πέ̝˯۞Ą ٺֽ΃ܑѩ߱ࣧؕቅߏజϡֽበᛌ Linux ̝˯Ă่҃ؠཌྷ LINUX ఺࣎୧І௑ཱིĂϡ ٺ఺࣎୧І௑ཱི֭Ϗؠཌྷ ϡ$IFDEF ડ߱۞ᇴ̙ࢋ͉кĂͽჯ޺ࣧؕቅ۞Ξ᝝ّᄃΞᛸّĄWIN32ֹט ёĄТॡӅ˧ࢨב૟׶πέ࠹ᙯ۞඀ёቅ࿣ᗓฟֽĂјࠎಏ˘ડٕ߱۰ߏ̄ јࠎ̷၁ΞҖ۞ྋՙ͞९Ă֤ᆃኛྏ඾ڱёĂ൑ב઄ࡶֹϡજၗॡഇ඀ёऱ தјώĄ Ψॡٙ;΍۞ड़ײкҜ̮௡۞ડાّ(locale)ф̮఍ந඀Ԕдܧ൒ҺΝ˞၆ ׌࣎Ҝ̮௡۞кҜ̮௡ф̮Ăҭ̪ٺ̂˞׍ѣπέΞᛸّĂТॡ͚೯ܮּ˯ ;end inc(p); else p := StrNextChar(p) if p^ in LeadBytes then begin while p^ <> #0 do ΃ĈפΞͽజͽт˭఺჌׶πέ൑ᙯ۞඀ёቅֽΐͽ end; inc(p); inc(p); if p^ in LeadBytes then begin while p^ <> #0 do ۞ Windows ඀ёቅΞਕົᙷҬт˭ٙࢗĈ ёĄߊѣב ̱࣎Ҝ̮௡)Ą׌࣎πέ࠰ਕֹϡд SysUtils ̚۞ StrNextChar Տ࣎ф̮זҜ̮௡(၆ UTF-8 ф̮۞በቅĂΞਕкז௡ф̮۞በቅݒΞਕϡ ၆Տ࣎кҜ̮௡ф̮Ă่ͽ׌࣎Ҝ̮௡ΐͽበቅĄ҃д Linux ˯Ă၆кҜ̮ Ω˘࣎યᗟĂ݋ߏ׌࣎πέ˯၆кҜ̮௡ф̮۞ֹϡѣ̙ٙТĄWindows ฟ൴ྭπέ۞ᑕϡ඀ё 15-17 ઍീ΍ֽĄٽજၗॡഇ۞᏾ᄱĂߏͧྵटٺᛌ˯۞᏾ᄱ࠹ྵ ࢋֹ׎རд$ELSE ̄ή̚Ă҃дજၗॡഇயϠ̙Ξநྋ۞ன෪ĄЯࠎበ በᛌĂ˵̙ڱд$IFDEFs ̙̚׍Ξᛸّ۞඀ёቅĂှΞֹࣧؕቅ൑ٺ၆ {$ENDIF} ѩ఍Ąז(16-bit ۞ Windows ඀ёቅ) //᏾˞ĊĊд Linux ̚ົଫ {$ELSE} (32-bit ۞ Windows ඀ёቅ) {$IFDEF WIN32} ᓝּֽᄲĂᖞ۞඀ёቅΞਕົѣĈ $IFDEF MSWINDOWS/$ELSE ֽΐͽആ΃Ą Windows ۞$IFDEF ડ̶߱ฟĂֹϡ$IFDEF LINUX/$ELSE ᄃ ٺ૞ϡ Linux ᄃ ٺy ᔖҺд׶πέ࠹ᙯ۞$IFDEFs ˯ֹϡ$ELSE ̄ήĄኛ૟૞ϡ y ᔖҺТॡֹϡ$IFNDEF/$ELSEĄኛֹϡ$IFDEFĂົѣྵָ۞Ξ᝝ّĄ IFDEF MSWINDOWSĄ$ٺಶĶ̙ķඈڍ ඗၆υࢋ۞ଐԛĂኛᔖҺซҖͅ࠹ീྏĄည$IFNDEF LINUX ۞ඕז̙ y WIN64Ą ٺүྻڱቁ۞ۢ྽ι൑ځଋ̏ܧWIN32 ̝˯Ăੵ ٺט۞඀ёቅࢨ Windows πέ(ညߏ 32-bit ᄃ 64-bit ۞ Windows)̝ม۞मளĄኛ̻૟ଋ ೯ WIN32 ۞πέĄኛܲ঻၆$IFDEF WIN32 ۞ֹϡĂϡͽડҾপؠ y ˘ਠֽᄲĂଋΞͽֹϡ$IFDEF MSWINDOWS ֽീྏϫ݈πέߏӎࠎ͚ ΞͽдЇ˘इІֹ̚ϡ$IFDEFsĄ ϲ׌࣎నࢍॡഇइІĂ̙ޙซҖྭπέ൴ण̍үॡĂ̮І۞ᇤᆷ۰υื y ˼༱̙ࢋдइІᑫ(.dpk)ֹ̚ϡ$IFDEFsĄኛΪдࣧؕቅᑫ९ֹ̚ϡĄд ֍۞Ą ९̚ĄԆБ૟ٙѣࣧؕᑫࢦາበᛌд̂кᇴ Delphi ۞૞९̚ĂߏȈ̶ց дበᛌॡ̖ົజ఍நĄDelphi ̙֭˘ؠ૟ಏ̮ࣧؕᑫ(ᇾᐝᑫ)በᛌҌ૞ ༱̙଀̏Ăӎ݋඗ֹ̙ϡ$IFDEFsĄдࣧؕᑫ९̚۞$IFDEFs Ϊѣܧy ੵ ኛֶ໰˭ࢗ۞໤݋Ăдྭπέ۞ᑕϡ඀ёֹ̚ϡ$IFDEFsĈ ᄃ඀ёనࢍ͘Ίܝ15-18 ˢ Ą$ELSEIF υืͽ$IFEND ඕՁĄ$ELSEIF ̙צజତົܮ$ELSE ̄ή۞̰ट Ă֤ᆃצ۰՟ѣЇң˘࣎జତˬ݈ڍĄтצдα჌ଐԛ̚ĂΪѣ˘۰ົజତ hance {$IFEND} last c {$ELSE} beep {$ELSEIF somestring = 'yes'} goforit it {$ELSEIF RTLVersion >= 14} do_do {$IFDEF doit} Ąͽ˭ࠎּĈצ୧Іડ߱Ă҃׎่̚ѣ˘ડ߱ົజତ ELSE ᄃ$IF ΐд˘๴Ą$ELSEIF ޽΄ឰଋΞͽᇤᆷк߱۞$ٺ$ELSEIF ಶඈ ۰Ăυืࢦෛ۞͹ࢋયᗟĄ ώ̝ᑕϡ඀ёฟ൴ۍк̙࣎Тٺᇄથᄃԓ୕඀ёቅેҖ˧םˬटّĂߏௐ ࠹˭ـώ۞በᛌጡߏ̙ᄮ଀$ELSEIF ۞Ą૟$IF ᔳᖟ੓ֽͽᒔ଀ۍĂ҃ᖞצ జତົ̙ܮ Ă֤ᆃ$ELSEIF˞צIF Аజତ$ڍ΃{$ELSE}ĂЯࠎтפֽ{True ĂயϠበᛌ˯۞᏾ᄱĄд఺჌ଐԛ̚ĂଋΞͽֹϡ{$ELSEIFޢ҃дྍҖ̝ ELSE ॡĂົᄮࠎιߏ$IFDEF ۞˘ొЊĂ$זώ۞በᛌጡ࠻ۍ$ELSEĄЯࠎᖞ гֹϡ$IF ॡĂኛચυ̙ࢋ׶$IF ˘੓ֹϡېො ༊ଋд$IFDEF/$ENDIF ̚૰ ՁĄଋ˵่ਕͽ$ENDIF ֽඕՁҁё۞ி޽΄($IFDEFă$IFNDEFă$IFOPT)Ą Ᏸᙊ$IFEND ఺࣎޽΄Ą$IF ่ਕͽ$IFEND ඕڱώ۞በᛌጡ൑ۍĄᖞזጡ࠻ ώ۞በᛌۍᖞז$IFDEF/$ENDIF Ξͽ૟$IF/$IFEND ડ߱ᔳᖟ੓ֽĂ̙҃ ኛֹϡ$IFEND ޽΄ֽඕՁ$IF ͽ̈́$ELSEIF ୧І޽΄Ąֹϡ ඕՁ୧І޽΄ ଀Հк۞࠹ᙯྤੈĄפĶConditional CompilationķᇾᗟĂ ٙѣ୧І޽΄дቢ˯ Help ̚࠰ѣ࠹ᙯ۞͛ІĄଋΞણዦቢ˯ Help ̚۞ Ąזώ۞በᛌጡ࠻ۍᔳᖟ੓ֽĂ̙҃జᖞڱ IFDEFs ̚Ăᖣͽ૟າ۞$IF ᄬ$ٺᛌ޽΄۞̰टĄଋΞͽ૟$IF ྻზёཉ ENDIF ֽඕՁ$IF በ$ܧ҃ IFDEFsĄଋᑕྍֹϡ$IFEND$۞ېֽആ΃૰ ზёྻڒy дᅮࢋኑᗔ۞ീྏଐԛॡĂኛֹϡ$IFĄኛͽ$IF በᛌ޽΄̚ο ฟ൴ྭπέ۞ᑕϡ඀ё 15-19 ଫ఺࣎યᗟĄ ֏ቅડ࿣ฟֽĄٕ۰ଋ˵Ξͽ҂ᇋࢦາͽ Delphi ֽᇤᆷ఺ֱ඀ёቅĂͽఢᔖ ώ۞௡Ъᄬۍёֽᇤᆷ௡Ъᄬ֏ቅć֤ᆃኛֹϡ{$IFDEF PIC}ֽ૟׌჌̙Т ଋΞਕົԓ୕ֶߏӎ૟׎በᛌјΞેҖᑫٕߏВֳ඀ёऱĂ҃ଳϡ̙Т۞͞ PICĄְАበᛌр۞ಏ̮Ă׌჌ॾёౌѣĄ ćֹϡ-p ఺࣎በᛌጡᏴีֽயϠڱPIC ۞ॾёĂߏ̙࣎᏾۞ү ܧ˘Њ PIC ᄃ dcu)Ą૟Տ࣎ಏ̮Чҋበᛌ.ܧ҃)гயϠ PICĄPIC ಏ̮࠰ࠎ.dpu ࠎઘᑫЩ ҋજົܮӣ Delphi ඀ёቅ۞ಏֽ̮ᄲĂ༊ࢨؠֹϡ PIC ॡĂበᛌጡ่ٺ၆ ёĄבΨγొ۞ײߏֹϡ˞඗၆ҜӬֽ Җ̰(inline)۞௡Ъᄬ֏૱ёĂТॡϡ˞Бા۞តᇴٕٺߏᆷܮ኏ᑝ۞צࢋዎ д̙ΐͽ࣒Լ۞ଐԛ̝˭Ăࢋਕૉд੃ጸវ̚ซҖࢦາؠҜĄтѩ˘ֽĂ͹ ٙѣ۞඀ёቅטІ඀ёऱ(׶ DLL ѣТඈड़˧)ࢨۏёቅ(PIC)ĄLinux ۞Вֳ ؠࢋֹϡ׶Ҝཉ፾ϲ۞඀˘טLinux ˯ֹϡТᇹ۞඀ёቅĂЯࠎ Linux ˯ࢨ дڱଋдଋ۞ Windows ᑕϡ඀ё̰̚ӣ௡Ъᄬ֏ቅĂ֤ᆃଋΞਕ൑ڍт ̰ӣ௡Ъᄬ֏ቅ ΞଂྍҖฟؕವԱયᗟտౣ΍дң఍Ąܮଋ Unterminated conditional directive Ա΍ј၆$IF/$IFDEF ޽΄۞˘Җ൴Ϡ᏾ᄱĈڱ࣎൑˘ޢؕᑫ̚౵ ߏጱ࡭યᗟ൴Ϡ۞͹ЯĄKylix ٕ Delphi ົаಡт˭۞᏾ᄱੈिĂֽ޽ϯࣧ ᙱՙؠ֤˘̖࣎ޝܮ࿅к۞$IF/$IFDEF ޽΄Ă֤ᆃ˞ٸ࣐ࡶଋдࣧؕᑫ̚ Missing ENDIF Җ൴Ϡт˭۞᏾ᄱĈ˘ޢᑫ̚۞౵ аಡдࣧؕົܮଋԞ˞ֹϡ$ENDIF ֽඕՁଋ۞$IFDEFsĂ֤ᆃበᛌጡڍт ̙҃ߏĶbeepķડ߱ůӈֹତ˭ֽ۞୧Іౌߏ trueĄ Ăצࣃߏ 15Ăͷ somestring ۞ࣃߏĶyesķĂ֤ᆃ่ѣĶgoforitķડ߱ົజତ doit ֭ϏؠཌྷĂ҃ RTLVersion ۞ ڍ$IF…$ELSE ԔЕ˘ᇹĄдѩּ̚Ăт Ąኜ୧ІజෞҤ۞ึԔ˜ߏϤ˯Ҍ˭ĂтТ೼఼۞ޢ̝ ELSE$ٺਕ΍ன ᄃ඀ёనࢍ͘Ίܝ15-20 ˢ ͞ёĄUnicode ᔵ׍ΞᛸّĂҭкҜ̮௡ф̮݋ӎĄኛଋણ҂ௐ 17 ౢ̚۞Ķฟ Windows ၆Тᇹડાᄬ͛۞በቅ ٺٛұ͛)Ξਕົ̙࠹टܠԓұ඿͛ăͽ̈́ ৼкҜ̮௡۞фҚĄ҃ Linux ၆кҜ̮௡ф̮۞በቅ͞ё(ּт͛͟ă͛̚ă фҚ)ĂΞͽֶፂֹϡ۰۞ડાᄬ͛నؠֽटܜ)Delphi ඀ёᄬ֏۞фҚݭҾ ࣎Ҝ̮௡Ą 6 ז ௡ф̮(MBCS)Ąд Linux ˯Ă݋ߏ 1 д Windows ˯Ă˜ߏͽ˘࣎Ҝ̮௡ͽ̈́׌࣎Ҝ̮௡۞ф̮ቅֽܑϯкҜ̮ тѩ)Ąܧᕇ۞фҚቪ˞(д Windows ݋˘ܜΪ̙࿅Հ Ąд Linux ˯Ăᆵф̮фҚܜё̝݈Ăυื૟Տ࣎ф̮ౌᕖᆵҌ 32 Ҝ̮ב 32 Ҝ̮ UCS ᇾ໤۞̄ะĄWideString ྤफ़дͽ wchar_t ็ᅍගүຽր௚۞ ݭҾ݋ߏ 16 Ҝ̮۞ Unicode ᇾ໤ĂιߏϤ Linux ᄃ GNU ඀ёऱ͚ٙ೯̝ Ą҃ WideStringܜд Linux ˯Ăwchar_t ΃ܑ۞ߏᆵф̮ĂՏ࣎ф̮ࠎ 32 Ҝ̮ д Linux ˯ᇤᆷ඀ё˯۞मள ଀ଋٙഇ୕۞౵੼ड़ਕĄפдΞેҖᑫ̚Ăଋٕధ̪൒ຐࢋႽณг ІֽᄲĂଋ՟ѣ׎΁۞ᏴፄĄҭߏĂۏ҃ͷਈ෱ྵк۞඀ёቅณĄ၆Вֳ ώ۞ΞેҖᑫĂҭιΞਕົࢫҲેҖड़ਕĂૄٺy PIC ۞඀ёቅਕૉྻү ᇶॡጡ̝ࣃĄ ё̝݈ᐼх EBXבΨγొײ̝ࣃ̙ត(׶д Win32 ̝˯࠹Т)Ă҃ଋ˵଀д Ψ̝มĂυื޺ᜈܲх EBX ᇶхጡײΨᄃײଋ۞௡Ъᄬ֏ቅдטy PIC ࢨ MOV EAX, [EBX].GlobalVar ҃Լϡ MOV EAX,GlobalVar Offset Tableăٕ۰Ⴭࠎ GOT)Ąٙͽೱଫ ҜӬ޽Ҝጡ̝ࣃ(д Linux ̚Ⴭࠎ Globalغጡ̝ࣃ݋ӣѣϫ݈ሀ௡۞ૄ EBX ᇶхጡ̝ࣃĄ҃ EBX ᇶх ٺٙѣ၆੃ጸវ۞ؠӬ࠰ื࠹၆טy PIC ࢨ ͽ˭Е΍˞ᇤᆷҖ̰௡Ъᄬ֏ቅॡĂ׶ PIC ࠹ᙯ۞ч݋Ĉ ฟ൴ྭπέ۞ᑕϡ඀ё 15-21 4 በᛌଋ۞ᑕϡ඀ёăΐͽീྏ֭ੵ᏾Ą дϫ݈̏ฟୁᑫ९۞౵݈ᐝĄٸበᛌጡᏴีĄ఺ֱᏴีົజ ˯݋ߏ.dofĄд Delphi ۞ IDE ̚Ăଋ˵ΞͽᏮˢ Ctrl+O+O ֽᐼхధк۞ д Kylix ˯Ăᐼх࿰న૞९Ᏼี۞ᑫ९׎ઘᑫЩࠎ.kofĂ҃д Windows 3 ࢦཉଋ۞૞९ᏴีĄ 2 дଋ୬ொങ۞πέ˯ฟୁྍ૞९Ą ົᅮࢋԼតଋ͹૞९̚ಏ̮۞ྮशĄ ࢋ௡ၗనؠᑫ(д Delphi ˭ߏ.cfg ᑫĂд Kylix ˭ߏ.conf ᑫ)ĄଋΞਕ˵ ଋԓ୕Ϊд׻΄Е˭(ֹ̙҃ϡ IDE)በᛌଋ۞ᑕϡ඀ёĂ֤ᆃଋົᅮڍт ᑫ(.res ᑫ)ăͽ̈́૞९Ᏼีᑫ(Delphi ̚۞.dof ᑫͽ̈́ Kylix ̚۞.kof ᑫ)Ą ᑫ(.dpk ᑫ)Ą׶૞९࠹ᙯ۞ᑫ९݋Β߁˞ܑॾᑫ(.dfm ٕ.xfm ᑫ)ăྤ໚ ࣧؕᑫᑕྍΒ߁ଋ۞ಏ̮ᑫ(.pas ᑫ)ă૞९ᑫ(.dpr ᑫ)ăͽ̈́Їң۞इІ ౅࿅ ASCII ሀёֽ็Ꮾᑫ९Ą Linux ׶ Windows ̝มВϡᑫ९Ąଋ˵ΞͽֹϡᙷҬ ftp ̝ᙷ۞̍׍Ă ଋԓ୕඀ёТॡਕેҖд׌࣎πέ˯ĂଋΞͽдڍҌΩ˘࣎πέĄт 1 ૟ଋᑕϡ඀ё۞ࣧؕᑫͽ̈́׎΁׶૞९࠹ᙯ۞ᑫ९ଂ׎̚۞˘࣎πέொ ொᖼଋ۞ᑫ९Ąֽڱ֭૟׎ொങҌ DelphiĂଋౌΞͽϡ࠹Т۞͞ VCL ᑕϡ඀ёĂ֭૟׎ொങҌ KylixĂٕ (3)д Kylix ˯ฟ൴р CLX ᑕϡ඀ёĂ ࣐ࡶଋ(1)̏གྷฟ൴р CLX ᑕϡ඀ёĂٕ(2)д Delphi ˯࣒Լр˘࣎ߊѣ۞ д Windows ᄃ Linux ̝ม۞ᑕϡ඀ёொᖼ CLX ᑕϡ඀ё̚Ą ٺϡڱߏ̙ࠎ PIC ͚ٙ೯Ă҃ͷ૟൑ڱ$1234 ఺ᇹ۞ᄬ ϡ඗၆ҜӬֽؠӬតᇴĄည var X:Integer absoluteֹڱд Linux ˯Ăଋ൑ фҚ۞௟༼ّ੅ኢĄ тңд઼ᅫ̼ᑕϡ඀ё̚఍நЧ઼Ҿ˭ٺᑕϡ඀ёቅķ˘͛Ăд֤׊ѣᙯୁ ᄃ඀ёనࢍ͘Ίܝ15-22 ˢ ׶test.txtߏĶ̙Тķ۞Ąଋ଀ॾγ۞͕̈ѩְĄ ᑫЩડ̶̂̈ᆷ дLinux̚Ă̂ᆷфϓ׶̈ᆷфϓߏĶ̙ඈķ۞Ąᑫ९Test.txt मள ೡࢗ ܑ15.6 дLinuxᄃWindowsүຽᒖဩ̚۞मள к۞̙ТĄ ׶ Linux үຽր௚˯በᛌĄ̙࿅Ăд Linux ᄃ Windows үຽᒖဩ̚Ă̪ѣ Ăд Windows˭ڶϫ݈ĂĶྭπέķຍᏜ඾ᑕϡ඀ёΞдೀͼ̙ᅮࢋ࣒Լ۞ଐ Windows ᄃ Linux дᒖဩ˯۞मள ώ˯ߏΞͽүϡ۞Ąۍ ᆷྭπέ۞ᑕϡ඀ёĂ.xfm ᑫд͚೯ CLX ۞ Delphi ଋχზᇤڍ˯۞.dfm ᑫ९ኑኑҌ Linux ˯۞.xfm ᑫĂֽჯ᜕׌࣎ᑫ९Ąт ଋԓ୕ଋ۞඀ёቅΪѣ˘ЊࣧؕቅĂ֤ᆃଋᑕྍ૟ Windowsڍdfm ᑫĄт.ܧ யϠ.xfm ܑॾᑫ९҃ົܮ ଋд Delphi ̚ฟ൴າ۞ CLX ᑕϡ඀ёĂIDEڍт ΞͽТॡд Linux ᄃ Windows ˯ซҖበᛌĄܮଋ̂ΑӘјॡĂଋ ІĂซҖր௚۞൴णᄃበᛌĄ༊ۏଋΞͽᚶᜈд Kylix ˯Ăֹϡ CLX ͚೯۞ ĄפWindows ˯૟ᑫ९̶ֳ΍ֽĂͽӀ྅ѣ Linux ۞፟ጡֽΐͽх дޢWindows ˯Ă൒ ٺϲ˘࣎Вֳ۞ჃჄ፟Ąଋ˵Ξͽ૟ࣧؕቅཉޙ˯ д LinuxޢLinux ̝˯Ă൒ ٺLinux ΞͽВֳᑫ९ĄଋΞͽᏴፄ૟ࣧؕቅཉ ଀ Windows ׶ֹטΞͽ౅࿅ Microsoft ۞შྮᑫ९̶ֳ፟ܮSambaĂ֤ᆃ Ąଋ˵Ξͽд྅ѣ Linux ۞፟ጡ˯ֹϡפຽր௚۞࿪ཝ࠰ѣਕ˧ΐͽх ጡ˯Ă̶҃ᛳ׌࣎үڇҨ˘ٺ఺࣎ϫ۞ĂּтଋΞͽ૟ࣧؕቅᑫ९ཉזͽ྿ Ξౌڱк͞ޝĂ҃ΐͽВֳĄѣפͽֹ඀ёቅТॡд׌࣎үຽր௚˯࠰Ξх ΞܮWindows ᄃ Linux ̝˯Ăଋ ٺ࣐ࡶଋԓ୕ଋ۞ᑕϡ඀ёΞͽТॡેҖ д Windows ᄃ Linux ̝มВֳࣧؕቅ পѣΑਕ۞ᛋӘੈिĄ Windows ֱ֤ٺᙯזଋொᖼҌ Kylix ۞ VCL ᑕϡ඀ё҃֏Ăଋົќٺ၆ ฟ൴ྭπέ۞ᑕϡ඀ё 15-23 shellٕ˘ֱညߏ.bashrc̝ᙷ۞rcᑫ̚Ąٺ఺ֱតᇴ࠰జ޽ؠ PATH Е΍ຩವ඀ё۞ྮश USER ଋ۞൳ˢЩჍ(sfuller) SHELL shell۞ྮश(/bin/bash) TERM ௣ბ፟ݭၗ(xtermăvt100ăconsole) HOME ଋ۞छϫᐂ(/home/sam) ऱ۞ྮशҜཉ)̝ᙷ۞ᒖဩតᇴĄ׎΁ࢦࢋ۞ᒖဩតᇴࢍѣĈ Linux˵ֹϡ˞˘ֱညߏLD_LIBRARY_PATH(ϡֽವԱ඀ё etcϫᐂ˭ٕ۰ߏଋ۞छϫᐂ˭Ą/ٺк௡ၗనؠᑫజཉޝࢵ)Ą ϲјᔳᖟᑫ(ᑫЩͽ . ࠎޙ҃дLinux˯Ă௡ၗనؠᑫ९˜ߏజ autoexec.bat̝ᙷ۞ᑫ९Ą ௡ၗనؠᑫ дWindows˯Ă௡ၗనؠߏ౅࿅ր௚൳ᐂĂٕ۰ߏ౅࿅ည кф̮ᏴีĄ҃DOSݒߏֹϡ୆ቢ(/)ٕߏഴཱི(-)ֽܑϯĄ ׻΄Ᏼี Linuxֹϡഴཱི(-)ֽܑϯ׻΄ᏴีĂٕ۰ֹߏᗕഴཱི(--)ֽܑϯ ၗੈिĄېϯᄬήĂ̙҃ົа㌅Їң۞ ׻΄۞а㌅ੈि ઄ࡶдLinuxјΑгેҖ˘׻΄Ă֤ᆃι่ົࢦኑгពϯ׻΄೩ ྍᑫ९జ౯ЊҌι఍Ąܧାа̏జӁΝ۞ᑫ९Ăੵڱ˯ߏ൑ ଀ߙֱᑫ९ࠤҌፋ࣎ᑫ९ր௚జ̙͕̈۞ӁଫĄ҃ͷĂдLinux ֹٽटޝܮ̙ົаᐝШଋቁᄮĂ҃ۡତгેҖྍ׻΄ĄтѩĂ ШଋГቁᄮ(ညߏĶଋቁؠࢋ఺ᆃઇ๜ĉķ)Ą˘ਠֽᄲĂLinux ົܮ׻΄۞Гቁᄮ дDOSٕWindows̚Ă઄тࢋӁੵᑫ९ٕྤफ़ӵॡĂր௚ ϡ۞˘჌Ą)ֹھٙϡ۞shellѣᙯĄBash݋ߏజᇃ Ꮾˢ׎ЩჍӈΞĄ(scriptώ֗ٙϡ۞඀ёᄬ֏Ă׶ଋдLinux˯ Щ>۞͞ёĂΞͽ૟ιᐼхјࠎΞેҖᑫĄࡶࢋΐͽેҖĂΪื ˜ߏ˘჌͛фᑫĂ׎̚Βӣ඾ధк۞޽΄Ą౅࿅chmod +x <ᑫ ԲѨᑫ/shell scripts Linux˯׶.batᑫ၆ඈ۞ĂӈࠎٙᏜ۞shell scriptsĄٙ Ꮬ ۞ script ᑫ९۞౵ϐბĄٺҭߏдLinux˯֭՟ѣ఺ᇹؠཌྷĂ͛фᑫ௣ඕ ᔘѣ׎΁ྤफ़Ăᑫ९̪൒ෛࠎҌѩ௣ඕĄޢдྍф̮ܮф̮Ăӈ ᑫԍф̮ дDOSᄃWindows̚Ăф̮ࣃ26(Ctrl-Z)ෛࠎ͛фᑫ९۞ඕԍ ຍ఺̙࣎ТᕇĄڦྍ ͽ఍நѩְĂ̙࿅༊ଋࢋଂWindowsொങ඀ёҌLinuxॡĂᑕ ඕԍĄҭߏдLinux˯Ă่ͽLFඕԍĄKylix۞඀ёቅበᏭጡΞ Җԍф̮ дWindows˯Ă͛фҖߏͽCR/LF(˵ಶߏASCIIቅ۞13ᄃ10) मள ೡࢗ ᄃ඀ёనࢍ͘Ίܝ15-24 ˢ PATH̚Ăֹ׎јࠎௐ˘࣎జຩವ۞ྮशĄז˵Ξͽ૟ ./ ΐ ϫ݈ϫᐂ˭۞඀ёĂҰ఼૱଀д඀ёЩჍ݈ΐ˯ ./ Ą ٺຐેҖҜڍϫᐂĂ่҃ົຩವдPATH̚۞ϫᐂĄЯѩĂт ᑭߤPATH఺࣎ᒖဩតᇴĄ҃Linux݋̙ົᑭߤϫ݈ٙд۞̖ޢ ຩವྮश дેҖ඀ёॡĂWindowsՏѨౌົАᑭߤϫ݈ٙд۞ϫᐂĂ൒ PathDelimĄ Ξజϡֽࠎྍπέ޽ؠϒቁ۞ф̮Ąኛણ֍ેҖॡഇ඀ёऱ۞ ྮशЩჍ Linuxֹϡ୆ቢ(/)҃DOSֹϡͅ୆ቢ(\)ĄPathDelim૱ᇴؠཌྷ ඾&ф̮)ĄLinux˵Тॡ̯ధଋጾѣᇴ࣎sessionsĄྫྷޢ΄(д׻ (дLinux˯Ⴭࠎ඀Ԕůprocesses)Ą˵Ξͽ૟඀Ԕਖ਼ҌࡦഀેҖ к̍ Linux၆к̍۞͚೯ߏБ͞Ҝ۞ĄଋΞͽТॡ۞ેҖᇴ࣎඀ё ֹϡLinux˯۞GNU make̍׍඀ёĄ ώĂЯѩĂଋΞͽۍ۞˯make̍׍඀ё Borland۞make̍׍඀ё֭՟ѣLinux ˞ٙᅮᑫ९۞ᝋࢨĄ ଋ଀ቁᄮଋ۞ᑕϡ඀ёдϒቁ۞ֹϡ۰֗Њ˭ેҖĂТॡ׍౯ ۰)݋ѣਕ˧ՀԼ఺ֱᝋࢨĄ ᝋࢨ(Ξ᝝ăΞેҖ)Ąrootֹϡ۰(ӈٙᏜ෹৺ֹϡפϡ۰۞х ᝋࢨ(Ξ᝝ăΞેҖ)ćr-xߏ׎΁ֹפᑫ९ጾѣ۰ٙᛳཏ௡۞х ᝋࢨ(Ξ᝝ăΞᆷăΞેҖ)ć r-xפඕ)ćrwxߏᑫ९ጾѣ۰۞х - ߏᑫ९۞ݭၗ(- ΃ܑ೼఼۞ᑫ९ăd ΃ܑϫᐂăl ݋΃ܑᙥ ߏĈޥᄲĂ-rwxr-xr-xϤνҌΠ۞ຍ ௡ăͽ̈́׎΁ˠĂ̶Ҿгనؠ׎᝝ăᆷăેҖ۞ᝋࢨĄᓝּֽ ᑫ९ᝋࢨ дLinux˯ĂՏ࣎ᑫ९(ͽ̈́ϫᐂ)࠰Ξͽྍᑫ९۞ጾѣ۰ăཏ ˘ᑕϡ඀ёĄ ઘᑫЩ Linux̙֭ͽઘᑫЩֽડ̶ᑫ९۞ݭၗٕ۰ߏ૟ᑫ९ᙯᓑѩߙ ˯ĂΞેҖᑫ۞ઘᑫЩߏ.exeĄ ΞેҖᑫ дLinux˯ĂΞેҖᑫ՟ѣЇңপؠ۞ઘᑫЩĄҭߏдWindows signals)Ą)ཱིܫּγ дLinux˯Ăүຽր௚۞ּγజჍࠎ Ⴭ۞׏ݭּ̄Ąኛણ֍જၗॡഇ඀ёऱ̚۞DriveDelimĄ ߏ׎ྮशЩܮჃჄ፟фϓ Linux˯֭՟ѣٙᏜ۞ჃჄ፟фϓĂ/lib/security ࠎજၗᙥඕ඀ёऱ(DLLs)Ą Іᑫ(.so)ĄдWindows˯ĂӈۏІᑫ дLinux˯ĂଋΞͽֹϡВֳۏDLLs/Вֳ मள ೡࢗ ฟ൴ྭπέ۞ᑕϡ඀ё 15-25 ֹϡ۞ෛ඄გநࣶ(Windows Manager)Ăּт KDE ٕ Gnome ѣᙯĄ Linux ˯ෛᛇᒖဩ׶ Windows ˯ѣֱధ̙ТĄ၆ྖ͞๴۞γ៍Ξਕົ׶ଋ ڍγ៍ᄃड़ ΃ TRegIniFileĄפֽ TMemIniFile ଋ˵Ξͽдྭπέ۞ᑕϡ඀ёֹ̚ϡ ini ᑫ९Ą̙࿅д CLX ̚Ăଋυืֹϡ ᝋࢨϒቁĄפᑫĄ̙࿅Ăଋυืቁؠᑫ९۞х ࠹Т۞௡ၗనؠזפॲϫᐂ̝˭Ą఺૟ົֹ଀ٙѣଋ۞ᑕϡ඀ё࠰хٺᐼ Бાቑಛ̝˭ĂଋΞ૟Бાቑಛ۞௡ၗనࢍᑫٺд Linux ˯Ăࡶࢋ૟ྤੈཉ ၗనؠᑫΝĄ ёֽซҖಏ̮۞ᇤᆷĂҭݒ૟ٙѣ۞Ꮾ΍ᖼШҌώгბ۞௡בБͽր௚൳ᐂ Ξͽឰଋ఍ந̝݈ٙᆷ׶ր௚൳ᐂ࠹ᙯ۞඀ёቅĂ˵ಶߏڱͽᐼхĄѣ࣎͞ ׶ր௚൳ᐂ࠹ᙯ۞඀ёቅΞͽజԼតјࠎֹϡώгბ۞௡ၗనؠ͛фᑫֽΐ ࿰నࣃĄ ᐼх˞ bash ۞నؠĂ҃.XDefaults ݋జϡֽనؠ X ෛ඄඀ё۞ܮ т.bashrc дᔳᖟᑫ̚(ᑫЩͽ . ࠎࢵ۰)Ăּٸ΁۞ֹϡ۰࣎ˠᑫ९(profile)఼૱జ etc ̝˭ĂּтĈ/etc/hostsĄ׎ ٺLinux ̝˯۞ր௚௡ၗనؠᑫ఼૱ౌజཉ ΃ֹϡր௚൳ᐂ۞͞ёĄдפֹϡ͛фݭё۞௡ၗనؠᑫ९ͽ̈́ᒖဩតᇴֽ Linux ֹ̙֭ϡր௚൳ᐂ(registry)ֽᐼх௡ၗనؠ۞ྤੈĄ࠹ͅ۞ĂଋΞͽ ր௚൳ᐂ ವྮशĄ д׻΄Е̚ΞֹϡĂWindows۞щ྅඀ё఼૱ົ࣒Լր௚۞ຩ Windows่ѣдGUIॸࢬֹϡ˯۞ଥशĄЯѩĂࡶຐֹ˘඀ё Ąޙ۞ຩವྮशĄ௑ཱིᙥඕ˜ߏͽ ln ޽΄(link)ٙ ᅮࢋ࣒Լր௚̙ܮᐂĂ֭ͷ޽Шଋ۞ᑕϡ඀ёĄтѩ˘ֽĂଋ Бા۞binϫٺдჃჄ̚۞Ω˘࣎ᑫ९ĄଋΞͽ૟௑ཱིᙥඕཉ ௑ཱིᙥඕ дLinux˯ĂٙᏜ۞௑ཱིᙥඕ׎၁ߏ˘჌পঅ۞ᑫ९Ăϡͽ޽Ш ֹϡཱི݂Ąኛણ֍ેҖॡഇ඀ёऱ̚۞PathDelimĄ ຩವྮश۞̶࿣ф̮ Windowsֹϡ̶ֽཱིઇࠎຩವྮश۞̶࿣ф̮Ą҃Linux݋ߏ मள ೡࢗ ᄃ඀ёనࢍ͘Ίܝ15-26 ˢ ̝˭Ą usr/local/bin/ٺbin ̝˭Ăҭд Debian ݒߏజཉ/ٺRedHat ̚Ξਕົజཉ Т۞Ҝཉ˯Ąּт̍׍඀ёд̙ٺώѣॡົ૟ᑫ९ཉۍො ̙Т Linux ۞൴Ҷ /tmp ᇶхᑫ /proc ෍ᑢᑫ९ր௚ᄃր௚௚ࢍྤफ़۞ಡܑ /var ր௚͟ᄫăੈिăᔘѣspoolᑫ९ /mnt ׎΁ညߏCDٕ۰హჄ̝፟ᙷ۞ᐼхಫ̬Ăӈజଭдѩ఍ /usr/includeă/usr/local̝ᙷ۞̄ϫᐂĄ /usr ᑕϡ඀ёĄ఼૱ᔘົΒӣ˘ֱညߏ/usr/spoolă/usr/mană /etc ௡ၗనؠᑫ Ψ۞८͕ײ/boot ༊ր௚ୁજॡٙ /opt ΞᏴፄ۞ /home/username Ϥߙֹϡ۰ٙጾѣ۞ᑫ९Ąѩ఍۞usernameࠎֹϡ۰۞൳ˢЩჍ /lib ඀ёऱ /dev ͽᑫ९ԛё΍ன۞న౯ /sbin ր௚̍׍඀ё /bin ֹϡ۰׻΄ă̍׍඀ё /root rootᑫ९ր௚Ăӈ෹৺ֹϡ۰۞छϫᐂ / ፋ࣎Linuxᑫ९ր௚۞ॲϫᐂ ϫᐂЩჍ ̰ट ܑ15.7 ૱֍۞Linuxϫᐂ ͽ˭݋ܑЕд Linux ̚ᇃజֹϡ۞ϫᐂЩჍĄ Windows ֹٙϡ۞ͅ୆ቢ࠹ТĄಏ˘୆ቢ݋΃ܑॲϫᐂĄ (mount)ķдᑫ९ր௚̚۞ЇຍҜཉĄLinux ۞ྮशЩჍֹϡ୆ቢĂޫр׶ д Linux ̚۞ϫᐂ׶ Windows ߏ̂̂۞̙ТĄЇңᑫ९ٕ۰న౯࠰ΞజĶଭ Linux ̝˯۞ϫᐂඕၹ ฟ൴ྭπέ۞ᑕϡ඀ё 15-27 Հາֹϡ҃Ϡ۞តજĄפЯᑕԣٺ݋ߏֽҋ ࠹ТĄдֹϡ۰̬ࢬᆸ̚౵̂۞मளีטనࢍј׶࠹၆ᑕ۞ Windows ଠ ĂజႽΞਕ۞ีטy дֹϡ۰̬ࢬᆸ۞मளߏ౵͌۞ĄCLX ۞ྤफ़ຏۢଠ ҾĂ҃ٙѣ۞ྤफ़ऱాቢ̮ІϺТĄ ѩ۞ͭ΃ᙷكቁĂЯࠎٙѣ۞ྤफ़ะ࠰Вֳځ̙Т఍д఺˘ᆸ̚ݒ̙ࠤ ࢦࢋ۞̙Т̝఍Ąҭߏ఺ֱ૱ܧdbExpress ഫᇾ۞ಏШώኳ҃யϠĂТॡ ٺ΍۞ྤफ़)Ąᔵ൒̪ѣ˘ֱጱЯפጡٙڇాቢ)ăͽ̈́ྤफ़ะ(ܑϯҋҨ ጡ۞ڇٕߏܑॾ˯Ą఺ֱ̮ІΒӣ˞ྤफ़ాቢ̮І(ܑϯాତҌྤफ़ऱҨ జΒ྅ј˘௡̮ІĂֹଋΞͽ૟఺ֱ̮ІΐҌྤफ़ሀ௡פy Ҳᆸ۞ྤफ़х ΃Ąפજၗ SQL ఍ந۞̈ݭᜭજ඀ёٙٺǕ˘௡ϡ ბహវ̝̚˘Ąѩᆸϫ݈జ dbExpress͗މ ߏ ADOăBDEăٕ ߏ InterBase ጡ̝ม۞఼ੈĄΞਕڇy д౵ҲᆸĂົѣ˘ᆸ೩ֻଋᑕϡ඀ёᄃྤफ़ऱҨ ТĄ఺ֱमள݋ពனд̙Т۞ೀ࣎ᆸѨ˯Ą ѣң̙ט፟פLinux ̝˯Ăଋ଀А˞ྋ dbExpress ᄃଋ࿅Νٙϡ۞ྤफ़х ٺдଋ૟ྤफ़ऱᑕϡ඀ёொങҌ dbExpress ̝݈Ăࠎֹᑕϡ඀ёΞેҖ ώѣᙯĄۍ ˘͚೯׶ଋ͘˯۞ Delphi ԫఙĄ̙࿅Ăѩפֹϡ dbExpressĂιߏ˘჌ྵາăТॡΞྭπέ۞ྤफ़х ֱᏴፄд Kylix ̝˯࠰;̝ᗒтĄ̙࿅Ăд Windows ̈́ Linux ˯ĂଋΞͽ ϡăBorland Database Engine(BDE)ăͽ̈́ InterBase Express ඈඈĄ൒҃఺ फ़ऱ˯Ξͽѣк჌ᏴፄĂΒ߁˞ĈADO ۞ֹྤפд Windows ̝˯Ăଋдх ྭπέ۞ྤफ़ऱᑕϡ඀ё ลᆸّᇾ໤)˘༼Ą ĂТॡኛዦ᝝ Filesystem Hierarchy Standard(ᑫ९ր௚̝ځၹѣՀкྎႽ۞ᄲ ลᆸّᑫ९ր௚۞௡ᖐߛٺኛણ҂ www.pathname.com ̚۞ྤੈĂ׎̚၆ ᄃ඀ёనࢍ͘Ίܝ15-28 ˢ ̙ົ૲ֽᗝγ۞ߤྙજүĄ ซҖ౵ָ̼֭פy ่ેҖϤֹϡ۰ٙኛՐ۞ߤྙજүĂЯѩĂ၆ྤफ़ऱх ࢬٙΐͽ၁үĄ̬פͽ८͕ྤफ़х ࢬ݋ߏ̬פĄ҃నࢍॡഇ۞෹ྤफ़хפmetadata(෹ྤफ़)۞ԣ ٺy ՟ѣ၆ ĄטՀາ፟۞ ޙy ੵ˞ેҖ INSERTăDELETEăUPDATE ߤྙ̝γĂι̙׍ѣ׎΁̰ y Ϊ็аಏШྤफ़ะĄ Ąهy Ξͽ఍நߤྙ඀Ԕᄃᐼх඀ԔĂҭߏ֭Ϗ೩ֻܑॾฟୁ۞ໄ ѣȈ̶ព඾۞ड़ਕ೩̿Ąົ˯פྤफ़х ՀᖎಏăՀԣి۞౉शĄЯѩĂଋΞͽ࿰ഇдפy ೩ֻ˞၆ᅈბྤफ़ऱх ̝ม۞ొЊमளĈ ᆸפߏ༊ଋຐࢋொങᑕϡ඀ёॡĂົ൴Ϡд dbExpress ᄃ׎΁ྤफ़хܮ˭ͽ (Idapi32.dll)γΐྤफ़ऱপؠ۞ᜭજ඀ёĂᔘѣ˘ુ׎΁࠹ᙯ۞඀ёऱĄ ͹ࢋ۞ Borland Database Engine ඀ёऱז͌۞к˞Ąࡶࠎ݈۰Ăଋ଀ֹϡ dbxconnections ᄃ dbxdrivesĄ׶ֹϡညߏ BDE ఺ᇹ̄۞̍׍ͧ੓ֽĂৌߏ ბహវĄੵѩ̝γĂι˵ֹϡ˞ྤफ़ऱ૞ϡ۞ᜭજ඀ёγΐ׌࣎௡ၗనࢍᑫĂ ͗މᆸ˘ᇹĂdbExpress ˵ᅮࢋϤྤफ़ऱᇄથٙ೩ֻ۞פಶ׶׎΁۞ྤफ़х ۞నࢍ҃јĂιТॡ˵͚೯ Windows ۞જၗᙥඕ඀ёऱ(.dll)ԛёĄ І(.so ᑫ)ĄЯࠎ dbExpress ߏ੫၆ྭπέ۞ϫۏืᙥඕҌଋᑕϡ඀ё۞Вֳ ӣ˞˘௡̈ݭ۞ᜭજ඀ёĂϡͽ၁ү˘௡В఼۞̬ࢬĄՏ࣎ᜭજ඀ё࠰ࠎυ ጡ̝ม۞఼ੈĄdbExpress Βڇд Linux ˯ĂdbExpress ົგநᄃிྤफ़ऱҨ dbExpress ۞̙Т఍ ۞ొЊĂ݋Ξͽણ҂ௐ 19 ౢĂĶనࢍྤफ़ऱᑕϡ඀ёķĄ నࢍາ۞ dbExpress ᑕϡ඀ёٺĶொങྤफ़ऱᑕϡ඀ёҌ Linuxķ˘༼Ą҃Ҍ ૟ߊѣ۞ྤफ़ऱᑕϡ඀ёொങҌ dbExpress ۞࠹ᙯੈिĂኛણዦώౢ۞ٺᙯ ฟ൴ྭπέ۞ᑕϡ඀ё 15-29 ٺ΁ࣇ̙͚֭೯በᏭĂ҃ͷ่̯ధϒШጱᜓ(forward navigation)Ąᙯ ࢨĄЯࠎצTSQLDataSet)׶ֱ֤ᄃιࣇ࠹၆҃Ϡ۞ྤफ़ะͧ੓ֽĂΑਕՀࠎ dbExpress ྤफ़ะ(TSQLTable ă TSQLQuery ă TSQLStoredProc ăͽ̈́ TIBDataSet TADODataSet TSQLDataSet TIBStoredPRoc TStoredProc TADOStoredPRoc TSQLStoredProc TIBQuery TQuery TADOQuery TSQLQuery TIBTable TTable TADOTable TSQLTable TIBDataBase TDatabase TADOConnection TSQLConnection InerBaseExpress̮І BDE̮І ADO̮І dbExpress̮І І̮פܑ15.8 ࠹၆ᑕ۞ྤफ़х ϡ̚Ă࠹၆ᑕ۞ dbExpress ̮ІĈ ̚۞ొЊࢦࢋྤफ़ऱ̮ІĄѩܑТॡពϯ˞д Linux ᄃྭπέᑕϡ඀ё۞ֹ Windows ᒖဩ̚۞ InterBase ExpressăBDEăᄃ ADO ٺܑ 15.8 ̚Е΍˞ϡ ăᔘѣְІĂ׶ଋА݈۞ᑕϡ඀ё̚۞̮ІĂѣధкߏ࠹Т۞Ąڱ (TDataSet ᄃ TCustomConnection)ѣ඾࠹Т۞ૄᖂᙷҾĂ఺ຍᏜ඾׎পّă͞ ٙϡ۞ྤफ़ऱᑕϡ඀ёߏ̙Т۞ĄdbExpress ̮І׶׎΁ྤफ़ຏ̮ۢІ ІĂιࣇ׶ଋА݈̮פ༊ଋᇤᆷ dbExpress ᑕϡ඀ёॡĂົᅮࢋ˘௡ྤफ़х ̮ІᆸѨ˯۞̙Т఍ ᇄથٙ೩ֻ۞ dbExpress ᜭજ඀ёĄ˧םˬௐזጡԱڇࠎଋ۞ྤफ़ऱҨ ጡĄٕ۰ߏྏ඾ڇጡᇤᆷ dbExpress Ҩڇ˯Ăٕߏࠎֹٙϡ۞ྤफ़ऱҨ ጡĂଋࢋ̙ߏᏴፄ૟ྤफ़ொҌ఺ֱྤफ़ऱڇ࣐ࡶଋֹϡ˞׎΁ྤफ़ऱҨ y ᜭજ඀ёΒ߁˞ DB2ăInformixăInterBaseăMSSQLăMySQLăᄃĄ y ่͚೯ SQL-based ۞ώгܑॾ(ּт InterBase ᄃ Oracle)Ą ੃ᐂቤ኏ડĄٺბυืҋҖ੨ཉ੃ጸវϡ͗މ۞̚ ТĂЯࠎ BDE̙۞̂ ޝy д̰ొҋҖგநಏ˘੃ᐂቤ኏ડăٕк࣎੃ᐂቤ኏ડĄ఺׶ BDE ߏѣ ᄃ඀ёనࢍ͘Ίܝ15-30 ˢ ˢྤफ़ऱ۞఍நજү˞Ąд࿰నଐԛ̝˭Ă̂кᇴд Windows ˯۞ྤफ़ะ ૟Հາ۞ྤफ़ᆷٺბྤफ़ะӈΞĄд఺჌ଐԛ̝˭Ă౵̂۞҂ณం࿅͗މҌ ᓑҌበᏭᄃጱᜓΑਕ۞̮৵Ă݋ົֶᖞྻүϒ૱ĄଋΪᅮࢋ૟ιࣇࢦາాତ ბྤफ़ะĂ֤ᆃֹϡ۰̬ࢬֱ֤̚ᙯ͗މଋ૟ dbExpress ྤफ़ะాତҌڍт ຏۢॾ̚ĈТॡม่ਕពϯ˘ඊ੃ᐂĄ फ़ྤٺ૟ྤफ़ពϯڱ൑ܮdbExpress ྤफ़ะ̙֭ົ૟ྤफ़ቤ኏੓ֽĂЯѩଋ ගொੵĄ˵ЯࠎีטଋΞਕᅮࢋ૟ֱ֤̯ధֹϡ۰ொજҌ݈˘ඊ੃ᐂ۞ଠ ᙷ۞ྤफ़ะ̙֭೩ֻበᏭ۞ΑਕĂ҃ͷ˵่೩ֻϒШጱᜓ҃̏ĄᓝּֽᄲĂ ࣐ࡶଋֹ่ϡ dbExpress ྤफ़ะĂ֤ᆃଋಶ଀አፋଋ۞ֹϡ۰ࠧࢬĂЯࠎѩ ֻྤफ़۞͞ёĄ ბྤफ़ะ೩͗މߏ dbExpress ྤफ़ะٕܮдֹϡ۰̬ࢬᆸ̚౵͹ࢋ۞मளĂ ధк۞౫໭Ą˞͌ܮѩĂொങྤफ़ऱᑕϡ඀ё̚ѣᙯֹϡ۰̬ࢬ۞ొЊĂ ᇹĄЯ˘ีטజనࢍјႽΞਕ׶࠹၆ᑕ۞ Windows ଠีטCLX ྤफ़ຏۢଠ ֹϡ۰̬ࢬᆸ۞मள ᄲĂ౵рᔘߏֹϡ૟ dbExpress ྤफ़ะాତҌ TClientDataSet ̮І۞͞ёĄ ბྤफ़ะĄ၆̂кᇴ۞ᑕϡ඀ёֽ͗މቁг૟ dbExpress ྤफ़ะాତҌځ ߏ˘၆˘၆ᑕ۞ᙯܼĄ̙࿅఺ᆃઇĂТॡ˵ົྵࠎ৿ͻᇅّĂЯࠎυืົܮ ఍ĂЯࠎଋٙொങ۞ᑕϡ඀ёĂ׎ྤफ़ะᄃజொങ̝ᑕϡ඀ё̚۞ྤफ़ะĂ ಏ৷̼۞рזბྤफ़ะ۞͞ёĄ఺ᇹ̄ઇΞͽ଀͗މdbExpress ྤफ़ะాତҌ ໂಏ৷۞ᑕϡ඀ёֽᄲĂଋΞͽֹϡ TSQLClientDataSet ֽആ΃૟ٺො ၆ Ąځֻ˞Ȉ̶ྎ௟۞ᄲ ೩ܮ༼˘ѩ˘ߛၹĂд 19 ౢ̚۞Ķྤफ़ऱߛၹķٺֻበᏭᄃጱᜓ۞ΑਕĄᙯ ੃ጸវ̚ĂТॡ೩ٺბྤफ़ะົ૟ྤफ़ቤ኏ཉ͗މ۞͞ёֽ྿јϫ۞ĄЯࠎ ბྤफ़ะ͗މdbExpress ྤफ़ะĄιࣇ҃ͅߏ౅࿅૟ dbExpress ྤफ़ะాତҌ ତֹϡۡڱЯࠎ৿ͻበᏭᄃጱᜓ۞ΑਕĂ̂кᇴ۞ dbExpress ᑕϡ඀ё൑ ĶֹϡಏШྤफ़ะķĄ dbExpress ྤफ़ะͽ̈́׎΁ Windows ˯ྤफ़ะ̝ม۞मளĂኛણ֍ௐ 28 ౢĂ ฟ൴ྭπέ۞ᑕϡ඀ё 15-31 ᑕϡ඀ёķ˘༼Ą ѩᕇĂኛણዦд15-4ࢱ۞Ķ࣒Լ VCLٺ඀ё˘ᇹĂјΑгொങ࿅ΝĄᙯ ਕૉтТ׎΁ݭၗ۞ᑕϡܮ௡࿣ᗓฟֽĄܑϯֹϡ۰̬ࢬ۞ܑॾĂତ඾ Бາ̮І۞ొЊĂᄃྤफ़ሀז˵ಶᄲߏĂଋ଀૟ᑕϡ඀ё̚Ăֱ֤଀ϡ ҂ߏӎࢋ఺ᆃઇĄޥሀ௡̚࿣ᗓฟֽĂ֤ᆃଋΞਕ଀дொങ̝݈ррг 2 ࣐ࡶଋ֭՟ѣ૟ଋ۞ֹϡ۰̬ࢬܑॾĂଂӣѣྤफ़ะᄃాቢ̮І۞ྤफ़ ̚۞ datapump.hlp ᑫĄ) ё۞ֹϡĂኛણ҂ Program Files\Common Files\Borland\Shared\BDE ѩ̍׍඀ٺFoxPro ̝ᙷ۞πέĂொങҌ dbExpress ͚ٙ೯۞πέĄ(ᙯ ඀ё)Ăֽ૟ώгბ۞ྤफ़ऱྤफ़Ăଂ˘ֱညߏ ParadoxădBaseăͽ̈́ ώౌѣ఺࣎ۍٙѣ۞ܧ֭)ᓝּֽᄲĂଋΞͽֹϡ Data Pump ̳ϡ඀ё Ա̳࣎ϡ඀ёֽΐͽொᖼĄ Ϗజᐼхд఺ֱྤफ़ऱĂኛإଋ۞ྤफ़ڍጡ׎̝̚˘Ąтڇ఺ֱ SQL Ҩ ٺInformixăInterBaseăMSSQLăMySQLăͽ̈́ OracleĄྤफ़ืజཉ 1 ቁؠଋ۞ྤफ़జᐼхд dbExpress ͚ٙ೯۞ྤफ़ऱĂּт DB2ă ኛֶೈͽ˭۞Վូֽ૟ଋ۞ Windows ྤफ़ऱᑕϡ඀ёொങҌ Kylix/CLXĈ Delphi ྤफ़ऱԫఙ۞ᑕϡ඀ёᙱͽொങĄ Windows ٙপѣԫఙ(ּт ADO)۞ᑕϡ඀ёĂಶົͧಏ৷่ѣ זϡֹھ ң჌ϫ۞Ąᇃזଋᅮࢋ྿זᑕϡ඀ё۞ݭၗĄ҃ኑᗔᄃӎĂ݋ᙯܼٺՙפޘ ˞ĂЯѩፋ࣎ொങ۞඀Ԕ̚Ăυื၆ଋ۞ᑕϡ඀ёซҖՀજĄொങજү۞ᙱ Windows ᄃ Linux ̝˯ĄЯࠎٙϡ۞ԫఙត଀̙˘ᇹ ٺέĂ҃ТॡਕેҖ ૟ଋ۞ྤफ़ऱᑕϡ඀ёொങҌ dbExpress Ξͽֹ଀ѩᑕϡ඀ёྭ෸к࣎π ૟ྤफ़ऱᑕϡ඀ёொങҌ Linux າྤफ़ķ˘༼Ą ѩ˘मளĂኛણዦд15-33ࢱ۞Ķд dbExpress ᑕϡ඀ёՀڇтңҹٺ̚Ąᙯ ੃ጸវٺბྤफ़ะݒ่่Ϊ૟Հາྤफ़ቤ኏͗މጡĄҭߏڇາҌྤफ़ऱҨ дιࣇᆧΐྤੈॡ(ּтֹϡ۰ொҌΩ˘ඊາ۞੃ᐂॡ)Ă૟ྤफ़ҋજгՀົ ᄃ඀ёనࢍ͘Ίܝ15-32 ˢ Parameters পّࣃ࠹௑Ą TSQLStoredProc ۞ Params পّనјᄃࣧྤफ़ะ۞ Params ٕ ྤफ़ะ۞ StoredProcName ٕ ProcedureName পّĄኛ૟ ̮І۞ྖĂ֤ᆃኛ૟ TSQLStoredProc ̮І۞ StoredProcName నࠎࣧ x ࣐ࡶࣧྤफ़ะߏ TStoredProcăTADOStoredProcăٕ TIBStoredProc master/detail ᙯܼĂ֤ᆃ˵ኛኑᄦĄ ϲޙଋనؠ˞ DataSource পّĂᖣͽڍParameters পّࣃ࠹௑Ąт ኛ૟ TSQLQuery ۞ Params পّĂనјᄃࣧྤफ़ะ۞ Params ٕ ᆃኛ૟ TSQLQuery ̮І۞ SQL পّĂనؠјࣧྤफ़ะ۞ SQL পّĄ x ઄ࡶࣧྤफ़ะߏ TQueryăTADOQueryăٕ۰ߏ TIBQuery ̮ІĂ֤ TSQLTable ̮І̚Ą ٺܧ̚నؠĂ҃ ბྤྤफ़ะ͗މّࣃĄ҃޽ؠቑಛ̈́࿅ᕭ୧І۞পّࣃĂ݋ᑕྍд ኑᄦٙѣజϡֽనؠ master/detail ᙯܼăͽ̈́ٙѣ޽ؠ৶͔ࣃ۞প TSQLTable ۞ TableName পّĂనؠјࣧྤफ़ะ۞ TableNameĄТॡ ࣧྤफ़ะߏ TTableăTADOTableăٕ۰ߏ TIBTable ̮ІĂኛ૟ڍx т 5 నؠາྤफ़ะ۞পّĂֹ׎௑Ъࣧྤफ़ะ̚۞̰टĈ ბྤफ़ะĄ͗މ x Լតણ҂Ҍࣧؕྤफ़ะ̝ྤफ़ֽ໚̮І۞ DataSet পّĂֹ׎ણ҂Ҍ x ૟ TDataSetProvider ̮І۞ DataSet পّĂనࠎ dbExpress ྤफ़ะĄ ̮І۞ЩჍĄ x ૟ TClientDataSet ̮І۞ ProviderName পّనј TDataSetProvider ۞ЩჍֽࠎ఺ֱ̮І׻ЩĄ ͽѣຍཌྷޢ۞၆ᑕᙯܼĂֽҿᕝᑕྍֹϡ֤˘࣎ dbExpress ྤफ़ะĄ൒ TDataSetProvider ̮Іăͽ̈́ TClientDataSet ̮ІĄ౅࿅ܑ 15.8 ٙ̚Е 4 ࠎՏ࣎дֽࣧᑕϡ඀ё̚۞ྤफ़ะĂౌᆧΐ˘࣎ dbExpress ྤफ़ะă फ़ะͽ̈́ాቢ̮ІĄྤ۞ۍ ϲາ۞ྤफ़ሀ௡ͽᐼх CLXޙ 3 ιࣇҋ̎۞ྤफ़ሀ௡̚Ąٺ౺˭۞Վូ઄నྤफ़ะᄃాቢ̮І̏జ࿣ᗓ ฟ൴ྭπέ۞ᑕϡ඀ё 15-33 ጡΝĄ࣐ࡶଋ۞ࣧؕᑕϡ඀ёֹϡڇफ़ऱҨྤזጸវ̚Ă̙҃ົజҋજгᆷ ბྤफ़ะ̚۞੃͗މזბྤफ़ะॡĂٙઇ۞Հજ૟ົజᆷ͗މᏭ۞ྤੈਖ਼Ҍ ბྤफ़ะֽ೩ֻ၆በᏭΑਕ۞͚೯Ą༊ଋ૟ٙበ͗މdbExpress ᑕϡ඀ёֹϡ д dbExpress ᑕϡ඀ё̚Հາྤफ़ Ąځቢķ˘༼Ă၆ѩ඀ԔѣՀк۞ᄲ ాטଋΞਕົຐࢋͽາాቢ۞ЩჍᐼх఺ֱણᇴࣃ۞నؠĄдௐ 23 ౢ۞Ķଠ ྤੈٕߏ΍னдྤफ़ะ۞ ConnectionString পّ̚۞ྤੈᖼೱ࿅ΝĄ ࣧᑕϡ඀ё̚՟ѣాቢ̮ІĂ֤ᆃଋυื૟ᙯᓑҌ BDE ҾЩ۞ڍx т ConnectionString ᄃ IsolationLevel পّ̚۞ྤੈᖼೱ࿅ΝĄ ٺࣧᑕϡ඀ёֹϡ˞ TADOConnection Ăଋυื૟΍னڍx т TransIsolation পّ̚۞ྤੈᖼೱ࿅ΝĄ Params ᄃ ٺࣧᑕϡ඀ёֹϡ˞ TDatabaseĂ֤ᆃଋυื૟΍னڍx т ӄనؠĈםֽੈྤ۞˯̮І ĂଋΞͽԱವࣧాቢـጡтТͽڇଋֹٙϡ۞ҨڍؠЪዋ۞ણᇴࣃĄт ጡ޽ڇጡĂ֤ᆃኛࠎາ۞ҨڇՎូ 1 ̚υื૟ྤफ़็ᏮҌາ۞ྤफ़ऱҨ ଋдڍϯాቢበᏭጡ(Connection Editor)ĂТॡనؠዋ༊۞ણᇴࣃĄт ᙯྤੈĄࡶຐтѩĂኛд TSQLConnection ̝˯ా޷໣ဂΠᔣ׌˭Ăͽព ϲྤफ़ऱాቢ۞ٙᅮ۞࠹ޙ8 дՏ࣎ TSQLConnection ̮І̝˯Ă޽ؠϡͽ ዋ۞࠹၆ྤफ़ऱాቢ۞ TSQLConnection ̮ІĄ 7 ၆Տ࣎дՎូ 4 ̚ཉˢ۞ྤफ़ะĂ࠰૟׎ SQLConnection পّనؠјЪ TSQLConnection ̮ІĄ DatabaseName পّనؠј BDE ̝ҾЩ۞͞ё) Ăౌᆧΐ˘ ֹϡ ADO ྤफ़ะ˯۞ ConnectionString পّĂٕߏ૟ BDE ྤफ़ะ۞ ጡ(ּтĂ౅࿅ڇଋТॡ˵଀ࠎՏ̙࣎ͽాቢ̮Іֽΐͽాତ۞ྤफ़ऱҨ TADOConnection)ౌᆧΐ˘࣎ TSQLConnection ̮ІҌາ۞ྤफ़ሀ௡̚Ą ࠎՏ࣎дࣧᑕϡ඀ё̚۞ྤफ़ऱాቢ̮І(TDatabaseăTIBDatabaseăٕ 6 ᄃ඀ёనࢍ͘Ίܝ15-34 ˢ ᄃְІĈڱͽ̶Ҿ࠹၆ᑕҌ TClientDataSet ̚۞পّă͞ ĂͽڱপّăְІăͽ̈́͞۞פЕ΍˞ BDE ᄃ ADO ྤफ़ะϡͽ͚೯Հາԣ ბྤफ़ะ۞ଐԛĄ˭ܑ͗̚މົᅮࢋд඀ёቅ̚ઇ˘ֱአፋĂͽЯᑕᖼೱҌ Ă֤ᆃଋפଋ۞ࣧᑕϡ඀ёֹ̚ϡ˞ BDE ٕ ADO ֽซҖՀາྤफ़۞ԣڍт ࣎યᗟĂТॡٙ൴Ϡયᗟ۞ࣧЯ˫ߏ̦ᆃĄ ඊྤफ़۞Հາౄј˞఺˘֤זаಡѩᙷ᏾ᄱ۞͞ёĂͽឰֹϡ۰ਕૉ࠻ ઍീՀາॡٙ൴Ϡ۞᏾ᄱĂٙͽଋΞਕົᅮࢋԼតдֹϡ۰̬ࢬ˯ڱ൑ ߏӎ̏జᆷҌྤफ़ऱĄГ۰ĂЯࠎдֹϡ۰ਖ਼΍੃ᐂྤफ़ॡĂ֭ڍᏭඕ តĂឰֹϡ۰Ξͽฟୁϡͽྤफ़Հາ۞ᑕϡ඀ёĂٕ۰ߏ఼ۢ΁ࣇ׎በ ጡĂ҃ͷΞਕ଀дֹϡ۰̬ࢬ˯ઇ˘ֱԼڇՀາ۞ྤफ़ਖ਼аྤफ़ऱҨ Հາྤफ़۞͞ёĂଋυืՙؠңॡࢋ૟఺ֱפଋᖼֹ҃ϡԣڍ̙࿅Ăт ౵͌ĄזѨᇴࢫٽѣ̙͌ᐹᕇĂּтΞͽࢫҲٙᅮ۞შྮ߹ณĂТॡֹϹ ׍ڱy ଋΞͽአፋଋ۞ֹϡ۰̬ࢬĂᖣͽϡֽ఍நٙՀາ۞ྤफ़Ą఺࣎͞ end; ApplyUpdates(1); with DataSet as TClientDataSet do begin procedure TForm1.ClientDataSet1AfterPost(DataSet: TDataSet); ጡĈڇफ़ऱҨ ბྤफ़ะ೩ֻ AfterPost ְІ఍ந඀ԔĂ૟ٙՀາ۞ྤफ़ਖ਼ྤ͗މΞͽࠎ ଋຐ఺ᆃઇĂڍጡĄтڇֹ଀ՏѨྤफ़ՀາॡĂϲӈ૟ྤफ़ᆷҌྤफ़ऱҨ y ଋΞͽྏ඾ሀϼ Windows ˯ྤफ़ะ۞ҖࠎĂ˵ಶߏᄲҋҖᇤᆷ඀ёቅĂ Հາ͞ё۞ᑕϡ඀ёĈפΞͽᖼೱАֹ݈̙ϡԣڱѣ׌჌͞ ბྤफ़ะ۞ֹϡĄ͗މ჌ҖࠎĂ֤ᆃଋಶ଀ઇዋ༊۞តજĂͽ௑Ъ ጡ˯۞఺ڇफ़ऱҨྤזᆷڍ࿰నҖࠎĂ˵ಶߏдଋਖ਼΍ྤफ़ॡĂົ૟በᏭඕ ଋֶᏥ̂кᇴ Windows ˯ྤफ़ะ۞ڍLinux ˯೩ֻበᏭ۞ΑਕĄ̙࿅Ăт ΞͽдܮٙՀາ۞ྤफ़Ă֤ᆃଋ̙ᅮઇЇңԼតĂפბྤफ़ะᖣͽԣ͗މ˞ ฟ൴ྭπέ۞ᑕϡ඀ё 15-35 ྤफ़ٙઇ۞ՀາજүĄ ΍۞ྖĂಶೇࣧ၆ϫ݈఺ඊ ఺ඊՀາྤफ़ᔘ՟జਖ਼ڍRevertRecord CancelBatch ReverRecord т Ꮽăͽ̈́ՀາĄ Ăϡͽበ̚פҌώгბ۞ԣ ૟ྤफ़ऱ̚۞੃ᐂྤफ़ኑᄦ (̈́PacketRecords) FetchAll ̙͚೯ GetNextPacket Հາ̰टĄ۞̚פ୻ੵԣ ĂޢCommitUpdates ҋજ఍ந Reconcile дᑕϡ඀ёјΑ۞Հາ ொੵĂ̙҃ਖ਼Ҍྤफ़ऱ˯Ą ट̰פώгბ۞ԣٺCancelUpdates ૟ᇶх CancelBatch CancelUpdates CancelUpdatesٕ फ़ऱ˯Ą टਖ਼Ҍྤ̰פUpdateBatch ApplyUpdates ૟ώгბ۞ԣ ะٕྤफ़ऱ˯) ApplyUpdates(дྤफ़ ͔൴۞ְІĄ OnUpdateError ̙͚೯ OnReceivedError ༊Հາྤफ़൴Ϡ᏾ᄱॡĂٙ Հજăజ೧ˢăٕߏజӁੵĄ UpdateStatus RecordStatus UpdateStatus ܑϯߙඊྤफ़ߏϏԼតăజ ॡĂྤफ़Հາ۞჌ᙷĄ Հາ̰ट۞פUpdateRecordTypes FilterGroup StatusFilter ܑϯ༊ਖ਼΍ԣ າ੃ᐂĄ ӣѣᅮࢋజਖ਼Ҍྤफ़ऱ۞Հ टߏӎ̰פUpdatePending ̙͚೯ ChangeCount ܑϯώгბ۞ԣ ۞តજ࠹࿣ᗓ۞͞ёĄ ጡ̝˯ڇ̙͚೯ CursorType ̙͚೯ ޽ؠ૟ྤफ़ะᄃҨ ϡ̚Ą Հາߏӎдү۞פՙؠజԣ үĄ જ۞פफ़ĂซҖԣ ၆ٙՀາ۞ྤ ົޠ˘ბྤफ़ะ ͗މCachedUpdates LockType ̙ᅮࢋĂЯࠎ BDEྤफ़ะ(TDatabase) ADOྤफ़ะ TClientDataSet ϡ౉ ăᄃְІڱՀາྤफ़۞পّă͞פϡֽԣ 15.9ܑ ᄃ඀ёనࢍ͘Ίܝ15-36 ˢ ઇ۞ՀજĄ ᛉଋᑕޙΨĄଋᔘ଀ซҖ15-2ࢱ̚Ķொങ VCL ᑕϡ඀ёķ˘༼ٙ̚ײ۞ CGI Ә)ٕކёࣧݭב۞ ҂..\Source\Internet\httpd.pasĂ׎̚ѣ Apache API ΨĂᖼೱјࠎ Apache( ણײ۞ ͷ૟఺ֱ API ᆷү۞ྖĂ֤ᆃಶͧྵᙱͽொങ˞Ąଋಶ଀дଋ۞ࣧؕᑫ̚Ăు˘ຩವĂ֭ ଋ۞ᑕϡ඀ёߏͽ ISAPIăNSAPIăWindows CGI ٕ׎΁ Web ۞ APIڍт (native)API ۞ྖĂ֤ᆃࢋ૟׎ொങҌ Linux ಶ̙ߏᙱְĄ WebBroker Ă҃ͷ౅࿅ WebBroker ۞̬ࢬֽྻүă˫ᔖҺֹϡࣧϠ ଋ۞ᑕϡ඀ёֹϡڍጡ۞࠹ᙯੈिĄтڇтңᇤᆷ Web ҨٺᙯזΞͽԱ ጡᑕϡ඀ёķĂڇ൴˘࣎າ۞ᑕϡ඀ёĄኛણ֍ௐ 33 ౢĂĶฟ൴ Internet Ҩ ጡᑕϡ඀ёĂᔘߏຐࢋд Linux ˯ฟڇ҂ଋտౣߏொങଋ۞ Web Ҩޥᑕྍ ଋຐ૟ιວҌ Linux ̝˯Ăଋג࣐ࡶଋ̏ѣߊх۞ Internet ᑕϡ඀ёĂ҃ѩ ૟ Internet ᑕϡ඀ёொങҌ Linux ˯ Windows ᄃ Linux ̝˯Ą ٺ ಏ৷۞ CGI ᑕϡ඀ёͽ̈́׎΁ֹϡ WebBroker ۞ᑕϡ඀ёΞͽТॡેҖޝ Netscape Server DLL(NSAPI)ăͽ̈́ Windows ۞ CGI ᑕϡ඀ёĄ̙࿅่ѣ ጡĂּт Microsoft Server DLL(ISAPI)ăڇϲ׎΁ݭၗ۞ Web Ҩޙͽ ͽ CGI ۞͞ёԺٕߏ Apache ᑕϡ඀ё۞͞ёĄ҃д Windows ˯ĂଋᔘΞ ጡᑕϡ඀ёĂ̙ኢߏڇгχౄ Web Ҩٽд Linux ˯ĂଋΞͽֹϡ Delphi ᅅ ˯ેҖĄ ბ඀ё˵Ξͽд׌࣎πέ͗މWindows πέٙᇤᆷĂҭ˵Ξͽߏྭπέ۞Ą ጡᑕϡ඀ё఼૱ߏࠎ Linux ˯ٕڇბ඀ё఼ੈĄҨ͗މጡహវֽ׶ڇWeb Ҩ Ξͽ౅࿅ܮጡბ඀ёĂڇπέ۞݀ࢨĄᓝּֽᄲĂInternet ᑕϡ඀ё̚۞Ҩ ؠֽซҖ͹ଂߛၹ۞఼ੈĂٙͽଋΞͽֹᑕϡ඀ёྭ෸ם໤۞ Internet ఼ੈ ᛳٙᏜ۞͹ଂ(client/server)ᑕϡ඀ёĄ˵Яࠎଋ۞ᑕϡ඀ёֹϡᇾܮጡĂڇ ბ඀ёᄃҨ͗މؠֽాତםInternet ᑕϡ඀ёĂࡶֹϡᇾ໤۞ Internet ఼ੈ πέ۞ Internet ᑕϡ඀ёྭ ֹϡహវइІ׶̮І 16-1 ё׶ IDE ώֽ֗ΐͽֹϡĄ ϡ඀ё۞࿪ཝ̚ĂΪࢋщ྅˘Њ vcl70.bpl ۞ኑώӈΞĂιਕజٙѣ۞ᑕϡ඀ д vcl70.bpl ̚Ąд׍ѣֹϡహវइІ̝ᑕٸܮ૞ѣ۞඀ёቅćВϡ۞඀ёቅ Ϊົӣѣιٙܮϲᑕϡ඀ёॡĂᑕϡ඀ё۞ેҖᑫޙvclĄ༊ଋͽ఺჌͞ёֽ ҋજгֹϡົܮϲາ۞࿰నᑕϡ඀ёॡĂιޙ̚Ă݋ߏ visualclx)ĄՏѨଋ д˘࣎Щࠎ vcl ۞హវइІ̚(д CLX ᑕϡ඀ёٸVCL ̮Іߏх ۞ז૱జϡ ಶည׎΁ેҖॡഇ඀ёऱĂహវइІӣѣΞͽд඀ёมВϡ۞඀ёቅĄּтĂ ࠎઘᑫЩ۞ᑫ९Ą ͽ.bplٺహវइІֽેҖ̍үĄࠎ˞׶׎΁ DLL ࠹ડҾĂइІ඀ёऱజᐼх ΨેҖॡഇײనࢍॡഇ׶ેҖॡഇֹϡĂ҃నࢍॡഇహវइІĂ఼૱ߏᖣϤ ϲপঅ۞পّበᏭጡĄಏ˘۞హវइІΞͽдޙ֭ͷΞజϡֽࠎҋࢎ۞̮І IDE ̚Ă ٺёĄ҃నࢍॡഇహវइІ(Design-time packages)݋Ξщ྅בё೩ֻ ІᑫĄٙᏜેҖॡഇహវइІ(Runtime packages)дֹϡ۰ેҖᑕϡ඀ۏВֳ హវइІ(Package)ߏ˘჌Ϥᑕϡ඀ёĂIDE ٕ׌۰ֹٙϡ۞˘჌পঅॾё۞ ϡహវइІ׶̮Іֹ ᄃ඀ёనࢍ͘Ίܝ16-2 ˢ ᑫ۞͹ᑫЩ׶.dpkٕ.dpkwֽ໚ᑫ࠹ТĄ bpl ેҖॡഇహវइІĄ఺ߏ࣎׍ѣDelphiপؠΑਕ۞Windows .dllᑫĄ.bpl ઘᑫЩ ̰ट ܑ16.1 በᛌ࿅۞హវइІᑫ९ ˭ܑЕ΍׶హវइІѣᙯ۞ᑫ९ݭၗĄ! ϲᇾ໤۞ DLLĄ!ޙёॡĂኛ ϲᑕϡ඀ޙΨ۞඀ёऱĂ̙҃ᅮࢋឰฟ൴̍׍ϡͽײϲਕଂᑕϡ඀ёޙᅮࢋ ϲహវइІֽ྿јĄдଋޙ༊ଋຐ૟ҋࢎ̮Іΐˢ IDE ֹ̚ϡॡĂኛଋ౅࿅ హវइІ׶ᇾ໤ DLLs ΐͽበᛌĄ ϲॡޙᑕϡ඀ёҋ֗۞඀ёቅ̖ົдՏѨٺІឰበᛌજүՀԣĂЯࠎΪѣᛳ ёົត଀Հ̈⎯఺ົ༼࠷ր௚ྤ໚׶ർჄ۞ᐼх۩มĄՀซ˘ՎгĂహវइ ΞેҖ඀ё̚ĂٙͽΞેҖ඀זϡ඀ё֭՟ѣԯ࣎Ҿ۞̮І඀ёऱኑώᘭඕ ᇾ໤̮ІĄЯࠎᑕפ۞ᑕϡ඀ё⎯Β߁ Delphi ώ֗⎯Ξͽ౅࿅హវइІֽх ࢦኑֹϡ۞඀ёቅበᛌјેҖॡഇ඀ёऱĂಶਕд඀ёมВϡĄּтĂٙѣ (఺ߏΞᏴፄֹّϡ۞)ͧ੓็௚۞඀ёనࢍ͞ё೩ֻՀк۞ᐹᕇĄᖣϤԯΞ నࢍॡഇహវइІਕૉᖎ̶̼൴׶щ྅ҋࢎ̮І۞̍үĄેҖॡഇహវइІ ࠎ̦ᆃֹϡహវइІ?! Delphi ̮ІĂ֤ᆃኛдщ྅̝݈Ă૟̮ІበᛌјనࢍॡഇహវइІĄ! ଋຐᇤᆷڍϲҋ̎۞ેҖॡഇహវइІͽֻᑕϡ඀ёВϡĄтޙଋΞͽ ̚Ăυืԯιࣇ༊јనࢍॡഇహវइІֽщ྅Ą IDE זࢋԯҋࢎ̮Іΐڍϲֹϡֹٕ̙ϡహវइІ۞඀ёĄ൒҃ĂтޙଋΞͽ ѣనࢍॡഇహវइІĂਕ఍நд IDE ̚۞̮ІĄ VCL ᄃ CLX ̮ІĂТॡᔘ ˞ދధкְАበᛌ࿅۞ેҖॡഇహវइІĂ̏྅ ֹϡహវइІ׶̮І 16-3 ࡶຐֹϡ Project|Options ၆ྖ͞๴дᑕϡ඀ё̚ྶˢహវइІĂኛଋ! ёĄב y ֹϡ LoadPackage y д IDE ̚Ᏼፄ Project Options ၆ྖ͞๴ćٕ ѣ׌჌જၗྶˢइϡ۞͞ёĈ дᑕϡ඀ё̚ྶˢహវइІ ώĄۍ౯హវइІ۞ϒቁ ͽֻᑕϡ඀ёֹϡĄдଋ̶൴ᑕϡ඀ёॡĂଋυืࢋቁؠֹϡ۰ጾѣЇңυ дր௚ϫᐂ̚Ăٸ׶ᑕϡ඀ёֹٙϡ۞ٙѣహវइІ(.bpl ᑫ)Ą.bpl ᑫυื ࡶຐેҖֹϡ˞హវइІ۞ᑕϡ඀ёĂ࿪ཝ̚υืࢋѣᑕϡ඀ё۞ΞેҖᑫ ϡ඀ёॡ೩ֻٙᅮ۞ΑਕĄ ેҖॡഇహវइІߏ׶ Delphi ᑕϡ඀ё˘੓̶൴۞Ąιࣇົдֹϡ۰ેҖᑕ ેҖॡഇహវइІ ĂኛણዦĶDelphi ඀ёᄬ֏͘ΊķĄ!ځІᑫ׶హវइІ۞ซ˘ՎᄲۏВֳٺᙯ ො హវइІ׶ᑕϡ඀ё۞׎΁ሀ௡ĂົВϡιࣇ۞Бાّྤफ़Ą πέ̝˯۞इІ่ਕӣˢ CLX ̮ІĄ ྭٺଋΞͽ૟ VCL ٕ CLXăࠤҌ૟׌჌ݭၗ۞̮ІТॡΐҌइІ̚Ą୬ϡ dpkᄃdpkw Е΍дహវइІٙ̚ӣѣ̝඀ёಏ̮۞ֽ໚ᑫĄ ϲ˘࣎dcuᑫĄޙёಏ̮ІĂ࠰ dcuᄃpas дహវइІٙ̚ӣѣ̝඀ёಏ̮ᑫ۞˟̮ቅᇆညĄдᅮࢋॡົ၆Տ࣎඀ इІ۞ᑕϡ඀ёĄ ϲֹϡహវޙdcp۞ᑫЩϒߏdpkᑫ۞͹ᑫЩĄଋυืጾѣ˘࣎.dcpᑫֽ ϲ˘࣎dcpᑫĄޙՏ࣎హវइІົٺ߁ٙѣበᛌጡٙᅮࢋ۞௑ཱིྤੈĄ၆ dcp ӣѣహវइІᇾᐝ׶дహវइІٙ̚ѣdcuᑫ९̝ాඕ۞˟̮ቅᇆညĂΒ ઘᑫЩ ̰ट ᄃ඀ёనࢍ͘Ίܝ16-4 ˢ ົည఺ᇹĈ! ̚ĂΐˢࣧА۞ Delphi ඀ёಏ̮ĄּтĂдଋ͹ࢋܑॾ۞ࣧؕᑫ९̚࠻੓ֽ ϲᑕϡ඀ёॡĂଋ̪ᅮࢋдࣧؕ඀ёಏ̮۞ uses ̄ήޙො дଋֹϡహវइІֽ ८͞๴Ą! ĶDefaults」ߤ۞ొغд၆ྖ͞๴פតࠎາ૞९۞ҋજ࿰నࣃĂ֤ᆃኛଋᏴ Ąࡶຐԯϫ݈۞ᏴีפҖॡഇహវइІĂ่ົࠎϫ݈۞૞९Ᏼે۞פଋٙᏴ ͞๴̚۞̰टߏ۩۞Ă֤ᆃᑕϡ඀ёಶົͽֹ̙ϡహវइІ۞͞ёֽበᛌĄ በᏭڍரĂ҃тنଋ۞ᑕϡ඀ё̚Ąࢦኑ޽ؠ۞హវइІЩჍ݋ົజזాඕ ҋજгົܮRuntime Packages በᏭ͞๴̚۞హវइІĂ ٺдଋበᛌॡĂЕ rtl;vcl;vcldb;vclado;vclx;Vclbde; ᓝּֽᄲĈ Packages በᏭ͞๴̚ᏮˢĂኛቁؠଋቁ၁ֹϡ̶ֽཱི࿣ฟ̙Т۞ЩჍĄ Runtime ٺଋۡତڍ˵ಶߏᄲĂvcl70.bpl ߏͽ vcl ۞ݭёᆷјĄт ώཱི)ćۍ۞ ଋ̙֭ᅮࢋдహវइІЩჍ̚ΐ˯ઘᑫЩ(ٕߏ΃ܑ Delphi ๴Ă֤ᆃଋ૟ົՀԼ Delphi ۞Бાّ Library PathĄ ଋበᏭд Add Runtime Package ၆ྖ͞๴۞ Search Path በᏭ͞ڍт ͞๴̝ Package Name በᏭ͞๴˘઎۞ Browse ޷ตĄ హវइІ୻ಏĂኛᕇᏴ Add ޷ตĂГᕇд Add Runtime Package ၆ྖ Runtime Package ၆ྖ͞๴̚ᏮˢາహវइІ۞ЩჍĄࡶࢋᕱᜓΞϡ۞ ߊѣ۞୻ಏ̚ĂኛᕇᏴ Add ޷ต֭д Addז5 ࡶࢋԯາ۞హវइІΐ វइІ̏జЕдበᏭ͞๴̚Ą* ົజҋજгྶˢ)׶̏གྷщ྅р̝నࢍॡഇహវइІѣᙯ۞ેҖॡഇహ ̚Ꮾˢ˘ٕ࣎к࣎హវइІ۞ЩჍĄՏ࣎इІಶΪົдᅮࢋજϡॡĂ̖ በᏭ͞๴۞˭غĶBuild with Runtime Packagesķߤ८͞๴Ă֭дפ4 Ᏼ Packages ࢱѨĄ פ3 Ᏼ Project | OptionsĄ פ2 Ᏼ ϲ૞९Ąޙд IDE ̚ྶˢٕ 1 ֹϡహវइІ׶̮І 16-5 Packages ࢱѨĂ֭д Runtime Packages በᏭ͞๴̚Ꮾˢଋຐֹϡ۞इІЩ פProject | OptionsĂᏴ פଋᔘົᅮࢋ vclxĄࡶຐֹϡ఺ֱహវइІĂኛᏴ ଋຐֹϡෛᛇ̼̮ІĂڍેҖॡഇహវइІĈvclăvcldbărtlăͽ̈́ dbrtlĄт ϲֹϡహវइІ۞͹ଂྤफ़ऱᑕϡ඀ёĄ֤ᆃĂଋົᅮࢋрೀ࣎ޙࡶߏଋຐ ೩ϤΩ˘࣎హវइІֽ೩ֻĄ ё׶ Windows ̬ࢬ̮৵Ąι̙֭Βӣྤफ़ऱ̮ІĂ఺ֱ̮ІבІ۞ր௚̮ ܧІć҃ rtl इІ̚݋ӣѣ̮۞ז׶̮ІహវइІĄvcl इІ̚ӣѣ౵૱ֹϡ ѣᇴ࣎࿰Аበᛌр۞ેҖॡഇహវइІĂΒ߁ rtl ᄃ vclĂ೩ֻ˞ૄώ۞ᄬ֏ ՙؠٙࢋֹϡ۞ેҖॡഇహវइІ Їң̏ොΊ̝ᙷҾ۞ොΊĄ! ঐפІĂ֭ͷۏϡ఺ֱᙷҾ۞ֹٸॡυืȈ̶͕̈ĂЯࠎ఺࣎જүТॡົᛖ హវइІྶעహវइІĄдྶעΨ UnloadPackage ֽજၗгײଋ˵Ξͽ౅࿅ AddObject(FileName, Pointer(LoadPackage(FileName))); with PackageList.Items do if Execute then with OpenDialog do ᑫ९Ą۞פёቅົྶˢдฟୁ၆ྖ͞๴ٙ̚Ᏼ ඀۞˭غёજၗྶˢహវइІĄּтĂב Ψ LoadPackageײ඀ё˵Ξͽ౅࿅ ёજၗгྶˢహវइІב ֹϡ LoadPackage ̄ή̚Ą uses ז̄ή̚ĄдٙயϠ۞ࣧؕᑫ९̚ĂForm Designer ົҋજԯ఺ֱಏ̮ΐ uses זѩĂӈֹଋ̏дᑕϡ඀ёֹ̚ϡ˞ vcl ᄃ rtlĂଋ̪υืԯ఺ֱણ҂ΐ ඀ёಏ̮ౌΒӣд vcl ᄃ rtl హវइІ̚Ąᔵ൒т۞זд఺ּ࣎̄ٙ̚ણ҂ Dialogs; // д CLX ᑕϡ඀ё̚۞ߙֱಏ̮ົѣ̙ٙТ Windows, Message, SysUtils, Variants, Classes, Graphics, Controls, Forms, uses interface unit MainForm; ᄃ඀ёనࢍ͘Ίܝ16-6 ˢ পঅ۞পّበᏭጡĄٙ࿰Ащ྅рనࢍॡഇ̮ІహវइІĂ݋ෛଋٙϡ۞ ϲޙĂ֭ࠎҋࢎ̮ІۍIDE ۞̮Іࢬ זనࢍॡഇహវइІߏϡֽԯ̮Іщ྅ నࢍॡഇహវइІ ୻ಏ̚ĄזΞͽෛᅮࢋԯιΐܮϲҋ̎۞హវइІĂଋޙଋຐڍт rtl;vcl;vcldb;stats;! ͽֹϡĂኛଋд Runtime Packages በᏭ͞๴̚ΐͽᏮˢᙷҬт˭۞̰टĈ ּтĂ઄ؠଋѣ˘࣎Ⴭࠎ stats.bpl ۞௚ࢍహវइІĄࡶຐдᑕϡ඀ёֽ̚ΐ Ꮽ͞๴̚Ą! д Packages ࢱѨ۞ Runtime Packages በזOptions ֭ԯహវइІ۞ЩჍΐ Project | פАበᛌр۞इІĄࡶຐдᑕϡ඀ёֹ̚ϡహវइІĂኛଋᏴ ҋࢎహវइІΞͽߏଋٙᇤᆷ֭በᛌ۞ bplĂٕߏϤ׎΁ֻᑕથٙ೩ֻ̝࿰ ҋࢎహវइІ Module Load: vcl70.bpl Has Debug Info. Base Address $400B0000. Process Project1.exe ($22C) ᙷҬ˭Җ̚۞̰टĈזჍĄٙͽĂᓝּֽᄲĂ၆ vcl70.bpl ֽᄲĂଋົ࠻ І͟ᄫົពϯՏ࣎ྶˢ۞ሀ௡ůΒ߁ٙѣ۞इІĄιົЕ΍Ԇፋ۞इІЩ ၅ְІ͟ᄫ(event log)ĞኛᏴፄ View|Debug Windows|Event LogğĄְ៍ ޢߏેҖᑕϡ඀ёĂ൒ܮΨֱ֤इІ۞͞ёĂײΩ˘჌ҿᕝᑕϡ඀ёտౣົ ਕૉበᛌĄ ߏӎѣд Runtime Package በᏭ͞๴̚Ꮾˢ vcl ٕ rtlĂଋ۞ᑕϡ඀ёౌ˘ᇹ ιࣇ˞Ą(ኛଋણ҂д16-11ࢱ̚۞ĶRequires ̄ήķĄ)൑ኢזή̏̚གྷણ҂ ො ְ၁˯Ăଋ̙֭֍଀ࢋ૟ vcl ᄃ rtl ගӣˢĄЯࠎд vcldb ̚۞ Requires ̄ rtl;vcl;Vcldb;vclx;! visualclxĄ! זᔘົᅮࢋϡ ጡᑕϡ඀ёॡĂଋᔘົᅮࢋ netclx ͽ̈́ baseclxĂٕధڇჍĄдฟ൴ Web Ҩ ֹϡహវइІ׶̮І 16-7 16-18ࢱ̚۞ĶइІะЪᑫķ˘༼Ą) Ăኛଋણ҂дځइІะЪᑫ۞ՀྎႽᄲٺᑫ̚ົӣѣ׎΁۞ᑫ९Ą(ᙯ इІߏ׶.dpc(इІะЪ)ᑫ˘੓΍ఱॡĂ่ᅮኑᄦ˘࣎ᑫ९ć.dpcڍт ̚*υืд Delphi Library Path ̚Ą! ఺ֱᑫ९Β߁д̶൴۞Ⴣͯڍdcp ᑫ⎯׶.dcu ᑫ۞ϫᐂ)т.ٸଋϡֽх Іᄃᇾ໤ DLLsķ˘༼Ą) ĂኛણዦĶइځ఺ֱᑫ९۞ซ˘Վᄲٺቁؠଋ۞ቁኑᄦ˞ٙѣ۞ᑫ९Ą(ᙯ హវइІߏͽ.bplă.dcpăᄃ.dcu ᑫ९۞͞ё΍ఱ۞Ă֤ᆃኛڍᐂ̚Ąт ώ፟ϫזߏொٕזଋщ྅۞ߏາ۞హវइІĂኛ૟హវइІᑫኑᄦڍ1 т ঐ̮І۞щ྅Ăኛ޷˭ЕՎូĈ!פࡶຐщ྅ҋٕ̎׎΁ֻᑕથ۞̮ІĂٕ۰ߏ ሀёĄ!۞ځWriter’s Guideķٙ̚ᄲ ϲ̝̮І۞ࣧؕ඀ёĂυืᏲ໰ĶComponentޙበᏭహវइІķ˘͛Ą)ଋٙ ϲ̈́ޙϲ̝̮І۞హវइІĄ(ણዦд16-9ࢱ۞Ķޙϲ֭በᛌӣѣٙޙІĂኛ ଋ̏གྷᇤᆷ˞ҋ̎۞̮ڍٙѣ̮І࠰ͽహវइІ۞͞ёщ྅Ҍ IDE ̚Ąт щ྅̮ІహវइІ ೩ֻֽઇࠎາ̮І۞࿰నटጡĄ IDE ̚Ądclusr నࢍॡഇహវइІߏ ז׎΁ฟ൴ᇄથٙ೩ֻ۞̮ІహវइІ ੵ˞࿰Ащ྅۞హវइІ̝γĂଋ˵Ξͽщ྅ҋ̎۞̮ІహវइІĂٕߏଂ ೩ֻଋֹϡĄۍ۞ᇾ໤̮Ід̮Іࢬ vclĄdclstd ώ֗ӣѣᗝγ۞ΑਕĂਕԯ̂ొЊ זણ҂ܮ ήķĄ*ּтĂdclstd ۞ Requires ̄ή̚ણ҂ٙࢋ۞హវइІĄ)ણዦд16-11ࢱ۞ĶRequires ̄ ΨనࢍॡഇహវइІֽྻү۞Ă֭дιࣇײ఺ֱనࢍॡഇహវइІĂߏ౅࿅ ଋր௚˯۞इІ୻ಏĄٺPackages ֽᑭෛщ྅ Component | Install | פώĂͽ̈́ଋߏӎΐͽҋࢎ҃ؠĄଋΞͽᏴۍ Delphi ᄃ඀ёనࢍ͘Ίܝ16-8 ˢ ொੵĄ ̚ۍЇ˘̮І֭ᕇᏴ Hide ົԯ̮Іଂ̮ІࢬפࢱѨЩჍĄᏴ۞̚ۍ̮Іࢬ ᕇᏴ Palette ࢱѨĄPalette ᏴีࢱѨົЕ΍̏щ྅۞̮ІĂͽ̈́ιࣇ΍னд Tools | Environment Options ֭ פComponent | Configure PaletteĂٕᏴ פঐహវइІ۞щ྅ĂኛᏴפொੵ̮ІĂ̙҃ຐ̚ۍࡶࢋଂ̮Іࢬ Default ߤ८͞๴Ą ۞ొغд၆ྖ͞๴פԯϫ݈̏щ྅۞Ᏼፄតјາ૞९۞ҋજ࿰నࣃĂኛᏴ ଋְАԼត࿰నࣃĄࡶࢋܧϲĂੵޙາ۞૞९ົͽٙѣ̏щ྅۞హវइІֽ ඀Ԕٙ޽ؠ۞ࢱѨ̚Ăֹ֭ϡιࣇд࠹Т඀Ԕٙ̚޽ؠ۞ЩჍĄ! д̮І̝ RegisterComponents̚ۍІࢬ̮זдహវइІ̚۞̮ІĂົజщ྅ 4 ᕇᏴ OKĄ హវइІ֭ᕇᏴ RemoveĄ!פx ࡶࢋଂ୻ಏ̚ொੵహវइІĂኛᏴ ྖ͞๴Ăֽ૟इІะЪᑫ̚۞.bpl ᑫ׶׎΁ᑫ९ྋ΍Ą! ΍ன˘࣎າ۞၆ົܮଋᏴፄ۞ߏ.dpc ᑫĂ֤ᆃڍᑫ֭ᕇᏴ OpenĄт bpl ᑫٕ.dpc. פ ၆ྖ͞๴̚Ăᕱᜓ.bpl ᑫٙд۞ϫᐂ(ણዦՎូ 1)ĄᏴ ୻ಏ̚ĂኛᕇᏴ Add ֭д Add Design!Packageזx ࡶࢋԯహវइІΐ ComponentsĄ! హវइІ֭ᕇᏴפx ࡶࢋ࠻࠻д̏щ྅హវइІ̚۞̮І୻ಏĂኛᏴ ι۞ߤ८͞๴Ą!פঐహវइІ۞щ྅Ăኛ̙ࢋᏴפx ࡶࢋ य़ᙝ۞ߤ८͞๴Ą!ٺҜפIDE ̚ĂኛᏴ זx ࡶࢋԯహវइІщ྅ ٙѣΞͽֹϡ̝హវइІ۞୻ಏĄ ĂົЕ΍˭غOptions ֭ᕇᏴ Packages ࢱѨĄдĶDesign packagesķ Project | פ Component | Install PackagesĂٕ ߏ Ᏼ פଂ IDE Αਕܑ̚Ᏼ 2 ֹϡహវइІ׶̮І 16-9 Requires ༼ᕇ̚ĄଋΞͽࢦኑ఺࣎ՎូͽΐˢՀк۞హវइІĄ హវइІົ΍னд Package በᏭጡ۞۞פᕱᜓᑫ९ĂГᕇᏴ OKĄٙᏴ ࢱѨ̚Ăд Package name በᏭ͞๴̚Ꮾˢ.dcp ᑫ९ЩჍĂٕᕇᏴ Browse requires ̄ή̚ĂٙͽᕇᏴ Add ตĄд Requires ז0 ЯࠎࢋԯహវइІΐ к۞඀ёಏ̮Ą ΍னд Package በᏭጡ۞ Contains ༼ᕇ̚ĄଋΞͽࢦኑ఺࣎ՎូΐˢՀ ඀ёಏ̮۞פᑫ९ЩჍĂٕᕇᏴ Browse ͽᕱᜓᑫ९ĂГᕇᏴ OKĄٙᏴ Add ตĄд Add unit ࢱѨ̚Ăд Unit file name በᏭ͞๴̚Ꮾˢ.pas contains ̄ή̚ĂٙͽᕇᏴ Package በᏭጡ۞ ז0 Яࠎࢋԯ඀ёಏ̮ΐ (Requires)༼ᕇͽ̈́ৼˢ(Contains)༼ᕇĄ ពϯд Package በᏭጡ̚ĄPackage በᏭጡົពϯາइІ۞υࢋົܮІ హវइІဦϯ֭ᕇᏴ OKĄٙயϠ۞హវइפFile|New|OtherĂᏴ פ0 Ᏼ Ăኛણ҂д16-11ࢱ۞ĶᄮᙊహវइІ۞ߛၹķ˘༼Ą!ځᄲ д఺㗗ٙЕ΍̝ՎូĂ׎ซ˘Վٺ඀ԔĄᙯ۞˭غϲహវइІĂኛ޷ޙࡶࢋ ϲహវइІޙ !హវइІࣧؕᑫĂ׎ઘᑫЩߏ.dpkĂߏϤహវइІበᏭጡٙயϠ۞Ą І۞г͞Ą హវइІ̝ҋࢎ̮ז̄ήߏдࣧؕ඀ёቅಏ̮̚ĂଋϡֽЕˢٙࢋበᛌ Ăιӣѣበᛌ࿅̝.bpl ᑫ۞ΑਕĄContainsۏߏ఺ֱࣧؕ඀ёಏ̮۞Β྅ y በᛌॡٙᅮৼˢ(contained)ٕᘭඕ۞඀ёಏ̮ᑫ̝୻ಏĄహវइІ၁ኳ˯ హវइІ̝୻ಏĄ y າహវइІυื(required)ֹϡ۞׎΁హវइІ̝୻ಏăٕυืాඕ۞າ y హវइІ۞ЩჍ(name)Ą ϲహវइІᅮࢋ޽ؠޙ ϲ̈́በᏭహវइІޙ ᄃ඀ёనࢍ͘Ίܝ16-10 ˢ ϲॡ۞࿰నࣃĄࡶࢋᔘࣧ࿰నࣃĂኛӁੵ defproj.dof ᑫ९Ąޙјࠎາ૞९ ົܮĂ֤ᆃϫ݈۞ packages నؠ˞פ༊ଋ޷˭ OK ॡĂࡶѩߤ८͞๴జ८ Ăд Project Options ၆ྖ஼۞ν˭֎Ăѣ˘࣎ Default ߤ८͞๴ĄזଋΞͽ࠻ Ᏼፄ Description ࢱѨĄޢOptions ޷ตĂ൒ ࡶࢋበᏭహវइІ۞ೡٕࢗ׎΁ᏴีĂኛͽ໣ဂಏᕇ Package በᏭጡ۞ ˭໣ဂΠᔣ֭Ᏼፄ OpenĄ д Requires ༼ᕇ̚۞˘࣎హវइІĂ޷פy дฟୁ Package በᏭጡॡĂᏴ វइІĂ֭ᕇᏴ Edit ޷ตĄ హפComponent | Install PackagesĂଂ Design Packages ୻ಏ̚Ᏼ פy Ᏼ dpk ᑫĄ פFile | Open(ٕ File | Reopen)֭Ᏼ פy Ᏼ ѣೀ჌ĂڱฟୁࢋበᏭ̝ߊѣహវइІ۞͞ በᏭߊѣ۞హវइІ ଋΞͽдࣧؕቅֹ̚ϡ൑ӸĄ ༊ଋฟ൴ྭπέᑕϡ඀ёॡĂኛ̙ࢋдइІᑫ(.dpk)ֹ̚ϡ IFDEFsĄ̙࿅Ă ො ଋ˵Ξͽ޷˭ Install ตͽૻ࢝ make જүซҖĄ 0 д Package በᏭጡ̚ĂᕇᏴ Compile ตͽበᛌహវइІĄ Designtime and runtime Ᏼፄ๪ตĄ! פϲΞͽдనࢍॡഇ׶ેҖॡഇֹϡ۞హវइІĂኛᏴޙx ࡶࢋ ᑫ̚Ą)! dpk זRuntime only Ᏼፄ๪ตĄ(ٕԯ{$RUNONLY}በᛌ޽΄ΐ פ щ྅۞హវइІ)ĂኛᏴڱϲΪֻેҖॡഇֹϡ۞హវइІ(൑ޙx ࡶࢋ dpk ᑫ̚Ą)! זበᛌ޽΄ΐ Designtime only Ᏼፄ๪ตĄ(ٕ۰ԯ{$DESIGNONLY} פइІ)ĂኛᏴ дેҖॡֹϡ۞హវڱϲΪֻనࢍॡഇֹϡ۞హវइІ)൑ޙx ࡶࢋ ϲ̝హវइІ۞჌ᙷĄޙᕇᏴ Options ԣిตĂ֭ՙؠଋٙࢋ 0 ֹϡహវइІ׶̮І 16-11 ගӣˢĄ ଀૟ VisualCLXܮπέ۞ฟ൴˯Ăྭٺϡ CLX ̮Іֹڍvcl इІගӣˢĄт ϡ˞ VCL ̮ІĂҰ˵଀૟ֹڍϲ۞హវइІౌົᅮࢋ rtlĄтޙො ̂ొЊଋٙ ଋ۞హវइІ̚Ą!זĶຳ̚ķԯӣѣ඀ёಏ̮۞హវइІ๗ ׎΁۞హវइІд requires ̄ή̚జ࠷ர˞Ă֤በᛌጡಶົڍιࣇΐˢĄт ׎΁۞హវइІಶᑕྍ΍னдహវइІ۞ requires ̄ή̚Ăӎ݋ଋಶᑕྍ૟ ӣ߁дహវइІ̚۞඀ёಏ̮Ăણ҂˞׎΁۞హវइІ඀ёಏ̮Ă֤ᆃڍт ׶ΒӣдγొహវइІ̚Ă׎Ї˘඀ёಏ̮۞ᑕϡ඀ё̚Ą! ϡϫ݈హវइІֹזrequires ̄ή̚۞హវइІĂົдበᛌॡҋજгాඕ ٺ requires ̄ή޽ؠ˞Ϥϫ݈హវइІֹٙϡ̝׎΁ăγొ۞హវइІĄӣ߁ Requires ̄ή யϠ Package1.bpl.7Ą!ົܮ ˢ 7Ă֤ᆃ Package1 Ꮾޢ ώཱིΐҌଋ۞इІ૞९̚Ăኛд LIB VersionۍࣃĄᓝּֽᄲĂࡶࢋ૟ ۞ Description ࢱѨ̚ĂኛᏮˢ LIB SuffixăLIB Prefixăٕ LIB Version ۞ Package በᏭጡజฟୁॡĂኛ޷˭ Options ตĄд Project Options ၆ྖ͞๴ ଋ۞इІЩჍ̚Ą༊זώཱིΐۍཉфҚăٕޢଋ˵Ξͽ૟˘ֱ݈ཉфҚă វइІĄ! requires ̄ήٕ̚ߏֹϡహវइІ۞ᑕϡ඀ё̚Ăኛֹϡ Stats ֽણ҂ྍహ ࣎Ⴭࠎ Stats.bpl ׶ Stats.dcp ۞ΞેҖᑫ׶˟̮ቅᇆညĄд׎΁హវइІ۞ யϠ˘࣎Щࠎ Stats.dpk ۞ࣧؕᑫćበᛌጡົ̶ҾயϠ˘ົܮPackage በᏭጡ ԯహវइІ׻Щࠎ StatsĂ֤ᆃڍд૞९̚۞హវइІЩჍυืߏ઱˘۞Ąт హវइІ۞׻Щ y Contains ̄ή y Requires ̄ή y इІ۞ЩჍ హវइІΒӣ˭Еೀ჌௡јĈ ᄮᙊహវइІ۞ߛၹ ᄃ඀ёనࢍ͘Ίܝ16-12 ˢ requires ̄ή̚Ą! ௐ˟࣎హវइІ۞זٸ׎΁۞హវइІֹ̚ϡĂኛ૟ௐ˘࣎హវइІזٸ̮ IDE ̚Ąࡶຐԯ̏གྷઇјహវइІ̝඀ёಏ זវइІĂ֤ଋಶ̙ਕԯιщ྅ ϲ˞˘࣎ӣѣд vcl ̝̚ಏ̮۞హޙଋڍ۞к࣎హវइІ̚Ą఺ຍᏜ඾Ăт ඀ёಏ̮̙ਕ(ۡତٕมତг)ΒӣдТ˘࣎඀ё(Β߁ Delphi ۞ IDE)ֹٙϡ హវइІ̚Ą!זΒӣ۞ٙѣಏ̮Ăдበᛌॡ࠰ົᘭඕ ۡତΒӣдహវइІ̝ contains ̄ή̚۞ٙѣಏ̮Ăٕߏд఺ֱಏ̮̚มତ హវइІ̙ਕ΍னд׎΁హវइІ۞ contains ̄ήĄ ᔖҺֹϡࢦኑ۞ࣧؕ඀ё ιࣇӣ߁ซֽĄ! д pas ᑫ̚Ă֭д contains ̄ή̚૟ٸ۞హវइІĂ֤ᆃኛԯҋ̎۞඀ёቅ ଋᇤᆷ۞ߏҋ̎ڍహវइІ۞඀ёಏ̮ᑫĄтזContains ̄ή޽΍ᑕྍᘭඕ Contains ̄ή ֭ொੵࢦኑ۞హវइІણ҂Ą! ரĄ൒҃Ăࠎ˞඀ёనࢍ۞୻೽׶Ξ᝝ّĂଋྍྍԱ΍نણ҂ົజበᛌጡග дహវइІ̝ requires ̄ή⎯ٕߏд Runtime Packages በᏭ͞๴⎯۞ࢦኑ ఍நࢦኑ۞హវइІણ҂ Package C ಶ̙ਕᅮࢋ Package AĄ Package A ᅮࢋ Package B ֭ͷ Package B ᅮࢋ Package CĂ֤ ڍAćт Package A ᅮࢋ Package BĂ֤ Package B ಶ̙ਕᅮࢋ Package ڍІĄт д఺˘ాҚણ҂̚۞Їңహវइזy ˘ాҚ۞ણ҂υืѣඕՁ̙҃ົણ҂ y హវइІ̙ਕдҋ̎۞ requires ̄ή̚ણ҂ιҋ̎Ą హវइІд׎ requires ̄ή̙̚ਕӣѣೈᒖёણ҂Ą఺ܑϯᄲ ᔖҺೈᒖహវइІણ҂ ֹϡహវइІ׶̮І 16-13 ଋΞͽଂ IDE ٕߏ׻΄ЕበᛌహវइІĄࡶຐଂ IDE ̚ࢦາበᛌహវइІĂ በᛌహវइІ end; NewComponent1 in ‘NewComponent1.pas’; Db, contains vcl; rtl, requires :{በᛌጡ޽΄࠷ர} {$R *.res package MyPack; Ә˞ vcldb హវइІ(д vcldb70.bpl ࣧؕᑫ̚)Ąކ඀ёቅ۞˭غּтĂ Ә*Ą! హវइІ̚Ăᔵ൒ιࣇ̙֭ົЕдৼˢ̄ή̚)በᛌጡົ೩΍ᛋז υࢋహវइІ۞ٙѣಏ̮Ă˵ົజᘭඕٺˢ඀ёಏ̮̚ҭ̙֭хд హវइІ۞඀ёಏ̮ᑫĄдৼזx contains ̄ή޽΍ᅮࢋበᛌ֭ᘭඕ ඀ёಏ̮Ă֤ᆃಶ̙ᅮࢋ requires ̄ήĄ! హវइІ̙̚ӣѣЇңд׎΁హវइІֹ̝ϡಏ̮ͽγ۞׎΁ڍт x requires ̄ήົЕ΍Ϥϫ݈హវइІֹٙϡ̝׎΁γొహវइІĄ x package ܑᐝ޽ؠహវइІ۞ЩჍĄ! View SourceĄ פ0 д Package በᏭጡ̚޷˭໣ဂΠᔣ֭Ᏼ 0 д Package በᏭጡ̚ฟୁహវइІĄ ࡶࢋд Code በᏭጡ̚ฟୁ૞९ࣧؕᑫĂ ј஄஑Ą इІ)ઘᑫЩΐͽᐼхĂͽᔖҺ׶׎΁ӣѣ Object Pascal ࣧؕ඀ё۞ᑫ९ౄ ۞Ąည૞९ᑫĂଋ˵Ξͽ͘જΐͽበᏭĄహវइІࣧؕᑫᑕྍͽ.dpk(Delphi ϲޙహវइІࣧؕᑫĂಶည૞९ᑫ˘ᇹĂߏϤ Delphi ޷ଋٙ೩ֻ۞ྤੈΐͽ ͘જበᏭహវइІࣧؕᑫ ᄃ඀ёనࢍ͘Ίܝ16-14 ˢ dpkᑫĄ).זٸ)IDE̚۞హវइІĄז{$DESIGNONLY ON} በᛌјֻщ྅ హវइІ̚Ąזٸ{$DENYPACKAEUNIT ON} ֨ͤ඀ёಏ̮జ ࢱ۞Ķ෍۞Β྅ķ˘༼Ą 15-16˭غ{$WEAKPACKAGEUNIT ON} హវइІಏ̮ߏĶ෍۞(Weakly)ķĄણዦд តᇴĄ ड़தĂҭົ֨ͤιણ҂д׎΁హវइІ̚۞۞פх ϲ๗ˢ۞ྤफ़ણ҂Ą఺࣎޽΄ົᆧΐ੃ጸវޙઃͤ OFF} {$G-}ٕ{$IMPORTEDDATA ё̙ົజ̶൴΍Ν۞హវइІֹ̚ϡĄ ԼតĂٕ۰ߏд׎ࣧؕ඀͌ޝώมۍइІдՏ˘࣎ ҲลΑਕ۞హវइІॡд.dpkᑫֹ̚ϡĂ఺ᙷహវ జຳ̚ࢦາበᛌĄдበᛌ೩ֻޢ{$IMPLICITBUILD OFF} ֨ͤహវइІдͽ ޽΄ ϡ౉ ܑ16.2 ᄃహវइІѣᙯ۞በᛌጡ޽΄ ᙯᓑ۞Ą ˭ܑЕ΍˞ଋΞͽϡͽ೧ˢࣧؕ඀ё̚۞በᛌጡ޽΄Ă҃ͷߏ׶హវइІѣ ᄃహវइІѣᙯ۞በᛌጡ޽΄ Ăኛણዦд16-16ࢱ۞Ķֹϡ׻΄ЕซҖበᛌ׶ాķ˘༼Ąځѩְ۞ซ˘Վᄲ ٺΞͽֹϡᄃహវइІѣᙯ۞າᏴีĄᙯܮд׻΄Е˭ซҖበᛌĂ֤ᆃڍт ኛણዦд16-14ࢱ۞ĶᄃహវइІѣᙯ۞በᛌጡ޽΄ķĄ Ăځѩְ۞ซ˘ՎᄲٺଋΞͽдహវइІ۞ࣧؕ඀ё̚೧ˢበᛌጡ޽΄Ąᙯ ϲඈᏴีĄޙตֽᄦүइІ૞९ĄኛΠᑝइІ૞९༼ᕇֽᏴፄщ྅ăበᛌăٕ ො ଋ˵ΞͽᏴፄ File|New|Other ֭ͷᗕᑝ Package ဦϯĄତ඾޷˭ Install x д IDE ̚Ᏼፄ Project|BuildĄ! x ᕇᏴ Package በᏭጡ۞ Compile ตĄ! 0 ༊ Package በᏭጡฟୁॡ 0 ޷˭ ClickĄ హវइІ(*.dpk)ĄפFile | OpenĂ֭Ᏼ פᏴ 0 ֹϡహវइІ׶̮І 16-15 ଋ̙֭υԯ RARE.dll ׶ PACK ˘੓̶൴΍ΝĄ൒҃ĂUNIT1 ̪ົΒ߁д PACK.bpl ̚ć זٸ{$WEAKPACKAGEUNIT ON}Ă֤ᆃ UNIT1 ಶ̙ົజ unit1.pas(Delphi) ٕ unit1.cpp(C++) ̚ΐˢ ٺበᛌహវइІॡ дڍΨ rare.dllĄтײUNIT1Ą઄ؠ UNIT1 ֭՟ѣֹϡ׎΁۞ಏ̮Ăҭιົ ϲ˘࣎Щࠎ PACK ۞హវइІĂιΪӣѣ˘࣎඀ёಏ̮ޙּтĂ઄నଋ̎ ۞Β྅(Weak Packaging)ķĄ! జჍࠎĶ෍ܮహវइІ̼ώгኑώĄͽѩ޽΄ΐͽበᛌ۞඀ёಏ̮ܧёಏ̮۞ ϲ˘࣎ྍ඀ޙଫྍ඀ёಏ̮Ă֭ͷд׎΁ᑕϡ඀ёٕహវइІᅮࢋֹϡॡĂ ጐΞਕдइІᑫ̚Ă࠷ரົܮ{$WEAKPACKAGEUNIT ON}Ă֤ᆃበᛌጡ д඀ёಏ̮̚΍னڍٙயϠ۞ᑫķ˘༼Ą)тޢ16-17ࢱ۞ĶјΑበᛌ ĂኛણዦдځϤበᛌጡٙயϠ̝ᑫ९۞ซ˘Վᄲٺᄃ.bpl ᑫ̚۞͞ёĄ(ᙯ హវइІᑫ̚.dcpٺdcu ᑫᐼх.ז$WEAKPACKAGEUNIT ޽΄ົᇆᜩ ෍۞Β྅ ёऱ۞޽΄Ą ٙѣ඀ٺϨՀкΞϡځኛଋણ҂ௐ 8 ౢ̚۞ĶயϠइІᄃ DLLsķ˘͛Ăͽ ଀ซ˘Վ۞ྤੈĄפͽ ׶इІ࠹ᙯ۞በᛌጡ޽΄Ăኛણ҂ Delphi Language Guide ̚۞ௐ 9 ౢĂٺᙯ Ą!ځĂኛણ҂ቢ˯ᄲځซ˘Վᄲ дϏঘ̝̈́በᛌጡ޽΄Ă׎ٺֱ֤ٺࣧؕ඀ё̚ΐˢ׎΁۞በᛌጡ޽΄Ąᙯ Ξͽ۞ྖĂଋ˵ΞͽдహវइІڍࣇΒӣ˞ IDE ٙࢋֹϡ۞ᗝγ඀ёቅĄт ON}޽΄ΐͽበᛌ۞హវइІĂ˘ਠֽᄲĂߏ̙ਕд඀ёֹ̚ϡ۞ĂЯࠎι ࠹Т඀ё̚۞హវइІ׶׎΁۞హវइІ˘੓ֹϡĄֹϡ{$DESIGNONLY హវइІ̚Ąΐˢ{$G-}ٕ{$IMPORTEDDATA OFF}Ă݋Ξͽ֨ͤזٸᑫజ ො дଋ۞ࣧؕ඀ё̚ΐˢ{$DENYPACKAGEUNIT ON}Ăਕૉ֨ͤ඀ёಏ̮ ᑫĄ) dpk.זٸ){$RUNONLY ON} በᛌјΪֻેҖॡഇֹϡ۞హវइІ ޽΄ ϡ౉ ᄃ඀ёనࢍ͘Ίܝ16-16 ˢ ༊ଋଂ׻΄ЕበᛌॡĂଋΞͽֹϡ˭ܑٙЕă׶హវइІѣᙯ۞ᏴีĄ ֹϡ׻΄ЕซҖበᛌ׶ాඕ distribution ̚Ą ٙѣ۞ vcl ۞ᇾ໤ٺజӣ߁ڱ൑ܮ ĂPenWinט՟ѣ෍Β྅፟ڍт ጡ۞᏾ᄱੈिĂЯࠎ PenWin ಏ̮ົТॡజΒӣд vcl ᄃଋ۞इІ̚ĄЯѩĂ በᛌזଋྏ඾யϠӣѣ PenWin ۞इІĂ֤ᆃ૟ົ଀ڍ૟ιྶˢĄௐ˟Ăт дЇң˘ొϏ྅ѣ PenWin.dll ۞࿪ཝ˯Ăڱ൑ܮᙥඕҌ PenWin.dllĂٙͽଋ ൴׌࣎યᗟĄࢵАĂvcl ҋ̎ົᐖၗг͔ົܮ෍Β྅ॡĂܧ֭ PenWin ڍт ٙயϠ۞ΞેҖᑫົజᐖၗгᙥඕҌ PenWin.dllĄ ९ॡĂPenWin ົజҋ VCL70.dcp ̚ኑᄦ΍ֽĂ֭ͷۡତᘭඕҌଋ۞૞९̚ć vcl ̚Ą༊ଋበᛌߙֹ࣎ϡ PenWin ᄃ vcl इІ۞૞ ٺPenWin ಏ̮జ෍Β྅ ఺࣎நϤĂٺົֹϡ PenWin ҃ͷ̂кᇴ۞࿪ཝ˯ౌ՟ѣ PenWin.dllĄૄ PenWin.dllĄ̂кᇴ۞૞९̙ זᓝּֽᄲĂDelphi ۞ PenWin ಏ̮ົણ҂ யϠ۞኏ࡎĄ! ІᑫĂ֭ঐੵдॲፂ࠹Т̝γొ඀ёऱ۞హវइІมٙۏ̶൴̙૱ϡ۞Вֳ ӄଋᔖҺם׎इІᑫ̶൴ග׎΁ Delphi ඀ёనࢍˠࣶ۞ฟ൴۰ֹϡ۞Ąιਕ $WEAKPACKAGEUNIT ޽΄ߏ࣎ซล۞ΑਕĂ׎ϫ۞ߏϡֽឰֱ֤ົԯ ࣃనؠ߱རăٕඕՁ߱རĄؕ ܐጾѣБાّតᇴăڱො ӣѣ$WEAKPACKAGEUNIT ޽΄۞඀ёಏ̮Ă൑ హវइІ۞)ኑώĄ!ܧ)ϡι۞ֹפ̚ ۞హវइІٕᑕϡ඀ёົଂ PACK.dcp UNIT1 זᛌ PACKĂበᛌጡ̪ົԯ UNIT1 Β߁д PACK.bpl ̚Ąҭ׎΁ણ҂ UNIT1Ą఺ॡĂᔵ൒ଋд UNIT1 ֹ̚ϡ{$WEAKPACKAGEUNIT ON}ֽበ PACK ̚Ą઄న UNIT2 ֹϡ זனдĂ઄నଋԯௐ˟࣎඀ёಏ̮ UNIT2 ΐ ૞९̚Ąזιಶົଂ PACK.dcp ̚జኑᄦ΍ֽĂ֭ۡତበᛌ Ă֤זUNIT1 జ׎΁ֹϡ pack ۞హវइІٕ඀ёણ҂ ڍPACK.dcp ̚Ąт ֹϡహវइІ׶̮І 16-17 ࢱѨ˯ĂซҖଋຐઇ۞ԼតӈΞĄ д Directories/ConditionalsޢΐిᔣĂͽฟୁ Project Options ၆ྖ͞๴Ă൒ ̝̚ĄଋΞͽԼតѩ˘࿰న۞నؠĂΪื޷˭д Package በᏭጡ̚۞ Options д Tools|Environment Options ၆ྖ͞๴̝̚ Library ࢱѨٙ޽ؠ۞ϫᐂٺ జயϠົܮĂ.bpiă.bplăᄃ.lib ᑫ९Ăд࿰నଐԛ˭Ăޢ༊Ԇјበᛌજү̝ ኛଋણ҂д16-2ࢱ̚۞ĶइІᄃᇾ໤ DLLķ˘͛Ą ఺ֱᑫ९۞୻຾ೡࢗĂٺјΑበᛌ۞इІΒ߁˞.dcpă.dcuăͽ̈́.bpl ᑫĄᙯ ϲЩࠎ traypak.bpl ۞హវइІĄ!ޙົܮ۞హវइІᑫĂ֤ᆃበᛌጡ ଋበᛌЩࠎ traypak.dpkڍົតјϤበᛌጡٙயϠ̝ᑫ९۞͹ᑫЩĄּтĂт ϲహវइІĂኛበᛌઘᑫЩࠎ.dpk ۞ࣧؕ඀ёᑫĄ.dpk ᑫ۞͹ᑫЩޙࡶࢋ ٙயϠ۞ᑫ९ޢјΑበᛌ Command-line compilerķొЊĄ ĶThe۞̚ځĂኛણ҂ቢ˯ᄲځѩ੅ኢ̝׻΄ЕᏴี۞ซ˘Վᄲ Ϗдֱ֤ٺዋЪ۞ྖĂΞͽֹϡ׎΁۞׻΄ЕᏴีĄᙯڍᛌహវइІॡĂт ො ֹϡ-$G-ᏴีΞͽົ֨ͤ׶׎΁۞హវइІдТ˘ᑕϡ඀ё̚జֹϡĄдበ ׎ࣧؕ඀ё̙ົజ̶൴΍Ν۞హវइІֹ̚ϡĄ ԼតĂٕ۰ߏд͌ޝώมۍइІॡֹֽϡĂ఺ᙷహវइІдՏ˘࣎ జຳ̚ࢦາበᛌĄдበᛌ೩ֻҲลΑਕ۞హវޢ-Z ֨ͤహវइІдͽ -LUpackage ֹϡహវइІహវइІĄ ϫᐂĄ۞ٸ-LNpath ޽ؠహវइІᑫ(.dcp)ٙࢋх ϫᐂĄ۞ٸ-LEpath ޽ؠహវइІᑫ(.bpl)ٙࢋх ົ֨ͤιણ҂д׎΁హវइІ̚۞តᇴĄ ड़தĂҭ۞פϲ๗ˢ۞ྤफ़ણ҂Ą఺࣎Ᏼีົᆧΐ੃ጸវхޙ-$G- ઃͤ ฟᙯ ϫ۞ ᄃహវइІѣᙯ۞׻΄ЕበᛌጡᏴี 16.3ܑ ᄃ඀ёనࢍ͘Ίܝ16-18 ˢ ጡĄ Tools | Package Collection Editor ฟୁ Package Collection በᏭ פ0 Ᏼ ϲइІะЪĂޙࢋ ЊహវइІĄొ۞פᏴፄࢋщ྅д௡І̚۞ٙѣహវइІĂٕߏΪщ྅ٙᏴ ΍ֽćщ྅၆ྖ͞๴ឰଋפٙၹј۞ᑫ९ົҋજгଂιࣇ۞.pce टጡ̚జᕜ इІะЪॡĂ׎פ׶ଋࢋᐌ̝˘੓̶൴۞׎΁ᑫ९Ą༊ଋд IDE ۞щ྅̚Ᏼ ׎΁۞ฟ൴ˠࣶĄՏ࣎इІะЪ̚ౌӣѣ˘ٕ࣎к࣎హវइІĂΒ߁ bpls Ӏг૟హវइІ̶൴ගܮइІะЪᑫ(Package CollectionĂ.dpl ᑫ)ឰଋਕૉ इІะЪᑫ९ ϡĂ֤ኛቁؠଋ೩ֻ˞.dcp ׶.bpl ᑫĂΞਕᔘົᅮࢋӣˢ.dcu ᑫĄ ଋຐԯેҖॡഇٕనࢍॡഇహវइІĂ̶൴ග׎΁۞ Delphi ฟ൴ˠֹࣶڍт ԯహវइІ̶൴ග׎΁۞ฟ൴ˠࣶ इІ̝݈ĂАᑭߤֹϡ۰۞ր௚̚ߏӎ̏щ྅ѩइІĄ Ξͽдࢦາщ྅ߙֱܮଋֹϡ˞ InstallShield ExpressĂଋ۞щ྅඀ёڍт Windows\System ϫᐂ˭۞ၚּĄ ٺĄଋΞਕົຐֶೈ૟඀ёऱᑫཉפͽх ΞેҖᑫٙд۞ϫᐂĂ֤ᆃಶυืߏ౅࿅ֹϡ۰۞ Path ٙਕૉΐٺϫᐂ̙Т ඀ёऱᑫٙдڍΨ۞ٙѣ඀ёऱᑫ(.bpl ٕ.dll ᑫ)Ąтײё۞.exe ᑫ׶඀ёٙ д̶൴ֹϡેҖॡഇహវइІ۞ᑕϡ඀ёॡĂኛቁؠଋ۞ֹϡ۰ጾѣᑕϡ඀ ̶൴ֹϡహវइІ۞ᑕϡ඀ё Ąځ̚۞ᄲ д̶൴˯۞˘ਠྤੈĂኛଋણ҂ௐ 18 ౢĂĶ̶൴ᑕϡ඀ёķٺ̶൴̖ҖĄᙯ ᑫ९Ξਕߏໂࠎкᇹ̼ĄBpl ͽ̈́ЇңइІٕ bpl ٙᅮࢋજϡ۞ dll ౌυืజ ׶̶൴ᑕϡ඀ё۞͞ёໂࠎᙷҬĄдٙొཌ۞इІ̶̚൴۞ڱ̶൴इІ۞͞ ൴హវइІ̶ ֹϡహវइІ׶̮І 16-19 Optional Group ߤ८͞๴Ą! פଋࢋឰд఺࣎ཏ௡̚۞ᑫ९ߏΞᏴፄّщ྅۞Ă֤ಶ८ڍx т Ꮾˢ۞ٙѣϫᐂĄ! ྅ϫᐂĄд˭ٛ୻ಏ̚ӣѣଋд˯ࢬՎូ 3 ̚д Directory List ٙ̚ x д Install Directory ୻ಏ͞๴̚ĂᏴፄଋࢋд఺࣎ཏ௡̝̚ᑫ९۞щ ᑫ९ཏ௡ॡĂд Package Collection በᏭጡ۞Π઎ົ΍னາ۞᛼ҜĄ פΐˢՀк۞ᑫ९ཏ௡ĄдᏴֽڱᅮࢋ۞ྖĂኛֹϡ࠹Т۞͞ڍჍĄт дဦ̚۞ bpl ᑫĂГᕇᏴ Add File Group ԣిตćᏮˢᑫ९ཏ௡۞Щפ इІะЪ̚ĂኛᏴזٸᑫజщ྅ॡ̖ົТॡజщ྅Ąࡶࢋԯྃӄّᑫ९ д˘੓ćј௡۞ᑫ९Ϊд׶׎࠹ᙯ۞ bplٸؠహវइІ(bpls)۞ᑫ९ཏ௡ ͛ІĂͽ̈́Їңଋࢋৼˢ˘੓̶൴۞ᑫ९Ąྃӄّ۞ᑫ९ົ׶ᙯᓑҌপ 4 ੵ˞ bpl γĂଋ۞इІะЪᔘΞͽΒӣ.dcpă.dcuă׶.pas(඀ёಏ̮)ᑫĂ ϫᐂ۞࿰నྮशĄ! C:\MyPackage\SourceĄщ྅၆ྖ͞๴ົពϯ C:\MyPackage\Source ઇࠎ д Directory Name Ꮾˢ Source ֭д Suggested Path ̚Ꮾˢ ࠹Т۞ϫᐂ̚Ąд఺ּ࣎̄̚ĂଋΞਕࢋזࢋԯٙѣ۞ࣧؕ඀ёኑᄦ ኛֹϡ AddăEdită׶ Delete ޷ตֽበᏭ఺࣎୻ಏĄּтĂ઄నଋ x д Directory List ̚ĂЕ΍ଋࢋщ྅इІะЪ̚ᑫ९ॡ۞࿰నϫᐂĄ इІะЪ۞ᏴፄّྤੈĄ!ٺវइІॡĂ΍னдщ྅၆ྖ͞๴̚Ăᙯ x д Author/Vendor Name በᏭ͞๴̚ĂଋΞͽᏮˢдֹϡ۰щ྅హ Π઎ົពϯ׌࣎᛼Ҝē ဦ౤ბ۞ Collection ༼ᕇĄд Package Collection በᏭጡېдፘפ3 ኛᏴ Remove Package ตĄ ᕇᏴޢٙࢋ۞హវइІ൒פٙΐˢ bplĄࡶࢋொੵహវइІĂኛᏴ ဦົពϯଋېЪ̚ĂኛГᕇᏴ Add ԣిตĄд Package በᏭጡν઎۞ፘ ะזbplĂ֭ᕇᏴ OpenĄࡶຐ૟Հк۞ bpl ΐ פPackage ၆ྖ͞๴̚Ᏼ ᕇᏴ Edit|Add Package ตٕߏ޷˭ Add a package ตĂତ඾д Select 2 ᄃ඀ёనࢍ͘Ίܝ16-20 ˢ OpenĄ File | פࡶࢋበᏭٕࢦາበᛌߊѣ۞.pce ᑫĂኛдइІะЪበᏭጡ̚Ᏼ ᑫĂ֤дበᛌ̝݈ົࢋՐଋᏮˢᑫЩĄ ϏᐼхࣧؕإଋڍጡົயϠ˘࣎׶ࣧؕᑫ(.pce)࠹ТᑫЩ۞.dpc ᑫĄт ϲइІะЪĂኛᕇᏴ Compile ԣిตĄPackage Collection በᛌޙ˞7 ࠎ ᑫᑕྍͽ.pce ࠎઘᑫЩֽᐼхĄ File | SaveĄइІะЪ۞ࣧؕ פ6 ࠎ˞ᐼхइІะЪ۞ࣧؕ඀ёᑫĂኛᏴ Ą!˭غ Ед Required Library Files Ꮽጡֹϡ Delphi ۞Бાّ Library Path ֽຩವ఺ֱᑫ९Ă֭ԯιࣇ ូ 3 ॡд Directory List ٙ̚Ꮾˢ۞ϫᐂĄ*Package Collection በ requires ̄ή̝̚.dcp ᑫ۞щ྅ϫᐂĄ)˭ٛ୻ಏ̚ӣѣଋд˯ࢬՎ ଋࢋహវइІ̚Едפx д Required Libraries ୻ಏ͞๴̚ĂኛᏴ Ą!˭غ ࣇЕд Required Executable Files Ꮽጡົֹϡ Delphi ۞Бાّ Library Path ֽຩವ఺ֱᑫ९Ă֭ԯι ូ 3 ॡд Directory List ٙ̚Ꮾˢ۞ϫᐂĄ*Package Collection በ requires ̄ή̝̚.bpl ᑫ۞щ྅ϫᐂĄ)˭ٛ୻ಏ̚ӣѣଋд˯ࢬՎ ଋࢋЕдహវइІ!פx д Required Executables ୻ಏ͞๴̚ĂᏴ ဦ̚۞ bpl ॡĂд Package Collection በᏭጡົ΍னα࣎າ۞᛼ҜĈ פrequires ̄ή྆۞హវइІᏴፄщ྅ϫᐂĄ༊Ᏼ ٺ5 ଋΞͽࠎะЪ̚Е ९Ą! Collection በᏭጡֹϡ Delphi ۞Бાّ Library Path ֽຩವ఺ֱᑫ វइІ̝ contains ̄ή̚׍ѣপؠઘᑫЩ۞ᑫ९ćPackage ЕдహפDeleteă׶ Auto ޷ตֽበᏭ఺࣎୻ಏĄAuto ޷ตឰଋᏴ x д Include Files ̚Е΍ࢋΒӣд఺࣎ཏ௡̚۞ᑫ९Ąֹϡ Addă ϲ઼ᅫ̼ᑕϡ඀ё 17-1ޙ ĞETM.hlpğĄځ۞ቢ˯ Help ᄲ ଀Հк۞ྤੈĂኛણ҂ Translation ToolsפֽซҖώ˿̼જү۞გநĄࡶຐ Ξͽ౅࿅఺ֱ̍׍ܮώ̚ӣ߁˞ Translation ToolsĂ֤ᆃҰۍ۞˯࣐ࡶҰ͘ y ώ˿̼ĞLocalizationğ y ઼ᅫ̼ĞInternationalizationğ ϲ֖ͽ̶൴Ҍঔγξಞ۞ᑕϡ඀ёĂଋᅮࢋซҖ׌࣎͹ࢋ۞ՎូĈޙࡶຐ ઼ᅫ̼׶ώ˿̼ гࢫҲĄ! γξಞͽ઼̰̈́ξಞĂ׎ٙᅮ۞ॡมᄃٙᅮᇤᆷ඀ёቅౌਕ಼઼̂ٺॡᑕϡ ᅫξಞ˯۞ᑕϡ඀ёĄ౅࿅ְА۞ఢထĂ૟ᑕϡ඀ёТ઼זಶߏχზࢋ̶൴ ώౢࠎଋӔ˯઼ᅫ̼ᑕϡ඀ё۞ᇤᆷ޽͔ĄٙᏜ۞઼ᅫ̼ᑕϡ඀ёĂ ϲ઼ᅫ̼ᑕϡ඀ёޙ ᄃ඀ёనࢍ͘Ίܝ17-2 ˢ ˘ਠֽᄲĂВѣˬ჌ф̮ะ۞ݭၗĈ page 932ğĂѩф̮ะͽ multibyteĞкҜ̮௡ğ۞ф̮ቅֽܑϯ͛͟ф̮Ą ߏ Shift-JIS ф̮ะĞcodeܮϡ۞ֹۍะౌЧѣ̙ТĄᓝּֽᄲĂWindows ͛͟ ώ۞ Windows ֹٙϡ۞ф̮ۍф̮ะߏ ANSI Latin-1Ğ1252ğĄ̙࿅Ă׎΁ ώ(Β߁ EnglishăFrenchăͽ̈́ German)ֹٙϡ۞ۍ Windows ۞ Western фะ ઼Ҿ۞фҚĄ ଋυืቁؠଋᑕϡ඀ё̚۞඀ёቅĂਕૉԁචг఍நιٙࢬ၆჌჌̙Тϫᇾ ඀ёቅ۞఍ந 3 ଋ଀૟ᅮࢋజώ˿̼۞ྤ໚፾ϲ΍ֽĄ 2 ଋ଀ԁචгనࢍֹϡ۰̬ࢬĂͽֹ׎ਕЯᑕώ˿̼ٙઇ۞ԼតĄ 1 ଋυืឰ඀ёቅਕૉ఍ந઼ᅫфะ۞фҚĄ ϲ઼ᅫ̼ᑕϡ඀ё̙֭ᙱĄଋΪᅮԆј˭ЕՎូĈޙ ઼ᅫ̼ᑕϡ඀ё मளĄ!۞˯ڱᙯ۞ᑕϡ඀ёಶΞਕ଀࣒ϒĂ͞ਕЯᑕ̙Т઼छдඁ ֹϡ۰̬ࢬ۞ᖙᛌ̝γĂώ˿̼࿅඀ᔘΒ߁˞Αਕ۞ҋࢎĄּтĂ׶ੑચ࠹ পؠ઼Ҿ̝˯۞඀ԔĄੵ˞ٺٙᏜ۞ώ˿̼Ăߏ˘჌ԯ඀ёᖼೱјΞͽྻү ώ˿̼ Ķ઼छķྤੈֽΐͽೡࢗ۞Ą ᄬ֏ĄWindows ͚೯ధк̙Т۞઼ҾĂՏ˘჌઼Ҿ࠰ͽ˘௡ј၆۞Ķᄬ֏ķă ึၰ۞඀ԔĄ઼ҾĂ޽۞ߏֹϡ۰۞ᒖဩĂΒ߁˞ϫᇾ઼छ۞̼͛௫ၚͽ̈́ ٙᏜ۞઼ᅫ̼Ăߏ˘჌ឰଋ۞඀ёਕд̙Т઼ҾĞLocaleğᒖဩ̚࠰ਕྻү ᅫ઼̼ ϲ઼ᅫ̼ᑕϡ඀ё 17-3ޙ Қ̚۞ߙ˘࣎ф̮Ăտౣߏܑϯಏ˘ф̮ٕߏкҜ̮௡ф̮̚۞˘ొЊĂ઱ Б˘ᇹĂҭ˵Ξͽརд׶ௐ˘࣎Ҝ̮௡ٙܲ঻۞ቑಛ̚ĄЯѩĂࢋۢ྽дф ᚶ۞Ҝ̮௡ĂѣॡΞͽ׶ಏ˘Ҝ̮௡фֹ̮ٙϡ۞фቅԆޢ˟࣎Ҝ̮௡ͽ̈́ Տ࣎кҜ̮௡ф̮ቅ۞ࢵ࣎Ҝ̮௡Ăߏॲፂপؠфะ۞ܲ঻ቑಛֽ҃۞Ąௐ ΞͽΒӣಏ˘Ҝ̮௡ᄃкҜ̮௡஄Ъበቅ͞ё۞ф̮Ąܮ AnsiString ۞фҚ̚ĂՏ࣎ф̮υืͽ˘Ҍк࣎Ҝ̮௡۞஄Ъበቅ͞ёֽΐͽܑϯĄ ϡಏ˘Ҝ̮௡۞ char ֽܑϯĄЯѩĂдкҜ̮௡ֹڱф۞ᇴณ͉кĂЯ҃൑ ಏ˘Ҝ̮௡(8 Ҝ̮)۞ char ݭၗĄЯࠎѩᙷᄬ֏ٙ̚ӣ߁זಏг˘၆˘၆ᑕ ᖎޝڱֲ߷гડֹٙϡ۞෪ԛĞideographicğфะĂ׎ᄬ֏̚۞ф̮՟ѣᏱ кҜ̮௡фะ ะğĂѣॡυืซҖ Windows ф̮ะĞANSIğᄃྍ޽ؠф̮ะ̝ม۞ᖼೱĄ ֹϡ۰፟ጡ˯۞ code page ົ޽ؠྍ፟ጡٙϡ۞ф̮ะĞჍࠎ OEM ф̮ OEM ᄃ ANSI ф̮ะ ۞ UTF-8 ф̮ะ݋ߏ˘௡ Unicode ۞кҜ̮௡በቅր௚Ą гଳϡĄLinux ٙଳϡھߏᗕҜ̮௡ф̮ะĞDBCSğůజֲ߷ᄬր۞઼छᇃ Ҝ̮௡Ą่ѣಏҜ̮௡ф̮̚Ξͽӣ߁۩ࣃĞ#0ğĄкҜ̮௡ф̮ะů͍׎ Ҝ̮௡Ă࠰జෛࠎкҜ̮௡ф̮۞ࢵ۞ 127 ٺ۞ ASCII ф̮Ą҃ٙѣԔࣃ̂ byteğĄ˘ਠֽᄲĂкҜ̮௡ф̮ะ̚౵̈۞ 128 ࣎ф̮Ăົజ၆ߍҌ 7-bit ΐͽܑϯĄкҜ̮௡ф̮۞ௐ˘࣎Ҝ̮௡జჍࠎࢵҜ̮௡Ğleadֽޘܜ̮௡۞ дкҜ̮௡ф̮ะ̚ĂͽಏҜ̮௡ܑϯߙֱф̮Ă׎ዶф̮݋ͽ෹࿅˘࣎Ҝ үຽր௚ٙଳϡ۞ ANSI ф̮ะĂӈࠎಏҜ̮௡ф̮ะĄ ̮௡ф̮ะ̚ĂфҚܑϯё̚۞Տ࣎Ҝ̮௡࠰΃ܑಏ˘࣎ф̮ĄజధкҘ͞ Windows ᄃ Linux ࠰͚೯ಏҜ̮௡ăкҜ̮௡ф̮ะᄃ UnicodeĄдಏҜ кҜ̮௡ĞFixed-width multibyteğޘܜy ׽ؠ y кҜ̮௡ĞMultibyteğ y ಏҜ̮௡ĞSingle-byteğ ᄃ඀ёనࢍ͘Ίܝ17-4 ˢ ࿰ۢĄ࠹ͅгĂଋΪื็ˢ޽Шф̮ٕфҚ۞޽ᇾĄ!ڱࠎф̮۞ְ̂̈А൑ ёٕ඀ԔĂЯבࢋԯкҜ̮௡ф̮ග̷ј׌ΗĄ˵̙ࢋԯф̮༊јણᇴ็ග фҚ۞ф̮ᇴĄ˵ኛ͕̈˼༱̙ٺኛ੃଀ĂфҚ۞Ҝ̮௡ᇴĂ̙֭֍଀ඈТ AnsiStrLIComp CharToByteLen AsniStrLComp CharToByteIndex WrapText AnsiStrLastChar ChangeFileExt StringReplace AnsiStrIComp ByteType StrByteType AsniStrComp ByteToCharLen LastDelimiter AnsiQuoteStr ByteToCharIndex IsPathDelimiter AnsiPos AnsiUpperCaseFileName IsDelimiter AnsiLowerCaseFileName AnsiUpperCase FileSearch AnsiLowerCase AnsiStrUpper ExtractRelativePath AnsiLastChar AnsiStrScan ExtractFilePath AnsiExtractQuoteStr AnsiStrRScan ExtractFileName AnsiCompareFileName AnsiStrPos ExtractFileEx AdjustLineBreaks AnsiStrLower ExtractFileDir Ет˭Ĉ! ё୻בࠎ̝ĄኜٽёĂឰଋ଀ͽᅅבDelphi ೩ֻ˞ధкેҖഇม඀ёऱ̚۞ ё୻ಏĄ!ב ф̮۞ RTL ኛણ҂ቢ˯ Help ̚۞ĶMBCS utilitiesķĂྍ͛Е΍˞ѣਕ˧఍நкҜ̮௡ јࠎкҜ̮௡ф̮Ą!ژҚྋ ёĂѣਕ˧ԯфבдᇤᆷֲ߷઼Ҿ۞඀ёॡĂଋυืቁؠଋϡͽ఍நфҚ۞ ԯιតј˟ҌкҜ̮௡۞ф̮Ąܮbyteğརдܲ঻ቑಛ̰ॡĂ ࢵҜ̮௡ĞleadזĄՏ༊࿃ژଂᐝฟ̶ؕޢፋ࣎фҚĂ൒פߏ᝝ܮڱ͞۞˘ ϲ઼ᅫ̼ᑕϡ඀ё 17-5ޙ !ParentBiDiMode ֽ͚೯ᗕ͞ё઼ّҾ۞඀ёฟ൴Ą ޽ؠᔣሹ۞ଵЕ͞ёĄѩγĂVCL Ϻ౅࿅׌পّĈBiDiMode ׶ TApplications ׍ѣ׌࣎পّĈBiDiKeyboard ᄃ NonBiDiKeyboardĂឰଋ଀ͽ ᄬ֏˵ߏᗕ͞Шّ۞Ąڌ҃׎΁۞̚ ٛұ͛׶ԓұֽ͛ĂܠజჍࠎᗕ͞Шّ۞(BiDi)Ą౵૱֍۞ᗕ͞Шّᄬ֏ߏ ఺჌मҾĂѩᙷ۞ᄬ֏ٺ۞ึԔዦ᝝͛фăͽϤνҌΠ۞͞ёዦ᝝ᇴфĄૄ тТҘ͞ᄬ֏ֹٙϡ۞ϤνҌΠĂ҃ͽϤΠҌνܧѣֱᄬ֏۞ዦ᝝ึԔĂ֭ дᑕϡ඀ё̚ΐˢᗕ͞Шពϯ۞͚೯ ೱјࠎᆵф̮Ą ĂଋΞਕົຐචϡф̮׶ WideChars ̝ม۞˘၆˘၆ᑕĂ҃૟׎ᖼ̚ڱႊზ ਈΝధкᗝγ۞඀ёቅĂТॡ˵ֹ඀ёតၙĄ൒҃Ăдߙֱপঅ۞фҚ఍ந фҚॡĂᆵфะր௚׶ MBCS ր௚̝ม۞ᖼೱĂಶົפనؠфҚপّٕߏ᝝ ϒЯࠎтѩĂVCL ଀ͽಏ˘Ҝ̮௡ٕ MBCS фҚֽܑϯфҚ̝ࣃĄՏ༊ଋ ΨĄײёב ֹϡᆵф̮౵̂۞৿ᕇߏĂWindows Ϊ͚೯͌ᇴ۞ᆵф̮ API ࣎Ҝ̮௡᏾༊јΩ˘࣎ф۞ௐ˘࣎Ҝ̮௡Ą ̮࣎ᇴ̝มĂߏхд඾ۡତ۞ᙯܼĄଋ̙υፉ͕ົԯф̷ј׌ΗĂٕԯௐ˟ MBCS ր௚̙̚ົјϲ۞઄నĄфҚٙҫϡ۞Ҝ̮௡࣎ᇴĂᄃфҚٙ̚ӣф ֹϡᆵф̮በቅ͞ё۞ᐹᕇߏĂ၆фҚ҃֏ĂଋΞͽӀϡధкѣϡăҭд ࣎Ăٙͽፋ࣎ф̮ะਕૉܑϯՀк࠹ள۞ф̮Ą˘ܧ҃ ะЪĄDelphi/Kylix д׌πέ˯࠰͚೯ UCS-2ĄЯࠎᆵф̮ҫϡ׌࣎Ҝ̮௡ UnicodeĞUCS-2ğ۞͚೯ĄLinux үຽր௚݋͚೯˞ UCS-4Ăιߏ UCS-۞෹ ݈ 256 ࣎ Unicode ф̮జ၆ߍҌ ANSI ф̮ะĄWindows үຽր௚ѣ೩ֻ၆ ߏк࣎࣎Ҿ۞Ҝ̮௡ྤफ़௡ј۞ԔЕĂ҃ߏϤ׌࣎Ҝ̮௡ٙ௡ј۞фĄ! Unicode ф̮ะ̚ĂՏ࣎ф̮࠰ͽ׌࣎Ҝ̮௡ܑϯĄЯѩĂUnicode фҚ̙ ̮ะ۞በቅ͞ёĄUnicode ф̮ᄃфҚ࠰జჍࠎᆵф̮ᄃᆵф̮фҚĄд ߏ૟ٙѣ۞ф̮ᖼೱјࠎኜт Unicode ᆵфܮĂڱΩ˘࣎఍ந෪ԛфะ۞͞ ᆵф̮ ᄃ඀ёనࢍ͘Ίܝ17-6 ˢ ! ဦ17.2 TListBoxనјbdRightToLeft ĞPush ModeğĂТॡͽϤνҌΠ۞͞ёֽᏮˢ͛фĄ! ͽϒ૱͞ёᏮˢ۞Ą̙࿅Ă༊ᔣሹՀԼјٛ˚ᄬ֏ॡĂഫᇾົซˢᑅˢሀё ٛұٕ͛ԓұֽ͛఺ᙷϤΠ҃ν۞ᄬ֏ĂߏܠଡજคϺົொҌΩ˘ᙝĄညߏ bdRightToLeft ֹϡϤΠ҃ν۞ዦ᝝ึԔֽ૟͛фᆷ΍Ă˵ົԼត၆ᆅ͞ёĂ bdRightToLeft ဦ17.1 TListBoxనјbdLeftToRight ߏ࿰న̝ࣃĄ! ̝͛ᙷ۞ٛ˚͛фĂ݋ߏϤν҃ΠᏮˢĄbdLeftToRightڱ͛фĄኜтࡻٕ͛ фॡĂഫᇾົซˢᑅˢሀёĞPush ModeğĂТॡͽϤΠҌν۞͞ёֽᏮˢ ٛұٕ͛ԓұֽ̝͛ᙷϤΠҌν۞͛ܠ֭՟ѣԼតĄᓝּֽᄲĂдᏮˢᙷҬ bdLeftToRight ֹϡϤνҌΠ۞ዦ᝝ึԔֽ૟͛фᆷ΍Ă҃၆ᆅ͞ё׶ଡજค bdLeftToRight BiDiModeĄ ۞ีט଀ୁજྍ೩ϯ̝ଠפົ ො THintWindow bdRightToLeftReadingOnlyĄ bdLeftToRight ă bdRightToLeft ă bdRightToLeftNoAlign ă׶ ၗĈېBiDiMode পّߏ˘࣎າ۞Еᓝݭၗ TBiDiModeĂιጾѣα࣎ BiDiMode পّĄ ពϯົܮІᑭෛጡ̚ۏĂּт NameĂдีטߏӎԼតĄ׍ѣ͛фপّ۞ଠ ඾͛фዦ᝝ॡ۞ึԔăݬۡଡજค۞Ҝཉăͽ̈́၆ᆅ͞ёטBiDiMode পّଠ BiDiMode পّ ො ׶ᗕ͞Шّѣᙯ۞჌჌পّдྭπέ۞ᑕϡ඀ё̚ߏ՟ѣ೩ֻ۞Ą ϲ઼ᅫ̼ᑕϡ඀ё 17-7ޙ តјШΠያᆅĄีטĂົԯଠޢ Ψ FlipChildrenײᆃ ߏШνያᆅ۞Ă֤ีטበᏭଠڍ޺̣࣎ဦ৵۞෼ᗓĄтܲีט઎ົ׶׎ͭଠ Π۞ีטĂበᏭଠޢѣ̣࣎ဦ৵۞෼ᗓĂ֤ᆃдՀԼҜཉีטν઎׶׎ͭଠ ۞ีטଠڍLeft পّ׶၆ᆅ͞ёֽՀԼ׎ҜཉĄт ۞ีטDelphi ౅࿅ՀԼଠ ՀԼҜཉĄົౌีטᆸ۞̄ଠ ٙѣล̝ีטՀજҜཉĄ׎ࣃࠎ True ॡĂдटጡଠົ̖ีטତ̄ଠۡ۞ีט ࣃણᇴůAllLevelsĄ׎ࣃࠎ False ॡĂ่ѣटጡଠڒFlipChildren ׍ѣ˘࣎ο Ăּт TFormăTPanelăTGroupbox ඈඈĄีטଠ۞ีט׎΁ଠצߏ჌Ξͽତ ีטҜཉĄटጡଠ۞ีטଠ̝̄ีטĂឰଋ଀ͽአೱटጡଠڱ͞ FlipChildren ڱ͞ FlipChildren Հາࠎາ۞నؠࣃĄົౌีטॡĂд૞९̚۞ٙѣܑॾ׶ଠ ParentBiDiMode পّ࠰ࠎ TrueĂ֤ᆃ༊ଋՀԼ Application ۞ BiDiMode পّ ٙѣ۞ڍ଀ BiDiMode ۞నؠĄтפ ଂ Applicationົܮ֤ᆃܑॾ ІĂۏ ࠎ TFormีטଠڍనؠࣃĂֽՙؠٙࢋֹϡ۞ BiDiModeĄт۞ีטଠ ॲፂ׎ͭົีטࣃĄ༊׎ࣃࠎ TrueĞ࿰నࣃğॡĂଠڒParentBiDiMode ࠎο ParentBiDiMode পّ ! ဦ17.4 TListBoxనјbdRightToLeftReadingOnly! ёᄃଡજคౌ̙ົԼតĄ! bdRightToLeftReadingOnly ֹϡϤΠ҃ν۞ዦ᝝ึԔֽ૟͛фᆷ΍Ă၆ᆅ͞ bdRightToLeftReadingOnly ! ဦ17.3 TListBoxనјbdRightToLeft NoAlign ົԼតĂҭଡજคົொҌΩ˘ᙝĄ! bdRightToLeftNoAlign ֹϡϤΠ҃ν۞ዦ᝝ึԔֽ૟͛фᆷ΍Ă၆ᆅ͞ё̙ bdRightToLeftNoAlign ᄃ඀ёనࢍ͘Ίܝ17-8 ˢ ԔĄึפၮᇾ่ࠎι۞᝝טቁၮᇾĂࢨ BiDiModeϡֽᆷ΍͛ф۞ϒ̝ีטDrawTextBiDiModeFlagsReadingOnly а็ଠ ቁၮᇾĄ BiDiModeϡֽᆷ΍͛ф۞ϒ̝ีטDrawTextBiDiModeFlags а็ଠ ็TrueĄ аܮν઎۞ଡજคॡĂٺϡҜֹีטଠڍUserRightToLeftScrollBar т а็TrueĄΞͽҋࢎજүΐͽԼᆷĄ ܮϡϤΠҌν۞၆ᆅ͞ёॡĂֹีטଠڍUseRightToLeftAlignment т ็TrueĄ аܮϡϤΠҌν۞ዦ᝝ึԔĂֹีטଠڍUseRightToLeftReading т ϤνҌΠ۞ሀё݋а็FalseĄٺ఍ี טϤΠҌν۞Ᏼี݋а็TrueĂࡶଠפIsRightToLeft ࡶᏴ ൒Ăཉ̚၆ᆅ۞͞ёܲ޺̙តĄ నؠĂ่૟ШνያᆅԼјШΠያᆅĂ̝ͅϺ ChangeBiDiModeAlignment ՀԼ็ගι۞၆ᆅણᇴĄ̙ᑭߤBiDiMode۞ ёבϡֽᑭߤ၆ᆅ͞ё۞Β྅ีטDBUseRightToLeftAlignment ྤफ़ऱଠ ၆ᆅ͞ёߏӎΞͽԼតĄ۞ ีט੓ֹϡĄᑭߤ࠻࠻ଠ˘ีטOkToChangeFieldAlignment ׶ྤफ़ऱଠ ځᄲ ڱ͞ ڱܑ17.1 VCL͚̚೯BiDi۞͞ Ą!ܑ˭ٺࢗ ĂЕڱдฟ൴ᗕШֹّϡ۰ٙϡ۞ᑕϡ඀ёॡĂᔘѣధк׎΁ໂࠎѣϡ۞͞ ڱ׎΁͞ ߇Ą̝ีטटጡଠܧ֭ีט఺ߏЯࠎଠ ϡ Flip Children|Selected ׻΄Ă̙֭ົซҖЇңજүĄֹ֭ีטበᏭଠפො Ᏼ ҜཉĄ!۞ีטFlip Children ֽአೱଠ פᔣĂତ඾ଂ̰͛ѣᙯ۞Αਕܑ̚Ᏼ ĂГ޷˭໣ဂΠีטॾ˯۞ଠܑפؠĄଋ˵Ξͽ౅࿅Ᏼ҃ีטଠ۞פજٙᏴ Ă่่ٕΪߏຐՀีטң۰݋ბෛଋߏӎࢋՀજٙѣ۞ଠפٕ SelectedĄᏴ All פEdit|Flip ChildrenĂ֭Ᏼ פҜཉĂኛଋᏴ۞ีטࡶࢋдనࢍॡአೱଠ ϲ઼ᅫ̼ᑕϡ඀ё 17-9ޙ д෪ԛ͛фᄬ֏֭̚՟ѣညߏᒺᆷ఺ᇹ̄۞ܑϯ͞ёĄ фҚĄኛᔖҺֹϡᒺᆷ⎯Яࠎ۞ܜгពϯྵٽф۞ֹϡ۰̬ࢬ̮৵Ăਕૉᅅ ၗЕ׶׎΁ពϯ͛ېфҚត̂ॡਕѣ֖ૉ۞۩มĄ˵ឰ၆ྖ͞๴ĂΑਕܑĂ ൺֱĄٙͽдనࢍֹϡ۰̬ࢬ̚Ăϡͽពϯ͛ф۞̮৵ॡĂ౵рឰιд͛ф ٙѣ΍னдֹϡ۰̬ࢬ۞͛ф࠰ืΐᖙᛌĄࡻ͛۞͛фೀͼົͧ׎ᛌֽ͛଀ ͛ф ߏ࠹༊ࢦࢋ۞˘ІְଐĄܮѩᙷ۞ᖼೱĂ ϲΞֻঔγξಞֹϡ۞ᑕϡ඀ёॡĂ૟ֹϡ۰̬ࢬనࢍјਕૉЯᑕޙ༊ଋࢋ నࢍֹϡ۰̬ࢬ Ҿ۞ྤੈĄ!઼ٺેҖᒖဩ̚ᙯ ଀ᑕϡ඀ёٙפٙ̚щ྅̝޷ᔣ၆ߍ͞ё۞ྤੈĄଋΞͽֹϡ఺ֱྤੈֽĂ ϡ۰ր௚ֹٺБાّ Screen តᇴĞд VCL ᄃ CLX ̚࠰ѣ೩ֻğ˵೩ֻ˞ᙯ ֹϡ̝ IME ۞ྤੈĄ IMEĄѩγĂБાّ۞ Screen តᇴ೩ֻ˞ֹϡ۰ր௚̚Ξֻ טᙷҾѣਕ˧ଠ ĂឰଋҋҖؠཌྷ۞ڱ͞ ᔣᏮˢ۞ᖼೱ͞ёĄTWinControl Βӣ˘ֱ protected ᑕྍֹϡ۞ IMEĄιࣇТॡ˵೩ֻ˘࣎ ImeMode পّĂϡֽ޽ؠ IME ၆޷ ଀൏ᕇॡٙפีטĂౌጾѣ˘࣎ ImeName পّĂਕឰଋ޽ؠдଠีט඄ݭଠ ၆ IME ซҖ඀ёనࢍĄ̂ొЊۡତϡֽ఍ந͛фᏮˢ۞ෛีטଋΞͽ౅࿅ଠ በᏭጡĄڱᏮˢטਕ଀дᑕϡ඀ё̚ଠ ᏭጡĞIMEğߏϡֽ૟ֹϡ۰ٙᏮˢ۞޷ᔣᖼೱјࠎф̮фҚ۞Ă҃ଋಶΞ በڱଋΞࠎপؠ۞઼Ҿΐˢᗝγ۞ΑਕĄপҾߏдֲ߷ᄬր۞ᒖဩ̚ĂᏮˢ ׶઼Ҿѣᙯ۞Αਕ Ą̚ ีטϲ۞ଠޙ̏זAddBiDiModeExStyle ԯዋ༊۞ExStyleၮᇾΐ ځᄲ ڱ͞ ᄃ඀ёనࢍ͘Ίܝ17-10 ˢ ົෛࠎಏ˘ф̮ĄּтĂдҘ঱Ͱ͛̚Ăch ఺ᇹ۞௡ЪĂ׎ึԔಶтТ˘࣎ ۞઼Ҿົѣ̙ТଵԔ͞ёĄѩγĂдߙ઼ֱछĂ׌࣎ф̮۞௡ЪĂдଵԔ˯ фҚ۞ଵԔึԔ˵ົЯ઼҃ளĄధкለ߷ᄬ֏ӣѣ˘ֱડҾ௑ཱིĂֹ଀̙Т ྤ໚૱ᇴĂтѩ˘ֽ̖ਕึӀгซҖώ˿̼Ą! Әјކଋࢋ޽ؠҋؠॾё۞фҚĂኛଋቁؠଋ̏ԯιࣇڍ҃ซҖώ˿̼Ąт дᑕϡ඀ёֹٙ̚ϡ̝͟ഇăॡมăᇴф׶ఱ။۞ॾёĂᑕྍ଀޷ϫᇾ઼Ҿ ॾё׶ଵЕึԔ ᇹ۞ᗞҒд̙Т۞̼͛̚Ă˵ົ׍ѣ̙Т۞ຍஉĄ ௑ཱི˵̙ዋ༊ĄࠤҌĂТି؟˞Ј۞઼छֹ̚ϡĂ֤ᆃϡܫχზдѣ඾̙Т ଋ۞ᑕϡ඀ёڍቐд̙Т۞઼छ۞ሀᇹΞਕಶ̙̂࠹ТĄтܫᇆညĄּтĂ ϲဦԛᇆညॡᔘѣ׎΁۞҂ณĄኛᔖҺֹϡ׶পؠ̼͛ѣᙯ۞ޙੵѩ̝γĂ ІĂົ౼࿅ۡତԯ͛ф༊јᇆည۞˘ొЊĄۏ ࡦഀ۞ᇾចځଋҺ̙˞଀дᇆည̰̚ӣ͛фĂ֤ᆃдᇆည˯ֹϡ׍ѣ౅ڍт ಶߏᄲĂଋ۞ဦԛᇆည̚౵р̙ࢋΒӣ͛фĂЯࠎѣ˞͛фಶѣᅮࢋᖙᛌĄ ព൒гĂ఺˵ޝߏĂ̙ᅮࢋᖙᛌЇңٙϡ۞ᇆညĄڶې၆ଋ҃֏Ă౵நຐ۞ ဦԛᇆည ෹࿅50 10% 31-50 20% 17-30 40% 13-20 60% 6-12 80% 1-5 100% ф̮ᇴ) ࿰ഇ۞ᆧΐͧத)ޘܜࡻ͛фҚ۞ ޘܜܑ17.2 Ҥࢍ۞фҚ Ą!ޘܜͽֹଋࡗரг˞ྋĂᑕྍтңఢထଋࡻ͛фҚٙࢋᕖण۞ ෟή΍ன۞ͧதՀ̂Ąܑ 17.3 ݋ߏ˘࣎௖ர۞ҤࢍĂ۞ܜдᖙᛌॡĂൺфҚͧ ϲ઼ᅫ̼ᑕϡ඀ё 17-11ޙ யϠ˘࣎Ϊѣޢ९ֹϡ۞ RC ᑫٙயϠ۞фҚܑăresourcestring фҚĂ౵ ϲ˘࣎ΒӣфҚܑ۞ RC ᑫĂ૞ޙϡд̏ฟୁăᐼхăበᛌ࿅۞૞९Ąιົ ϲ඀ё۞ྤ໚ DLLĄResource DLL ჟី଀ޙኛֹϡ Resource DLL ჟីֽ ώ۞඀ёĄ!ۍᛌ͛ ่ӣֻ඀ёֹϡ۞ྤ໚Ąྤ໚ DLLĂឰଋΪᅮೱଫྤ໚ DLL ӈΞ͚೯к჌ ϲĄٙᏜ۞ྤ໚ DLLĂΒӣ˞඀ёٙ̚ϡ۞ٙѣྤ໚Ăҭ̙ӣ඀ёቅĂޙ۞ ߏྤ໚ DLLܮྤ໚۞̶ᗓĂᖎ̼˞ᖙᛌજүĄ҃˭˘࣎ล߱۞ྤ໚̶ᗓજүĂ ϲྤ໚ DLLޙ !ྤ໚фҚะ̚дಏ˘ă፾ϲ۞ಏ̮̝̚Ą Ăኛણዦ Delphi ඀ёᄬ֏͘ΊĄ౵рߏਕԯٙѣ۞ځ໚фҚ૱ᇴ۞ซ˘Վᄲ ྤٺӘј૱ᇴĂᖣͽ૟ιࣇ̶ᗓ΍ֽĄᙯކresourcestring ᙯᔣфֽ૟ιࣇ ॾᑫ̚ĄଋΞͽ౅࿅ֹϡܑٺ۞фҚĂрͧ᏾ᄱੈिĄфҚྤ໚̙֭ົӣ߁ ព۞ֹϡ۰̬ࢬ̮৵γĂଋ˵଀̶ᗓ΍ٙѣົӔனдֹϡ۰ࢬ݈ځੵ˞఺ֱ ϲ.dfm ᑫĞд CLX ᑕϡ඀ё̚ࠎ.xfm ᑫğĄޙᕇੱဦ۞ྤ໚ ̚۞фҚ̶ᗓҌಏ˘۞ሀ௡̚ĄDelphi ົҋજࠎΒӣΑਕܑă၆ྖ͞๴ă׶ ۞͛фĄࡶԓ୕඀ёдᖙᛌॡĂ̙ᅮα఍Հજ඀ёቅĂଋ౵р૟ֹϡ۰̬ࢬ ϡ۰̬ࢬֹ̚ٺߏᖙᛌ΍னܮдࠎᑕϡ඀ёซҖώ˿̼ॡĂ౵ព඾۞̍үĂ ̶ᗓྤ໚ ଥशĂЯࠎೀͼдٙѣ۞ᔣሹౌѣ఺ֱ޷ᔣĄ ĄኛጐΞਕ۞ֹϡᇴфᔣᄃΑਕᔣઇࠎזгдٙѣ઼छ۞ᔣሹ˯Աٽౌਕᅅ ٙѣ US ᔣሹ̚Ξֹϡ۞ф̮Ăܧд޽ؠ޷ᔣ௡Ъ۞ଥशॡᑕྍࢋ͕̈Ą֭ ޷ᔣ၆ߍ Т׌̶࣎ฟ۞ф̮˘ᇹĂּтᇇ͛̚۞ eszettĄ д c ᄃ d ̝ม۞ಏ˘ф̮˘ᇹĄ҃ѣॡ࣏Ăಏ˘ф̮дଵԔ˯Ăݒజෛࠎт ᄃ඀ёనࢍ͘Ίܝ17-12 ˢ begin LCID: Integer; var function LocalesCallback(Name: PChar): Bool; stdcall; Ψ }ײ{ ੫၆Տ͚࣎೯۞઼Ҿ end; SetLength(Result, BufSize – 1); GetLocaleInfo(ID, Flag, PChar(Result), BufSize); SetLength(Result, BufSize); BufSize := GetLocaleInfo(ID, Flag, nil, 0); begin BufSize: Integer; var function GetLocaleData(ID: LCID; Flag: DWORD): string; {$R *.DFM} implementation Form1: TForm1; var end; { Public declarations } public { Private declarations } private procedure Button1Click(Sender: TObject); LocaleList: TListBox; Button1: TButton; TForm1 = class(TForm) type StdCtrls; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, uses interface unit locales; ଀ٙࢋ̝ᖙᛌ۞઼ҾቅĈפࠎଋ఍நĄӎ݋Ăଋಶ଀ֹϡ˭Е඀ёቅֽ ϡ Resource DLL ჟី۞ྖĂιົҋજֹڍфܑ̮ϯдྍ઼Ҿ̚۞઼छĄт DLL ᑕྍֹϡ׶ϫᇾ઼Ҿѣᙯ۞ઘᑫЩĄ݈׌࣎фܑ̮ϯϫᇾᄬ֏Ăௐˬ࣎ ϲ࠹၆ᑕ۞ྤ໚ DLLĄՏ࣎ྤ໚ޙώĂౌۍଋᑕྍࠎٙࢋ͚೯۞Տ˘࣎ᛌ͛ DLL ૞९Ą҃ RES ᑫ݋ߏଂາ۞ RC ᑫበᛌֽ۞Ą ϲ̝ RES ᑫ̝ྤ໚۞૞९Ă఺࣎૞९ߏ࣎ΪΒӣྤ໚۞ޙ࠹ᙯܑॾĂͽ̈́ٙ ϲ઼ᅫ̼ᑕϡ඀ё 17-13ޙ ր௚۞઼ҾĄ ώ̙҃υՀԼۍDLLĄనؠ఺࣎൳ᐂีϫΞͽឰଋീྏᑕϡ඀ё۞̙Т઼Ҿ જॡĂᑕϡ඀ёдྏ඾ವԱր௚઼Ҿ̝݈ĂົАವԱ׍ѣ఺࣎ઘᑫЩ۞ྤ໚ ΐˢଋᑕϡ඀ё۞ྮश׶ᑫ९ЩჍĂ֭ԯ፟ࣃనࠎྤ໚ DLL ۞ઘᑫЩĄдୁ ĂͽфҚࣃ˭غHKEY_CURRENT_USER\Software\Borland\Locales ᔣࣃ д Windows Registry ̚ᖬᆷ˘ඊ઼Ҿ۞੃ᐂĄд ଋԓ୕ᑕϡ඀ёֹϡ௑Ъώгր௚઼Ҿ̝γ۞̙Тྤ໚ሀ௡Ă֤ଋΞͽڍт ϡ඀ёಶົֹϡበᛌдΞેҖᑫăDLL ٕइІ̚۞ྤ໚Ą ՟ѣ௑Ъᄬ֏۞ྤ໚ሀ௡Ă֤ᑕڍྏ඾ವԱΪ௑Ъᄬ֏۞ྤ໚ሀ௡Ąтົܮ ՟ѣ׶׎ᄬ֏׶઼Ҿ࠹௑Ъ۞ྤ໚ሀ௡Ă֤ᆃᑕϡ඀ёڍइІ̚۞ྤ໚Ąт ॡĂᑕϡ඀ёಶົֹϡдྍྤ໚ሀ௡̚۞ྤ໚Ăֽആ΃дΞેҖᑫăDLL ׶ ໚ሀ௡۞ઘᑫЩᄃր௚઼Ҿ۞ᄬ֏׶઼छ΃ቅ࠹௑ЪྤڍDLL ۞ઘᑫЩĄт ᑭߤ఺ֱົܮֹϡ̝ EXEăDLL ٕ BPL ׍ѣ࠹ТЩჍ۞ྤ໚ DLL ॡĂι Їңᄃ׎ٙזԱڍдଋ۞ᑕϡ඀ёୁજॡĂιົАᑭߤώгր௚۞઼ҾĄт ̼ྤ໚ DLL ׶ᑕϡ඀ё˘੓΍ఱಶΞͽ˞Ą! ώĂΪᅮࢋԯ׶ EXEăDLL ٕ BPL ׍ѣ࠹ТЩჍ۞ώ˿ۍആೱࠎώг̼۞ ᑕϡ඀ё۞ેҖᑫĂDLL ׶इІӣѣٙѣυࢋ۞ྤ໚Ą൒҃Ăࢋԯ఺ֱྤ໚ ֹϡྤ໚ DLL end; end; end; ListBox1.Items.Add(Name[I]); begin for I := 0 to Count - 1 do begin with Languages do begin I: Integer; var procedure TForm1.Button1Click(Sender: TObject); end; Result := Bool(1); Form1.LocaleList.Items.Add(GetLocaleData(LCID, LOCALE_SLANGUAGE)); LCID := StrToInt('$' + Copy(Name, 5, 4)); ᄃ඀ёనࢍ͘Ίܝ17-14 ˢ ጡඈğඈજүĄ!ڇࢋ۞ྤ໚Ğညߏ൳ᐂྤफ़ऱҨ ଀ᑕϡ඀ёٙᅮפЊĄԆБ̙ϡՀາ൳ᐂనؠăࢦາୁજᑕϡ඀ёăٕࢦາ Ăᑕϡ඀ё׶׎ֹٙϡ۞ܑॾ࠰ࠎϫ݈ٙϡ۞֤˘ٺֹϡ఺࣎ԫμ۞ᐹᕇд ReinitializeForms; if LoadNewResourceModule(FRENCH) <> 0 then FRENCH = (SUBLANG_FRENCH shl 10) or LANG_FRENCH; const ᄬĈڱਕ૟ֹϡ۰̬ࢬ۞ᄬ֏̷ೱࠎܮ඀ёቅ۞˭غּтĂ ReinitializeFormsĄ ΨײГޢˢາᄬ֏۞ LCID Ă൒็ޢLoadNewResourceModule Ă൒ Ψײଋ۞ uses ࢗή̚Ąࡶຐ̷ೱֹٙϡ۞ᄬ֏ĂଋᑕྍАזΐ ଋ۞ᑕϡ඀ёĂଋΞ૟ ReInit ఺࣎඀ёಏ̮זྤ໚ DLLĄࡶࢋԯ఺࣎Αਕΐ ੵ˞дᑕϡ඀ёୁજॡವԱྤ໚ DLL ̝γĂଋ˵ΞͽдેҖഇมજၗг̷ೱ જၗг̷ೱྤ໚ DLL ௚઼Ҿ۞ಏ˘ᑕϡ඀ёĄ! ౅࿅೩ֻዋ༊۞ྤ໚ DLLĂಶΞͽд΍ఱॡĂ೩ֻਕૉҋજЯᑕٙેҖ̝ր LoadStr(FindResourceHInstance(HInstance), IDS_AmountDueName, szQuery, SizeOf(szQuery)); ֹٙϡ̝ྤ໚ሀ௡۞఍ந޽ᇾĄּтĈ ଀ϫ݈פёĂֽב ኛдଋ۞ᑕϡ඀ё̚ĂֹϡБાّ FindResourceHInstance end; end; Reg.Free; finally Reg.WriteString(LocalOverride, FileName); if Reg.OpenKey('Software\Borland\Locales', True) then try Reg := TRegistry.Create; begin Reg: TRegistry; var procedure SetLocalOverrides(FileName: string, LocalOverride: string); ઼̝Ҿ۞൳ᐂ፟ࣃĄ! тĂ˭Е඀ԔΞͽдщ྅ٕనؠ඀ё̚Ăనؠдྶˢᑕϡ඀ёॡٙࢋֹࢋּ ϲ઼ᅫ̼ᑕϡ඀ё 17-15ޙ ! ! !ͽֹϡ String Table በᏭጡĄ ଋΞͽχฟ RC ᑫ֭ᖙᛌ࠹ᙯ۞фҚĄኛд Project Manager ̚ฟୁ RC ᑫĂ ࿅ᕭଫ̙ຐࢋ۞প̶ّᙷĄ Іᑭෛጡ̚޷˭໣ဂΠᔣĂТॡֹϡ View Ᏼಏֽۏ۞পّćࠎѩĂኛଋд ІᑭෛጡĞObject InspectorğĂֹι่ពϯΞώг̼ۏϚ˭᏾ᄱĂଋΞͽనؠ ેҖഇม᏾ᄱ۞পّࣃĄٙͽଋΪࢋ࣒Լᑕྍࢋᖙᛌ۞পّӈΞĄࠎ˞ᔖҺ ੓͔ົזො дྤ໚ DLL ૞९̚Ăଋ̙ਕΐˢٕӁੵ̮ІĄ൒҃ĂଋΞਕົՀԼ Ξͽд IDE ̚ฟୁܑॾĂ֭ᖼೱ࠹ᙯ۞পّĂĄ! ܮ̚۞.dfm ٕ CLX ᑕϡ඀ё̚۞.xfmğᄃྤ໚ᑫ۞ྤ໚ DLLĄତ˭ֽĂଋ ߏĂٙѣ۞ྤ໚̏జ̶ᗓјӣѣܑॾᑫ९Ğд VCL ᑕϡ඀ёڶ౵நຐ۞ଐ ၆ྤ໚ซҖώ˿̼ ώĄ!ۍ̼˿ϲ׎Чҋ۞ώ ޙΞͽ੫၆ٙ୬̶൴۞̙Тᄬ֏ξಞĂܮĂଋޢ༊ᑕϡ඀ёԆј઼ᅫ̼જү ώ˿̼ᑕϡ඀ё ёĂ఺ᇹົЯࠎώ˿̼۞જү҃யϠໂ̂۞मளĄ ၗ۞඀ېၗົనؠࠎ׎ୁજېనࣃ̙֭ົజࢦనĄᔖҺᇤᆷ֤჌઄నܑॾ Ă࿰ޢො дેҖॡഇĂЇң၆ܑॾপّٙઇ۞Հજౌົ᏷εĄдາ۞ DLL ྶˢ ۞পّĄ! дଋ̷ೱྤ໚ DLL ॡĂдາ DLL ٙ̚޽ؠ۞পّົᖬᆷଫેҖܑ̚ॾ၁ּ ! 17-16 ˢܝᄃ඀ёనࢍ͘Ί ̶൴ᑕϡ඀ё 18-1 ҂ଋ͘̚ Kylix ͛І̚׶̶൴࠹ᙯ۞ྤੈĄ Ą࣐ࡶଋຐࢋᇤᆷྭπέᑕϡ඀ёֹ֭׎ਕ̶൴Ҍ Linux πέ˯Ăଋ଀ણآ Windows πέ˯̶൴ᑕϡ඀ё۞჌჌ְ ٺො дͽ˭Ч༼̚۞̰टĂ͹ࢋଣ੅ y ٙᅮ۞హវ଱ᝋ y ̙Т͹፟ᒖဩ˭۞඀ёనࢍ y ̶൴ Web ᑕϡ඀ё y ̶൴ྤफ़ऱᑕϡ඀ё y ̶൴ CLX ᑕϡ඀ё y ̶൴˘ਠᑕϡ඀ё ఺ֱϡ̶ֽ൴ᑕϡ඀ё۞ՎូĈ˞ځᄲܮ༼ౢ۞˭غᙷݭ҃ؠĄ পؠ۞ՎូĄٙᅮ۞Վូ݋ֶ඀ёّኳ̝̙Т҃ٙѣ̙ТĂბෛᑕϡ඀ё۞ ߙֱפ඀ё̶൴Ҍ׎΁۞࿪ཝ̝˯ĂТॡᑕϡ඀ёԆБгྻүྻၰĂଋ଀ଳ ᑕϡ඀ё۞જүĄ఺˵ಶߏᄲĂଋΞͽԯι೩ֻග׎΁ˠֹϡĄࡶຐԯᑕϡ ΞͽซҖ̶൴(deploy)ܮ˘όԆј Delphi ᑕϡ඀ёĂ҃ͷΞͽΐͽેҖॡĂଋ ൴ᑕϡ඀ё̶ ᄃ඀ёనࢍ͘Ίܝ18-2 ˢ ёĂົેҖధкщ྅ Delphi ᑕϡ඀ёॡࣧώಶᅮࢋ۞̍үĂΒ߁Ĉ૟ΞેҖ ΞԆјЇચĄགྷϤщ྅నؠ̍׍ٙயϠ۞щ྅඀ܮᅮࢋᇤᆷЇң඀ёቅ̙ ˭ڶщ྅నؠ̍׍Ăਕૉ૟யϠщ྅඀ё۞࿅඀ΐͽҋજ̼Ăд̂ొЊ۞ଐ ё̖ҖĄ щ྅඀۞ܝಶ଀ซҖՀ̂ఢሀ۞щ྅඀Ԕ˞ĄٙͽĂ఺ֱᑕϡ඀ё଀ֶያ૞ ྍ࿪ཝ˯ΝӈΞĄ̙࿅ĂྵኑᗔăϤк࣎ᑫ९ٙ௡ј۞ᑕϡ඀ёĂזᑫኑᄦ ϫᇾ࿪ཝ˯۞ĄΪᅮࢋ૟ેҖזщ྅ٽटޝಏ৷ăΪӣેҖᑫ۞ᑕϡ඀ёߏ ֹϡщ྅඀ё ķ˘༼Ąีט45 ౢ۞Ķдშࢱ˯̶൴ ActiveX ଠ ൴ ActiveX Control ኛણ҂ௐ̶ٺ҂д18-13ࢱĶ̶൴ Web ᑕϡ඀ёķĂ҃ᙯ ੈኛણ҂д18-8ࢱ۞Ķ̶൴ྤफ़ऱᑕϡ඀ёķĂѣᙯщ྅ Web ᑕϡ඀ёኛણ फ़ऱᄃд Web ᑕϡ඀ё݋ᅮࢋᗝγ۞щ྅ՎូĄѣᙯщ྅ྤफ़ऱ۞ྤྤפх y DLL ۞Ҝཉ y ೩ֻ೯ӄ۞ᑕϡ඀ё y Ա΍ᑕϡ඀ёٙᅮ۞ᑫ९ y ֹϡщ྅඀ё ࢋВ఼ᕇĈ щ྅඀ёĄ˭ࢗӈࠎٙѣᙷݭ۞ᑕϡ඀ёĂд̶൴ॡೀͼυืΐͽ҂ณ۞͹ ఺˘჌ᙷݭ۞ٺᛳܮ ࿅щ྅඀ё҃ҋજгԆјĄּт InstallShield Express ࿪ཝ̝̚Ăͽ̈́ซҖЇңυࢋ̝൳ᐂనؠ۞࿅඀ĂౌΞͽ౅זᅮ۞ᑫ९ኑᄦ ᖎಏ۞඀ё௡ၗనؠඈඈĄ૟ᑕϡ඀ёٙזᓝ˲޽ؠ͚ٙ೯̝ᑫ९۞ҜཉĂ Windows ۞൳ᐂĞregistryğ̚ĂΞਕ˵଀ӣѣᑕϡ඀ё࠹ᙯ۞჌჌ีϫĂ इІᑫăͽ̈́ԷႊᅃӄّΑਕ۞ᑕϡ඀ёĞhelper applicationğĄѩγĂ ੵ˞ΞેҖᑫγĂᑕϡ඀ёΞਕᅮࢋధк೩ֻЧ჌೯ӄ۞ᑫ९Ăညߏ DLLă ൴˘ਠᑕϡ඀ё̶ ̶൴ᑕϡ඀ё 18-3 ඀ё͚ٙ೯ăϡͽԷႊᅃӄΑਕ۞ᑕϡ඀ё ğٕ۰ߏЇң׎΁ଋ۞ᑕϡྖ۞זѣϡڍᑫ .hlpă.cntTă׶.tocĞтځᄲ इІᑫ .bpl׶.dcp ඀ёᑫ .exe׶.dll ᙷݭ ᑫ९۞ઘᑫЩ ܑ18.1 ᑕϡ඀ёᑫ९ ˭Еݭၗ۞ᑫ९Ξਕ଀׶ᑕϡ඀ё˘੓̶൴Ą ᑕϡ඀ёᑫ९ ีטy ActiveX ଠ ሀ௡Ğmerge modulesğ׀y Ъ y इІᑫ y ᑕϡ඀ёᑫ९ ੵ˞ΞેҖᑫͽγĂᔘѣధкᅮࢋ׶ᑕϡ඀ё˘੓̶൴۞ᑫ९Ą Ա΍ᑕϡ඀ёᑫ९ ̍׍யݡĄ MSI ԫఙăТॡ఼࿅ Borland Database Engine ̶൴ᄮᙋ۞ ٺྍ่ਕֹϡૄ ˵ѣ׎΁Ξϡ۞щ྅నؠ̍׍Ą̙࿅Ăд̶൴ BDE ྤफ़ऱᑕϡ඀ёॡĂଋᑕ Ąځ଀ՀкྎႽ۞ᄲפĂͽੈྤځቢ˯ᄲ InstallShield Express ֽயϠщ྅඀ёĂଋΞͽણ҂ InstallShield Express ۞ тңֹϡٺDelphi CD ˯۞щ྅඀ёֽщ྅ InstallShield ExpressĄᙯ ଋຐ౅࿅ιֽயϠщ྅඀ё۞ྖĂಶ଀ҋ̎͘જซҖщ྅ĄኛଋેҖڍ Ă̙֭ົҋજгщ྅ InstallShield ExpressĄٙͽĂтޢд Delphi щ྅Ԇல Windows InstallerĞMSIğԫఙ۞யݡĄ ٺϡĄιߏ˘इૄ ̏གྷ࿅ᄮᙋĂਕૉϒ૱гᄃ Delphi ̈́ Borland Database Engine ˘੓ລ੨ֹ щ྅నؠ̍׍ߏ InstallShield ExpressĄInstallShield Express۞ܢ̰ Delphi ᑕϡ඀ёщ྅ Borland Database EngineĞBorland ྤफ़ऱ͔ᑜğĄ ͹፟˯ăనؠ Windows ൳ᐂีăТॡࠎ BDE ྤफ़ऱזᑫᄃ࠹ᙯ͚೯ᑫኑᄦ ᄃ඀ёనࢍ͘Ίܝ18-4 ˢ ٕ׎΁к࣎इІ̝ม۞࠹ֶᙯܼĂщ྅̍׍ົҋજг૟׎ΐˢăٕ۰ߏ೩ֻ ྍइІᄃΩ˘࣎इІăٺܼĄтѩ˘ֽĂ༊ߙ࣎इІజΐҌщ྅૞९ॡĂ၆ ࠹ֶᙯ۞ޘેҖॡഇ۞඀ёऱົЯࠎ΁ࣇ࠹̢ј௡۞͞ёĂ҃хдߙ჌඀ ֽซҖેҖॡഇइІ۞̶൴Ą MSI ԫఙ۞щ྅నؠ̍׍ĞΒ߁ InstallShield Express д̰ğĂ ٺሀ௡Ăͽૄ ׀ྤ໚ă൳ᐂีăͽ̈́ᑕϡ඀ё۞щ྅నؠఢ݋ග൴ਖ਼΍ΝĄଋΞͽֹϡЪ Ăֹ଀ଋΞͽ౅࿅ಏ˘۞ኑЪᑫĂ૟Вֳ඀ёቅăᑫ९ăڱ௡ٙ೩ֻ۞ᇾ໤͞ ሀ׀ሀ௡ĞMerge modulesğ۞ࣧЯĄЪ׀఺˵ಶߏࠎ̦ᆃ Delphi ଀ΒӣЪ Windows InstallerĞMISğԫఙ۞யݡĄ ٺInstallShield Express 3.0 ߏีૄ ሀ௡׀Ъ ଋࢋ૟इІ̶൴ග׎΁۞ฟ൴ˠࣶĂኛଋ૟.bpl ׶.dcp ᑫ೩ֻග΁ࣇĄ!ڍт vcl70.bplĄ ܧ൴ CLX ᑕϡ඀ё۞इІॡĂଋ଀ӣˢ clx70.bplĂ̶҃ٺ ො ९଀̶൴΍ΝĄ! ׶ᑕϡ඀ё࠹Т۞ϫᐂ̚Ą่ѣ.bpl ᑫזᛉଋԯιщ྅ޙᄦ۞इІĂԧࣇ݋ ଋҋٺТ˘Њᑫ९Ă̙࡭ౄј۩ม۞঎෱Ą၆פкЊ̙Т۞ᑕϡ඀ёΞͽх ҜཉĂֹ҃଀۞ٸWindows\System ϫᐂ̝˭ĄѩϫᐂΞͽઇࠎ˘࣎ВТх ٺᛉଋ౵р૟ Borland ٙ೩ֻ۞ેҖॡഇइІĂщ྅ޙ Borland ĄځྎႽ۞ᄲ ՀפExpress д̰ğĂֽซҖેҖॡഇइІ۞̶൴Ąኛણ҂˭˘༼۞̰टͽᒔ MSI ԫఙ۞щ྅నؠ̍׍ĞΒ߁ InstallShield ٺሀ௡Ăͽૄ׀ଋ˵ΞͽֹϡЪ ߏ˘ᇹ۞ĄιົซҖᑫ९۞ኑᄦĂ֭д Windows ۞൳ᐂ̚ซҖυࢋ۞൳ᐂĄ ̶൴ĄInstallShield Express ఍நइІᑫ९۞щ྅͞ёಶ׶఍ந DLL ۞͞ё Җഇม۞इІĂ֤ᆃ఺ֱइІᑫಶ଀׶ᑕϡ඀ё˘੓ેזᑕϡ඀ёજϡڍт इІᑫ ώ፟ྤफ़ܑᑫ९ .dbfă.mdxă.dbtă.ndxă.dbă.pxă.y*ă.x*ă.mbă.vală.qbeă.gd* ActiveXᑫ .ocxĞѣॡֹϡDLLֽ͚೯ğ ᙷݭ ᑫ९۞ઘᑫЩ ̶൴ᑕϡ඀ё 18-5 DBCompatVCL vcldbx70.bpl DatabaseVCLăBaseVCLăBaseRTL BaseVCL DataSnapEntera dsnapent70.bpl DataSnapăDatabaseRTLăBaseRTLă DatabaseRTLăBaseRTLăBaseVCL DataSnapCorba dsnapcrba70.bpl DataSnapConnectionăDataSnapă DataSnapConnection dsnapcon70.bpl DataSnapăDatabaseRTLăBaseRTL DataSnap dsnap70.bpl DatabaseRTLăBaseRTL DatabaseVCL vcldb70.bpl BaseVCLăDatabaseRTLăBaseRTL DatabaseRTL dbrtl70.bpl BaseRTL BDERTL bdertl70.bpl DatabaseRTLăBaseRTL BDERTL BDEInternet inetdbbde70.bpl InternetăDatabaseRTLăBaseRTLă BDERTL BaseRTLăDataSnapădbExpressă BDEClientDataSet bdecds70.bpl BaseClientDataSetăDataBaseRTLă BaseVCL vcl70.bplăvclx70.bpl BaseRTL BaseRTL rtl70.bpl ՟ѣЇң۞࠹ֶᙯܼ dbExpress BaseClientDataSet cds70.bpl DatabaseRTLăBaseRTLăDataSnapă ADO adortl70.bpl DatabaseRTLăBaseRTL ሀ௡ ᅮӣˢ۞BPLs ࠹ֶᙯܼ׀Ъ ሀ௡ᄃ׎࠹ֶᙯܼ׀ܑ18.2 Ъ ϲεୀ۞ੈिĄޙ۞࠹ֶᙯܼĂٕ۰ߏ༊ٙᅮ۞ሀ௡̙д૞९̚ॡĂ൴΍ ᖎಏгаಡхдޝٙᅮ۞ሀ௡ॡĂҋજг૟ιࣇΐˢĄ׎΁۞̍׍˵ధΪົ זWindows Installer ۞ InstallShieldĂਕдԱ ٺܼ˵ధົѣ̙Т۞ͅᑕĄૄ ఺ֱ࠹ֶᙯٺĄ̙Т۞щ྅̍׍၆ܑ̝̚˭ٺሀ௡۞࠹ֶᙯܼ̏Е׀Տ࣎Ъ ۞࠹ֶᙯܼĂٕ۰ߏаಡĄ ྅̍׍ᑕྍ˵ົҋજг૟ΐˢιᄃ VCLDatabase ׶ StandardVCL ሀ௡̝ม ሀ௡ΐҌщ྅૞९̚Ă֤ᆃщ׀аಡĄᓝּֽᄲĂ࣐ࡶଋ૟ VCLInternet Ъ ᄃ඀ёనࢍ͘Ίܝ18-6 ˢ DatabaseRTLăBaseRTL DataSnapConnectionăDataSnapă WebDataSnap Webdsnap70.bpl XMLRTLăInternetă VisualDBCLX visualdbclx70.bpl BaseRTLăDatabaseRTLăVisualCLX VisualCLX visualclx70.bpl BaseRTL VCLIE vclie70.bpl BaseVCLăBaseRTL VCLActionBands vclactnband70.bpl BaseVCLăBaseRTL BaseVCLăBaseRTL teeqr70.bplăteeui70.bpl TeeChart tee70.bplăteedb70.bplă DataSnapăInternet SOAPRTL Soaprtl70.bpl BaseRTLăXMLRTLăDatabaseRTLă SampleVCL vclsmp70.bpl BaseVCLăBaseRTL DatabaseRTL QuickReport qrpt70.bpl BaseVCLăBaseRTLăBDERTLă DatabaseRTăBaseRTL dcloffice2k70.bpl DatabaseVCLăBaseVCLă nts Office2000Compone InternetDirect indy70.bpl BaseVCLăBaseRTL Internet inet70.bplăinetdb70.bpl DatabaseRTLăBaseRTL BaseVCL BaseRTLăDataSnapădbExpressă InterbaseVCL vclib70.bpl BaseClientDataSetăDatabaseRTLă BDERTL DatabaseVCLăDatabaseRTLă DecisionCube dss70.bpl TeeChartăBaseVCLăBaseRTLă dbExpressăDatabaseVCLăBaseVCL DBXInternet inetdbxpress70.bpl InternetăDatabaseRTLăBaseRTLă BaseRTLăDataSnapădbExpress dbxcds70.bpl BaseClientDataSetăDataBaseRTLă Set dbExpressClientData dbExpress dbexpress70.bpl DatabaseRTLăBaseRTL ሀ௡ ᅮӣˢ۞BPLs ࠹ֶᙯܼ׀Ъ ̶൴ᑕϡ඀ё 18-7 Ąآّ඀ё۞˘ּ࣎̄Ăιਕგந InterBase ྤफ़ऱăֹϡ۰׶щБ࠹ᙯְ ߏᅃӄܮ Borlandă׎΁ᇄથٙ೩ֻĄInterBase ۞̍׍඀ё Server Manager үĄᅃӄّᑕϡ඀ёΞਕߏүຽր௚ăٕ۰ϤྻڱΞਕົొЊгٕԆБг൑ ӄĂଋ۞ᑕϡ඀ёםᅃӄّ඀ёĞHelperğߏ፾ϲ۞඀ёĂ՟ѣ఺჌඀ё۞ ᅃӄّ඀ё DLL ˵଀׶ᑕϡ඀ё˘੓̶൴Ą! ۞ีט͚೯ ActiveX ଠ ёğĄ ώౌົѣѩ̍׍඀ۍ ٙѣ۞ Windows 9xܧ׍඀ё REGSERV32.EXEĞҭ֭ ֹϡ Demos\ActiveX ˭۞ϯቑ඀ё TRegSvrĂٕ۰ߏֹϡ Microsoft ۞̍ Run|ActiveX ServerĂ פIDE ̚Ᏼ ٺĂኛଋีטଋຐҋҖොΊ ActiveX ଠ ኜт InstallShield Express ̝ᙷ۞щ྅඀ёĂົҋજгซҖොΊ۞඀ԔĄࡶ Ă଀АොΊд୬ซҖ̶൴۞࿪ཝ˯Ą݈̝ีטдֹϡଋٙҋᄦ۞ ActiveX ଠ Bits Per Second Ltd. ٺᝋᛳۍy Graph Custom ControlĂ Visual Components, Inc. ٺᝋᛳۍy First ImpressionĞVtChartğĂ Visual Components, Inc. ٺᝋᛳۍy Formula One(ྏზܑ)Ă Visual Components, Inc. ٺᝋᛳۍĂีטy VisualSpeller ଠ SoftwareFX Inc. ٺᝋᛳۍy Chart FXĂ ᑫ९Ă˵଀׶ᑕϡ඀ё˘੓̶൴̖ҖĄ఺ֱ̮ІΒ߁˞ ົాඕҌᑕϡ඀ё۞ΞેҖᑫĞٕ۰ߏેҖഇมइІğĂҭ೩ֻග̮І۞.OCX ྅ቅĞwrapperğދĄ̮І۞ีטActiveX ଠ ٺІߏᛳ̮۞ܢߙֱ Delphi ٙ ีטActiveX ଠ XMLRTL xmlrtl70.bpl InternetăDatabaseRTLăBaseRTL DatabaseRTLăBaseRTLăBaseVCL DataSnapConnectionăDataSnapă WebDataSnapăXMLRTLăInternetă vcljpg70.bpl WebSnap websnap70.bplă ሀ௡ ᅮӣˢ۞BPLs ࠹ֶᙯܼ׀Ъ ᄃ඀ёనࢍ͘Ίܝ18-8 ˢ дрೀొ࿪ཝ̝̚Ą!ٸЯࠎၹјᑕϡ඀ё۞ᑫ९఼૱ߏ ਕૉឰᑕϡ඀ёֹϡĄкᆸྤफ़ऱᑕϡ඀ёĂдщ྅ॡࠤҌᅮࢋՀк۞఍நĂ рĂ̖ޙ఺ֱᑫ९ݒ̙ਕాඕҌᑕϡ඀ё۞ΞેҖᑫ̚Ąྤफ़ᑫ९˵ࢋ࿰А ఼૱ߏϤ࣎Ҿ۞ྤफ़ऱ͔ᑜֽΐͽ఍நĂ҃פপҾ۞щ྅҂ณĄྤफ़ऱ۞х ϫᇾ࿪ཝ̝γĂ଀кઇధкזफ़ऱ۞ᑕϡ඀ёĂੵ˞ԯΞેҖᑫኑᄦྤפх ̶൴ྤफ़ऱᑕϡ඀ё Ȉ̶ྎႽ۞ྋᄲĄ CLX ᑕϡ඀ё۞ᇤᆷĂѣ ٺኛણ҂ௐ 15 ౢĶฟ൴ྭπέᑕϡ඀ёķĂ׎̚၆ clx70.bpl ̙҃ߏ vcl70.bplĄ ˯ܢІॡĂଋ଀ ёऱගӣˢĄ҃༊ଋͽ CLX ᑕϡ඀ё̶൴इבਕ૟ CLX ેҖॡഇ̝ٙᅮ۞ Ă̖˯ܢᑕϡ඀ё̶൴Ҍ Windows πέĂଋ଀૟ qtintf.dll ᄃᑕϡ඀ё˘Т ᑕϡ඀ё۞ՎូĂಶ׶̶൴˘ਠᑕϡ඀ё۞Վូ՟ѣ̦ᆃ׌ᇹĄ༊ଋ૟ CLX ॡĂଋಶ଀̶Ҿд׌࣎πέ˯၆ྍᑕϡ඀ёซҖበᛌᄃ̶൴જүĄ̶൴ CLX Ұٙᇤᆷ۞ྭπέᑕϡ඀ёĂ૟ົТॡజ̶൴Ҍ Windows ᄃ Linux ˯ڍт ̶൴ CLX ᑕϡ඀ё Вϡ.DLL ᑫ۞૞ᛳϫᐂĂ֤ಶՀр˞Ąٸϲ˘࣎ϡֽхޙ۞щ྅͞ёĂ Windows ٕ Windows\System ϫᐂ˭Ąࡶਕϼ໰ Borland Database Engine ఺ᙷ̳ϡ DLL ۞ҜཉĂߏдٸг͞Ąдၚּ˯Ăϡֽх۞פϡ඀ёౌਕૉх ఺ֱᑕזDLLĂ݋ᑕྍщ྅ ۞זТ۞ϫᐂ̚Ąֱ֤҃ົజк࣎ᑕϡ඀ёٙϡ ᄃᑕϡ඀ё࠹זజಏ˘ᑕϡ඀ёֹٙϡ۞.DLLĂΞͽԯιࣇщ྅ֱ่֤ٺ၆ DLL ۞Ҝཉ ѩᙷপؠ۞ྤੈĂኛણ҂ᅃӄّ඀ё۞͛ІĄ!ٺؠĄᙯ םࢦາ̶൴۞଱ᝋٺࢨצਕ׶ᑕϡ඀ё˘੓̶൴Ą̶൴ᅃӄّ඀ёΞਕົ ᑕϡ඀ёυืֶᏥᅃӄّ඀ё̖ਕྻүĂኛቁؠଋႽ˞౵̂۞Ӆ˧ឰιڍт ̶൴ᑕϡ඀ё 18-9 ਕ˧Ąኛߤྙଋٙϡྤफ़ऱ͔ᑜ۞͛۞פͽ೩ֻ Delphi ᑕϡ඀ёྤफ़ऱх ੵ˞ѩ఍ٙࢗ۞ԫఙ̝γĂଋ˵Ξͽֹϡ׎΁ᇄથٙ೩ֻ۞ྤफ़ऱ͔ᑜĂᖣ Embedded Installation GuideĄ ଀Հྎ௟۞ྤੈĂኛଋણ҂ Borland შ৭˯۞פ΁۞ᜭજ඀ёĄࡶຐ ՎូĂInterBase Express ̮Іਕૉۡତгᄃྤफ़ऱ࠹໛఼Ă̙υࣅያЇң׎ ϫᐂ̝̚ĄͦᅮЇң׎΁̶൴۞۞פΞхٺᄃ interbase.msg ଀జԁචгཉ ᑕϡ඀ёӈ૟ેҖ۞ր௚̝˯Ąֹϡ InterBase ॡĂgd32.dllٺ͗ბ̏གྷщ྅ д̶൴ֹϡ InterBase Express ۞ྤफ़ऱᑕϡ඀ёॡĂଋ଀ቁᄮ InterBase ϡ ĂͦᅮЇң׎΁̶൴۞ՎូĄޢ̝˯Ą̝ ϡ͗ბ፟ጡٺጡ۞ᜭજ඀ёĂ̏གྷึӀгщ྅ڇᄮĂϡͽాତҌྍྤफ़ऱҨ జҋજгщ྅ĄଋТॡ˵଀ቁົܮ ώॡĂMDACۍώ 5 ٕՀາ۞ۍ Explorer ώ۞ MDACĄдщ྅ Windows 2000 ٕ Internetۍώ 2.1 ٕՀາۍщ྅ д̶൴ֹϡ ADO ۞ྤफ़ऱᑕϡ඀ёॡĂଋ଀ቁᄮӈ૟ેҖ۞ր௚˯۞ቁѣ ѣυࢋ۞ DLLsğĂଋ଀૟ Midas.dll ӣˢĄ ҖᑫॡĂਕૉઇᐖၗ۞ᙥඕğć࣐ࡶଋχზΒ྅ଋ۞ᑕϡ඀ёĞΞેҖᑫᄃٙ ᑕϡ඀ёĂଋౌυืӣˢ libmidas.dcu ᄃ crtl.dcuĞ༊೩ֻ࣎ҾેҖ۞Ξે ϡ͗ბྤफ़ะĞּт TClientDataSetğăٕྤफ़ะ೩ֻ۰۞ྤफ़ऱזϡֹٺ၆ y ̶൴кลᆸྤफ़ऱᑕϡ඀ёĞDataSnapğ y ̶൴ BDE ᑕϡ඀ё y ̶൴ dbExpress ྤफ़ऱᑕϡ඀ё ᜈ۞ᇴ༼̚ΐͽ̬௜Ĉޢٺ૟ тң̶൴ dbExpressăBDEăᄃкลᆸྤफ़ऱᑕϡ඀ё۞ЧีপؠྤੈĂٺᙯ ̮Іਕૉۡତгᄃྤफ़ऱ࠹໛఼Ą ̖ਕૉᄃྤफ़ऱ۞ϡ͗ბహវ࠹ତᅺĄInterBase ݋̙ᅮᜭજ඀ёĂЯࠎ IBX ྤफ़ऱᑕϡ඀ё۞ր௚˯ĄBDEăADOăᄃ dbExpress ࠤҌᔘᅮࢋᜭજ඀ёĂ ӈ૟ેҖ Efmqijٺߏ֤˘჌Ăଋౌ଀ቁؠྤफ़ऱϡ͗ბహវ̏གྷϒቁщ྅ InterBase ExpressğĂٙͽд̶൴જү˯˵ЧѣٙमளĄ̙ኢଋֹٙϡ۞տౣ Яࠎ Delphi ͚೯˞к჌̙Т۞ྤफ़ऱԫఙĞADOăBDEădbExpressăͽ̈́ ᄃ඀ёనࢍ͘Ίܝ18-10 ˢ DLL ᄃ׎ӣ߁۞ॡ፟Ĉ ᜭજ඀ёͽ̈́ DataSnap DLL ׶ଋ۞ΞેҖᑫ˘Т̶൴Ą˭ܑЕ΍ዋЪ۞ ፾ϲેҖ۞ΞેҖᑫĂ֤ᆃଋΞͽ૟࠹ᙯ۞ dbExpressܧ࣐ࡶଋ̶ٙ൴۞֭ Ą(ܑ̚˭ٺેҖᑫĄଋ଀Тॡ̶൴ΞેҖᑫᄃᜭજ඀ё۞ DLL(Е ࣎Ҿг̶൴Ξڱϡ Informix ٕ MSSQL ۞ྤफ़ऱᑕϡ඀ё҃֏Ăଋ൑ֹٺො ၆ MidasLib ֹϡ˘ֱညߏTSQLClientDataSet̝ᙷϡ͗ბྤफ़ะ۞ΞેҖᑫ ctrl ֹϡdbExpress۞ΞેҖᑫ dbExpMYSQL ᑕϡ඀ё୬ాତҌMySQLྤफ़ऱॡ dbExpMYS ᑕϡ඀ё୬ాତҌMySQLྤफ़ऱॡ dbExpDB2 ᑕϡ඀ё୬ాତҌDB2ྤफ़ऱॡ dbExpORA ᑕϡ඀ё୬ాତҌOracleྤफ़ऱॡ dbExpINT ᑕϡ඀ё୬ాତҌInterBaseྤफ़ऱॡ ྤफ़ऱಏ̮ ӣ߁۞ॡ፟ ܑ18.3 ૟dbExpressᑕϡ඀ё̶൴јࠎ፾ϲેҖ۞ΞેҖᑫ ૟ lib ϫᐂ˭۞఺ֱ DCUs ගӣ߁ซֽӈΞĈ dbExpress ۞ϫ۞Ğobjectğᑫυืͽᐖၗ۞͞ёᙥඕҌଋ۞ΞેҖᑫĄΪࢋ ࡶຐ૟ dbExpress ᑕϡ඀ёͽ፾ϲેҖ̝ΞેҖᑫ۞ԛёֽΐͽ̶൴ॡĂ ߁࠹ᙯ dbExpress ᜭજ඀ё DLL ۞ΞેҖᑫĄ ଋΞͽᏴፄ૟ dbExpress ᑕϡ඀ё̶൴јࠎ፾ϲેҖ۞ΞેҖᑫĂٕ۰ߏӣ Linux ̝˯Ą ٺ˧ĄdbExpress ̮І೩ֻྭπέ۞ฟ൴ĂЯιࣇТॡਕૉүϡ ਕ۞פdbExpress ߏ˘௡ྤफ़ऱᜭજ඀ёĂϡͽ೩ֻ၆ SQL ྤफ़ऱԣిх ̶൴ dbExpress ྤफ़ऱᑕϡ඀ё ඈ჌჌ྤੈĄ ࢦາ೸Ҷ۞ᝋӀăщ྅ăᄃనؠٺ଀ᙯפІĂٕ۰ߏШྍᇄથซҖᏙྙĂͽ ̶൴ᑕϡ඀ё 18-11 ͛ІĄ Ăኛଋણዦ BDEDEPLOYטࢦາ೸Ҷ BDE ۞পؠᝋӀ׶ࢨٺफ़ऱĄᙯྤפ ଋΞͽֹϡ Borland Database EngineĞBDEğĂֽឰᇾ໤ Delphi ྤफ़̮Іх Borland Database Engine y SQL Links y Borland Database Engine ৵۞щ྅Ĉ!̮פफ़ऱх ᑕϡ඀ё̝ྤځBDE ٕߏ׎΁ֻᑕથ۞ٙ೩ֻ۞ྤफ़ऱ͔ᑜĄ˭Е۞ౢ༼ᄲ ߏϤ̙Т۞ྤफ़ऱ͔ᑜٙ೩ֻ۞Ąᑕϡ඀ёΞͽֹϡפᑕϡ඀ё۞ྤफ़ऱх ι൑Ⴗߏ౵ָ۞ᏴፄĄ ೩ֻிк౵ѣᑒӄ۞̍׍඀ёĄ༊఍ந Paradox ٕ dBase ܑॾ̚۞ྤफ़ॡĂ ΑਕĂТॡ۞ھĂBDE ͚೯˞̰ट౵ࠎᇃ̚ט፟פऱր௚Ąдிк۞ྤफ़х APIĂϡͽତᅺҌྤफ़ ۞ھBorland Database EngineĞBDEğؠཌྷ˞˘௡ᇃ ̶൴ BDE ᑕϡ඀ё फ़ะķĄ Ăኛણዦௐ 28 ౢĂĶֹϡಏ˘͞Шྤځϡ dbExpress ̮І۞ซ˘Վᄲֹٺᙯ Midas.dll ᑕϡ඀ёֹϡ˞ϡ͗ბྤफ़ะॡ dbexpmysql.dll ᑕϡ඀ё୬ాତҌMySQL 3.23.xྤफ़ऱॡ dbexpmys.dll ᑕϡ඀ё୬ాତҌMySQL 3.22ྤफ़ऱॡ dbexpmss.dll ᑕϡ඀ё୬ాତҌMySQLྤफ़ऱॡ dbexpdb2.dll ᑕϡ඀ё୬ాତҌDB2ྤफ़ऱॡ dbexpora.dll ᑕϡ඀ё୬ాତҌOracleྤफ़ऱॡ dbexpint.dll ᑕϡ඀ё୬ాତҌInterBaseྤफ़ऱॡ dbexpint.dll ᑕϡ඀ё୬ాତҌInformixྤफ़ऱॡ ྤफ़ऱಏ̮ ӣ߁۞ॡ፟ ૟dbExpressᑕϡ඀ёᄃᜭજ඀ё۞DLLs˘Т̶൴ 18.4ܑ ᄃ඀ёనࢍ͘Ίܝ18-12 ˢ тң೸ҶඈྤੈĂ˵ኛଋણ҂ REMOTE ͛ІĄ ࣹᙷ DataSnap ᑫ९ਕૉజ೸ҶĂͽ̈́ٺĞΞϡ Delphi ۞͹ϫᐂ˭ವ଀ğĄᙯ Ăኛଋણዦ DEPLOY ͛Іטࢦາ೸Ҷᑕϡ඀ёٙᅮᑫ९۞჌჌ᝋӀ׶ࢨٺ Ğٕ׎΁఼࿅រᙋ۞щ྅඀ёğֽ˘Тщ྅ DataSnap ᄃкลᆸᑕϡ඀ёĄᙯ Delphi ᑕϡ඀ё఍நкลᆸྤफ़ऱ۞ਕ˧Ąኛଋֹϡ InstallShield Express ጡ̚۞೩ֻ۰ĂDataSnap ኬ̟ڇ౅࿅ឰϡ͗ბᑕϡ඀ёాତඕᑕϡ඀ёҨ ̶൴кลᆸྤफ़ऱᑕϡ඀ёĞDataSnapğ ϡ඀ёֹٙϡ۞ BDE ր௚ᑫ९Ăҭݒົజ׎΁඀ёֹϡ۞ᑫ९Ą ຍĂଋ଀ܲ঻ֱ֤̙ߏϤ̶ٙ൴̝ᑕڦેҖщ྅ొЊ BDE ۞ਕ˧ĄኛଋপҾ ׍ѣܮొЊᑫ९ӈΞĄည InstallShield Express ѩᙷ఼࿅រᙋ۞щ྅඀ёĂ Paradox ྤफ़ܑٙᅮ۞ BDE פϡ˞ Paradox ྤफ़ܑĂ֤ᆃಶΪࢋщ྅ϡͽх ᑕϡ඀ёֹ่ڍଋΞͽΪщ྅ᑕϡ඀ё၁ᅫٙᅮ۞ BDE ᑫ९ĄᓝּֽᄲĂт ӁੵιࣇĂߏІໂࠎኑᗔ۞̍үĄ ঐщ྅ॡΐͽפWindows ̚Ąຐࢋдщ྅ॡ૟൳ᐂีనؠϒቁĂТॡд Ҝ̮۞ 16 ٺINI ᑫĄINI ᑫ่ϡ.ܧWindows ۞൳ᐂ̝҃̚ ٺٸх ώ˯ĂBDE ۞௡ၗྤੈߏۍ۞ޢy д 32 Ҝ̮۞ Windows 95/ NTăٕ̝ થ۞඀ёĄ ఺ֱ඀ё̙ΪΒ߁ Borland ۞யݡĂ˵Β߁˞ధкֹϡ BDE ̝׎΁ֻᑕ ϡ BDEĄֹڱy ̙༊щ྅ BDE ٕ׎ొЊ۞ᑫ९ĂΞਕົౄј׎΁۞඀ё൑ ۞ĂЯࠎĈ ࢦࢋޝٙѣҾЩĄֹϡរᙋ࿅۞щ྅඀ё̶ֽ൴ BDE ᑫ׶׎ొЊ۞ᑫ९ߏ ϲυࢋ۞൳ᐂีϫĂТॡؠཌྷ඀ёٙᅮ۞ޙInstallShield Express ົҋજг ଋᑕྍֹϡ InstallShield ExpressĞٕ׎΁រᙋ࿅۞щ྅඀ёğֽщ྅ BDEĄ ̶൴ᑕϡ඀ё 18-13 ᑫůhttpd.conf(఼૱ົдщ྅ϫᐂ۞\conf ϫᐂ྆)̚۞޽΄Ą дฟ൴ Apache ۞ DLL ॡĂଋ଀ቁᄮߏӎ̏ԁචгనؠд Apache ௡ၗనؠ ౅࿅ conf ϫᐂ˭۞ᑫ९ĂΞͽనؠ Apache ۞჌჌௡ၗĄ ώĄۍ۞ޢ̝ д DLL ᄃ CGI ᑕϡ඀ё˯ĂWebBroker ͚೯ Apache ۞ 1.3.9 ጡ˯۞̶൴જүڇApache Ҩ ąځ͛̚۞ᄲ Web ᑕϡ඀ё۞̶൴Ăኛଋણ҂18-8ࢱ̚۞Ķ̶൴ྤफ़ऱᑕϡ඀ёķ˘ ٺᙯ CODEBASE ણᇴֽΐͽ޽ؠĄ ҜཉĂυื౅࿅఺࣎ HTML ᇾច۞۞ีטy ActiveX ଠ फ़ऱٕ׎΁ᑫ९Ąྤפy ᑕϡ඀ё̙ਕֹϡᆷѪ۞ྮशֽх ׶ેҖ۞ᝋࢨĄפy ӣѣᑕϡ඀ё۞ϫᐂυืጾѣ᝝ ᑫ९Ą ٙѣυࢋ۞ྤफ़ऱפy υืԁචгనؠϫᐂ۞щБّĂֹᑕϡ඀ё଀ͽх ጡ˯ĄڇWeb Ҩ ٺᐌ඾ᑕϡ඀ёᑫ९˘੓జщ྅ົܮpath ̝̚Ă ٺӣ path ̝̚ĄΪࢋ ٺy ၆ dbExpress ᑕϡ඀ёĂ׎ dbExpress DLLs ᅮజӣ ጡ˯Ąڇऱ͔ᑜğυื׶ᑕϡ඀ёᑫ९˘੓щ྅д Web Ҩ y ၆ BDE ྤफ़ऱᑕϡ඀ёֽᄲĂBorland Database EngineĞٕ׎΁۞ྤफ़ д̶൴ Web ᑕϡ඀ёॡĂᔘᅮপҾ҂ᇋͽ˭ᇴᕇĈ! ጡ̝˯Ąڇშ৭ҨٺᇹĄ઱˘۞मҾߏĂWeb ᑕϡ඀ё۞ᑫ९υื̶൴ ਠᑕϡ඀ё۞Վូ՟ѣ̦ᆃ׌˘ٺщ྅ Web ᑕϡ඀ё۞ՎូĂಶ׶ֱ֤इϡ ბᕖ· DLLĞISAPI ᄃ ApacheğăCGI ᑕϡ඀ёăͽ̈́ ActiveForm ඈĄڇҨ World Wide Web ˯ેҖ۞Ąрֱ֤ͧ ٺѣֱ Delphi ᑕϡ඀ёĂߏజనࢍ ൴ Web ᑕϡ඀ё̶ ᄃ඀ёనࢍ͘Ίܝ18-14 ˢ ᑫ९Ą Їңפଂ ScriptAlias ϫᐂ̚᝝ڱ଀ଋ۞ CGI ᑕϡ඀ё൑ֹົڱֹϡ఺࣎͞ ߏֹϡ ScriptAlias ޽΄(ֹ̙҃ϡ Options ExecCGI)ĂҭߏܮĂڱො Ω˘࣎͞ ੨ Options ExecCGIĂ֭ͷฟୁ SetHandlerĄ ᝋࢨ̏ԁචгనؠрĂଋ଀ֹϡ Alias ޽΄ລפ̖ਕૉజેҖĄኛଋቁؠх ͽ޽ؠğυืనؠ ExecCGI ᏴีĂͽฟୁ඀ё۞ેҖĄтѩ˘ֽĂCGI ඀ё дฟ൴ CGI ᑕϡ඀ёॡĂ၁ᅫϫᐂĞͽ http.conf ᑫ̚۞ Directory ޽΄ΐ CGI ᑕϡ඀ё ᇴᑕనࠎБાតᇴ ContentType ۞ࣃĄ ጡᑕϡ඀ёĄSetHandler ۞͔ڇSetHandler ޽΄ົ޽ؠ఍நኛՐ۞ Web Ҩ ਖ਼Ҍѩ Apache ሀ௡Ą ఺ົֹ଀ٙѣ၆ http://www.somedomain.com/project1 ۞ ኛ ՐĂౌ ົ జ ็ SetHandler project1-handler # Sample location specification for a project named project1. ཉ)ĄּтĈ ЇңҜ۞ޢ 2 ΐˢྤ໚ؠҜጡีϫ(ΞͽΐҌ httpd.conf ̚ LoadModule apache_module name 'MyApache_module'; exports ሀ௡ЩჍĂΞͽдଋ۞૞९ྤ໚̚ຩವ export ҖĄּтĈ ຐۢ྽׎ڍ૟ MyApache_module ആೱјଋ DLL ̚၆γ̳ฟ۞ሀ௡ЩჍĄт LoadModule MyApache_module modules/Project1.dll ּֽᄲĈ ă֭ͷྶˢଋ۞ DLLĄᓝז1 ΐˢ LoadModule ีϫͽֹ Apache ਕૉԱ ࡶࢋֹሀ௡੓үϡĂଋ଀၆ httpd.conf ซҖ׌ี࣒ԼĈ Apache ր௚۞ Modules ̄ϫᐂ̚Ą ٺଋٙயϠ۞ DLL ᑕྍజཉ ሀ௡੓үϡֹ ̶൴ᑕϡ඀ё 18-15 ᑕϡ඀ёĈזᇆᜩົܮؠĄд̶൴Ҍ׎΁࿪ཝॡ۞࿅඀̚Ă˭ࢗ۞Я৵ ϡ۰ઐр׶௡ၗనֹזүຽր௚ᒖဩ۞ώኳमளĂхдధкЯ৵ົᇆᜩٺϤ ̙Т͹፟ᒖဩ˭۞඀ёనࢍ ࠹ᙯ۞௡ၗనؠྤੈĄז̚Ա Apache ̚࠰ѣӣ߁Ąଋ˵Ξͽд Apache ۞შ৭ http://www.apache.org Apache ۞ LICENSE ᑫ̚ವ଀ĂдՏЊ ٺ൴ Apache హវ۞ྤੈĂΞ̶ٺᙯ ٙᅮ۞჌჌ྤ໚Ą ᑕϡ඀ёפϤ User ޽΄ٙ޽ؠĄኛቁᄮྍֹϡ۰ጾѣዋ༊۞ᝋࢨĂਕૉх ߏд httpd.conf ᑫ̚Ăܮጡ˯۞޽ؠ૳ཱི̚ેҖĄ҃ѩ૳ཱིڇො Apache ົдҨ cgi)۞ᑫ९Ăߏ࣎ CGI ඀ёĄ CGI ඀ёĄAddHandler ̄ήਕឰ Apache ۢ྽׍౯ֱ֤ઘᑫЩ(ּт exeă дѩּ̚ĂOptions జనࠎ ExecCGIĂᖣͽ̯ధր௚ેҖ MyWeb ϫᐂ˭۞ AddHandler cgi-script exe cgi Allow from all Order allow,deny Options ExecCGI AllowOverride None ΄ĄDirectory ޽΄۞నؠ݋ͽ˭ࠎּĈ ගؠЩჍ̝ϫᐂĂᄃ׎˭̄ϫᐂ۞޽ٺDirectory ޽΄జϡֽ߁ҝ˘௡इϡ ጡдߙপؠϫᐂ˭۞ֱࣹΑਕĄڇտౣࢋฟୁҨטExecCGIĄOptions ޽΄ଠ ଋ˵Ξͽֹϡ httpd.conf ̚۞ Directory ޽΄Ă૟ Options నࠎ All ٕ c:\httpd\docs\MyWeb\ mycgi.exe ఺࣎඀ёĄ ז఺ᆃઇᑕ༊ਕ૟/MyWeb/mycgi.exe ఺ᇹ̄۞ኛՐĂ౵௣ેҖ Alias/MyWeb/"c:/httpd/docs/MyWeb/" ˘࣎෍ᑢ۞ϫᐂĂТॡ૟ϫᇾϫᐂᇾϯࠎӣѣ CGI ඀ё۞ϫᐂĈ ጡ˯யϠڇࢗ۞ httpd.conf Җಶߏּ࣎̄Ăιົֹϡ Alias ޽΄дଋ۞Ҩ˭ ᄃ඀ёనࢍ͘Ίܝ18-16 ˢ ෹΍Ꮘ၌۞ᙝࠧĄ!ົܮᔘࢋҲ۞࿪ཝ˯ેҖॡĂޘژฟ൴࿪ཝྋͧז̶൴ నࢍᑕϡ඀ё۞̮৵Ą̙൒۞ྖĂ༊ᑕϡ඀ё۞ܑॾֽޘژᆃಶͽ౵Ҳ۞ྋ ĂдેҖॡ̙֭ົજၗгአፋĂ֤ีט௡јᑕϡ඀ё۞ܑॾ׶ෛᛇ̼ଠڍт ॡ۞҂ณ̈̂ีט̙જၗአፋܑॾ׶ଠ Ąีטѣଠ дܑॾ˯۞ٙפཉĂܑॾΞਕᅮࢋ೩ֻଡજ۞ΑਕĂрឰֹϡ۰ਕૉх Ҝ۞ีטഇΪજၗгአፋᑕϡ඀ё۞ܑॾĄॲፂдܑॾ˯Чෛᛇ̼ଠ నࢍ඀ёĂ֭ͷдેҖॡֽޘژy дฟ൴࿪ཝ˯ĂᐌຍгֹϡЧ჌Ꮘ၌ྋ ࠹ྵ҃֏ğĄޘژ࠹Т۞ּͧĞᄃᏈ၌ྋ І۞̂̈Ăឰιдֹϡ۰࿪ཝ˯ѣ඾׶ฟ൴۰࿪ཝ˯ۏၗгአፋܑॾ׶ నࢍ඀ёĂ֭ͷдેҖॡഇજֽޘژy дฟ൴࿪ཝ˯ĂᐌຍгֹϡЧ჌ྋ Ꮘ၌˯࠻੓ֽົൾ̈˘ֱĄ۞ޘژІдՀ੼ྋۏ̈Ąෛᛇ˯Ă ֹϡЇңপঅ۞જүĂ૟඀ёត଀׶͹࿪ཝٙពϯ۞Ꮘ၌ј࠹Тͧத̂ Ğ఼૱ߏ 640x480ğֽనࢍᑕϡ඀ёĄ̙ࢋޘژy ͽֹϡ۰ົֹϡ۞౵Ҳྋ ˭Е͞ёֽ఍நĈ І׶фݭ̂̈ğΞͽ౅࿅ۏᑕϡ඀ёγ៍Ğෛ඄ă̝ޘژд࿪ཝ˯၆̙Тྋ ࿪ཝ˯Ă̂кᇴౌ̙ົ˘ᇹĄ ٙщ྅۞ർវ҃ѣ̙ٙТĄѩᙷ۞পّд୬̶൴۞࿪ཝ˯Ăᄃฟ൴ॡٙϡ۞ д࿪ཝ̚ॸࢬ۞̂̈ᄃ׎Ξͽֹϡ̝ᗞҒ۞ᇴϫĂߏΞనؠ۞ĂТॡົֶፂ ׶ᗞҒᇴϫޘژᏈ၌ྋ y DLL ۞Ҝཉ y ᅃӄّᑕϡ඀ё ώۍy үຽր௚۞ y фݭ ׶ᗞҒᇴϫޘژy Ꮘ၌ྋ ̶൴ᑕϡ඀ё 18-17 дనࢍॡфݭڍॡĂфݭಶົត̈Ąт̈̂۞ีט޷ͧதአፋෛᛇ̼ଠ ϡ۰࿪ཝ˯ેҖĂ֤ᆃֹ۞ޘژᑕϡ඀ёߏనࢍࢋд̶൴дՀҲྋڍy т தአፋ׎ҜཉĄ ޷Ꮘ၌۞ͧีטϤ૟ Top ׶ Left পّࣃࢷ˯࠹Т۞ͧதĂ҃૟ෛᛇ̼ଠ தĄᖣͧޘژHeight ׶ Width পّ۞ࣃࢷ˯Ꮘ၌ྋ ̝ีטፋĄෛᛇ̼ଠ Ă֭నؠ׎̂̈׶ҜཉֽҋҖአีטͽӀϡਫ਼઻ֽણ҂Տ˘࣎ෛᛇ̼ଠ Ξ˵ีטğֽҋજአፋ̝γĂдܑॾ˯۞ଠڱ͞ TWidgetControl.ScaleBy Ğдྭπέᑕϡ඀ё̚ኛֹϡڱ͞ y ੵ˞ֹϡ TWinControl.ScaleBy தĂᖣͽአፋ׎̂̈Ąͧޘژ૟ Height ׶ Width পّ۞னࣃࢷ˯Ꮘ၌ྋ Ăٙͽኛ͘જгޘᄃᆵޘԼតܑॾ۞੼ົ̙֭ڱ͞ ׶ҜཉĄScaleBÿ̂ ۞ีטğĂֹ׎ҋજአፋܑॾ˯̝ෛᛇ̼ଠڱ͞ TWidgetControl.ScaleBy Ğдྭπέᑕϡ඀ё̚ኛֹϡڱ͞ Ψ TWinControl.ScaleByײTrueĂ֭ தֽઇ۞ĄΞ૟ CustomForm.Scaled পّనؠࠎͧޘژཝม۞Ꮘ၌ྋ Ąᑕአፋ۞̂̈Ăߏॲፂฟ൴ϡ࿪ཝᄃֹϡ۰࿪ีטğ۞ෛᛇଠีטଠ y ഴٕ͌ᆧΐܑॾ˯̝̮৵۞̂̈ᄃ׎ҜཉĂᖣͽአፋᑕϡ඀ёĞܑॾ׶ தࣃĄͧ۞˯ ޘژд఺׌࣎࿪ཝдᏈ၌ྋז൴ϡ࿪ཝ̝ࣃੵͽֹϡ۰࿪ཝ̝ࣃĂ҃଀ ଀ֹϡ۰̝࿪ཝ۞̂̈ĄԯฟפTScreen.Height ̈́ TScreen.Width পֽّ ĂಏҜࠎည৵ĄдેҖॡֹϡޘᆵٕޘĈΞͽߏ੼̈̂ޘژᏈ၌ྋ ׎ּͧ҃ࢍზ΍ֽ۞Ąኛֹϡ૱ᇴֽܑϯдฟ൴࿪ཝ˯۞ޘژ࿪ཝ۞ྋ ׶ٙщ྅̝ޘژĂߏͧྵฟ൴࿪ཝ̝ྋּͧ۞ีטy አፋܑॾ׶ෛᛇ̼ଠ γ៍Ąдજၗአፋᑕϡ඀ё̝ෛᛇ̼̮৵ॡĂኛ҂ᇋͽ˭ኜᕇĈ ࠰ਕѣ౵ָ۞˭̝ޘژፋ̂̈۞࿅඀Ăͽቁܲᑕϡ඀ёдٙѣΞਕ۞Ꮘ၌ྋ ߏજၗአፋ۞Ă֤ᆃኛአፋЧ࣎ࢦາአีטᑕϡ඀ё۞ܑॾ׶ෛᛇ̼ଠڍт ҂ณ۞̈̂ีטજၗአፋܑॾ׶ଠ ٙѣ۞ܑॾ̰ट˞Ą!זдॸࢬ˯࠻ڱಶ൑ ࿪ཝ˯ેҖॡĂ۞ޘژనࢍ۞Ă༊඀ё̶൴Ҍ 640x480 Ꮘ၌ྋֽޘည৵۞ᆵ Ăܑ҃ॾߏͽ 700ޘژฟ൴ϡ۞࿪ཝߏనؠࠎ 1024x768 ۞ྋڍᓝּֽᄲĂт ᄃ඀ёనࢍ͘Ίܝ18-18 ˢ ᑕϡ඀ё̚۞͛ф̮ІĂᑕྍֹϡдٙѣ̶൴̝࿪ཝ˯࠰Ξֹϡ۞фݭĄ ΁۞фݭĄ ຍٙѣ۞࿪ཝĂੵ˞ᇾ໤۞фะγĂ̙֍଀ົщ྅׎ڦཝ۞ᑕϡ඀ёॡĂኛ ௡ᇾ໤۞фݭะĄдనࢍ૟̶൴Ҍ׎΁࿪˘˯ܢົ˵ֶ distribution ̙ТĂ ѣ˘௡ᇾ໤۞ TrueType ᄃᕇੱфݭĄLinux д΍ఱॡܢWindows д΍ఱॡ фݭ ׶ᗞҒᇴϫĄޘژ೩ֻ̙Т۞ᇆညĂٕߏӘۢᑕϡ඀ёٙᅮ۞౵̈ྋ ᗞҒᇴϫ۞ᒖဩĂ̈́ޘژ16 Ғ۞ဦԛĄࡶࢋពϯဦԛĂଋΞͽ̶Ҿࠎ̙Тྋ ဦϯՀߏтѩĂ఼૱Ϊᑕֹϡٺߏдဦԛ̚ጐΞਕ۞ֹϡ౵͌ᗞҒᇴϫĄ၆ ಶڱኛ҂ณ̶ٙ൴۞࿪ཝ֭՟ѣ׶ฟ൴࿪ཝ׍౯Тᇹк۞ᗞҒĄ౵щБ۞͞ Яᑕ̙Т۞ᗞҒᇴϫ Ăдෛᛇ˯ົѣ࠹Т۞̂̈Ą˭ޘژ၌ྋ ࣃĄтѩ˘ֽĂ̖ਕቁؠ͞ԛд̙Т۞Ꮘͧ۞ޘژ׶ 20 ࢷ˯̙ТᏈ၌ྋ ᑕϡ඀ёд൪ο˯ͽ 10 ည৵੼׶ 20 ည৵ᆵ۞ࣃֽ൪΍͞ԛĂኛԯ 10ڍ தֽ࣒ϒळᇾࣃĄᓝּֽᄲĂтͧ۞ޘژߏֶፂฟ൴۰׶ֹϡ۰Ꮘ၌ྋ ൪ο˯̝ᙷ۞ଐԛॡĂֹϡ඗၆۞ည৵ळᇾĄ౵рזy ᔖҺдညߏۡତ൪ ĄڍAutoSize পّనј False Ξͽᙯౕѩ˘ड़ ۞ีטԼតĄԯ఺ֱଠ۞̈̂ีטࠎфݭ̂̈۞Լត˵ົౄјଠ த̙Т҃யϠ۞̂̈ԼតγĂЯͧ۞ޘژ൴۞඀ёĄੵ˞ЯࠎᏈ၌ྋ̶ זજၗгአፋ׎̂̈ॡĂົᇆᜩีטົજၗгአፋ׎̂̈Ąдܑॾ׶ଠ фݭ۞̂̈ԼតॡĂีטĂּт TLabel ׶ TEdit дଠีטy ѣֱෛᛇ̼ଠ ዦ᝝Ąڱ ё̚۞͛фົЯѩᑟд˘੓ĂТॡͽᒺ̈۞фݭֽΐͽពϯĂົតј൑ ۞ͧதֽአፋĄࣧАࠎ 8 ۞фݭ̂̈ົᒺ̈ࠎ 5(8 * 0.625 = 5)Ąдᑕϡ඀ ಶົͽ 0.625(640/1024=0.625)̈̂۞ีט۞࿪ཝߏ 680x480Ă֤ෛᛇ̼ଠ ߏ 1024x768Ăֹ҃ϡ۰ޘژฟ൴࿪ཝ۞ྋڍॾ۞࿰నфݭ̂̈ߏ 8Ąт ܑڍĂΞਕត଀ᙱͽዦ᝝ĄּтĂтޢ࿅̈Ă֤ᆃдેҖॡഇአፋфݭ ̶൴ᑕϡ඀ё 18-19 ώĄۍ۞ GetVersionEx ֽҿᕝ Windows ёב NT/2000/XP ۞ેҖ͞ёߏ̙Т۞ĄଋΞֹϡ Windows API ֻ̙Т۞඀ёቅĄѣֱྻზд Windows 95/98 ׶ Windows ώ˯೩ۍߏд̙Т۞үຽր௚ܮĂڱ఍ந֭ᛋӘֹϡ۰ĄᔘѣΩ˘࣎͞ ઃͤܮώĂۍ΍ன̙Ъዋ۞үຽր௚ڍ۞ྻზ̝݈ĂซҖᑭߤӈΞĄт ώ˯ֹϡۍдٙѣڱώĂΪࢋдેҖֱ֤൑ۍy дેҖॡᑭߤүຽր௚۞ ઃͤщ྅࿅඀ٕҌ͌ᛋӘщ྅ˠࣶ఺࣎યᗟĄܮώĂ ۍ΍ன̙Ъዋ۞үຽր௚ڍώĄтۍy дᑕϡ඀ёщ྅ॡᑭߤүຽր௚۞ ώ˯Ąۍ඀ёщ྅д࠹ट۞үຽր௚ ώĄֹϡ۰ᅮࢋ࢑యԯᑕϡۍy ޽ؠᑕϡ඀ёࢋՐ׎ٙࢋેҖ̝үຽր௚ ࡶຐ҂ᇋ఺࣎ΞਕّĂଋѣೀ࣎͞९ΞͽЯᑕĈ ٕડાĄ ёăྻზăבϡߙֱ۞ֹڱώ̙ТĂ൑ۍાॡĂѣΞਕົЯࠎ̙Т۞үຽր௚ үຽր௚۞ડפёăٕ۰ߏҋᑕϡր௚хב дᑕϡ඀ёֹ̚ϡүຽր௚ API ώۍүຽր௚ ᑕϡ඀ё˘Т̶൴Ą ᇾ໤фݭ۞.fot ᑫᄃܧёĈAddFontResource ᄃ DeleteFontResourceĄ૟ྍב ᇾ໤фݭĂኛଋֹϡ Windows ۞ APIܧࡶຐயϠ Windows ᑕϡ඀ёΞϡ۞ ѣ͕ந໤౯Ą!ڍγ៍˯۞តજĄдనࢍॡ౵р၆఺ᇹ۞ઊ൴ඕ ΞਕΞͽࢫҲᑕϡ඀ё۞ෛᛇ̼ڍЯࠎ᏷εфݭ҃൴Ϡ᏾ᄱॡĂٙពϯ۞ඕ фݭֽΐͽആೱĄ༊۞ܕΐͽ఍நĄιົֹϡιٙᄮࠎ׶னѣфݭ౵ࠎତֽ ט࿪ཝ̝˯۞фݭॡĂWindows ׍ѣ˘࣎щБ፟ٺ༊ଋ۞඀ёဘྏֹϡ̙х Ą!ט۞ࢨ ̶ٙ൴۞࿪ཝ˯Ą̶൴׎΁ᇄથ۞фݭĂυืᏲчϤфݭฟ൴ˠࣶٙΐኜז ඀ё˘੓̶൴ĄΞͽᏴፄϤщ྅඀ёٕ۰ߏϤᑕϡ඀ёĂֽ࢑య૟фݭщ྅ ᇾ໤۞фݭॡĂଋ଀૟ྍфݭ׶ᑕϡܧז༊൑ΞᔖҺг଀дᑕϡ඀ё̚Ăϡ ᄃ඀ёనࢍ͘Ίܝ18-20 ˢ ׶ Delphi ᑕϡ඀ё˘੓̶൴۞ྤੈĄٺ଀ᙯפ۞͛ІٕࠀྙֻᑕથĂͽ ᑕથٙ೩ֻ۞யݡĄд̶൴̝݈ኛણ҂ֻᑕથ̝யݡֻٺࢨצາ̶൴ᝋӀߏ ׎΁ֻᑕથ̝̮Іă̍׍඀ёăᅃӄّ඀ёăྤफ़ऱ͔ᑜă׶׎΁யݡ۞ࢦ ׎΁ֻᑕથ۞யݡ͛І ᝋӀ׶ཌྷચĄ!ڱDelphi ۞Ъ ٺؠĂߏ˘Њ̏ЕО΍ֽ۞͛ІĂӣѣᙯםDelphi ۞ No-nonsense ଱ᝋ ؠםNo-nonsense ଱ᝋ ݡ̝ࢦາ̶൴ᝋӀ۞ྤੈĄREADME ߏ࣎щ྅д Delphi ͹ϫᐂ̚۞͛фᑫĄ README ̚ѣ Delphi ۞౵າྤੈĂӣ߁ֱ֤ົᇆᜩ̮Іă̍׍ăٕ׎΁ய README y ቑּᇆည ีטy ActiveX ଠ y Borland Database EngineĞBDEğ y ̮І׶నࢍഇมइІ y .exeă.dllăͽ̈́.bpl ᑫ DEPLOY ߏ࣎щ྅д Delphi ͹ϫᐂ۞͛фᑫĄٙஉᄏ۞͹ᗟѣĈ ൴ăᔘѣ׎΁Ξਕјࠎ Delphi ᑕϡ඀ё˘ొЊٕ൴Ϡᙯా۞யݡᅳાĄ Ч჌̮Іᄃ̍׍۞̶ٺߏᙯ˜آĂ఺ְֱآְ۞˯ޠڱֱ˘DEPLOY Β߁ DEPLOY ՁĈ ࡗ˯ޠڱ۞צĂೡࢗ˞̶൴఺ֱᑫ९ॡĂٙᑕତځ͛Іᄲ۞˭غ̯ధ̶൴Ą Ăѣֱ݋̙טࢨצ׶ Delphi ᑕϡ඀ё˘੓̶൴۞ᑕϡ඀ёĂѣֱд̶൴˯ߏ ٙᅮ۞హវ଱ᝋ
还剩531页未读

继续阅读

下载pdf到电脑,查找使用更方便

pdf的实际排版效果,会与网站的显示效果略有不同!!

需要 10 金币 [ 分享pdf获得金币 ] 0 人已下载

下载pdf

pdf贡献者

yxmjjhd

贡献于2017-01-16

下载需要 10 金币 [金币充值 ]
亲,您也可以通过 分享原创pdf 来获得金币奖励!