1C Delphi Delphi 7ユーザと . - Embarcadero Website

2y ago
17 Views
2 Downloads
2.53 MB
47 Pages
Last View : 29d ago
Last Download : 3m ago
Upload by : Mollie Blount
Transcription

【1C】 Delphiチュートリアル セッション「Delphi 7ユーザと初心者のためのDelphi 2010入門」株式会社シリアルゲームズ 取締役細川 淳

1はじめに

Delphi 7 の紹介 Delphi 7– Borland Delphi 7 Studio– 2002年 09月 26日発売 歴代で最も人気のあった Delphi .NET Framework �– 本格的な .NET Framework 対応は Delphi 8– ラインナップ �。Delphi 7 スケジュールでスムーズに.NETに移 ��ォーム運用など、Delphi 7 び既存のアプリケーション開発 �ーション �ョン事業ゼネラル・マネージャ サイモン・ソンヒ3

Delphi 2010 の紹介 Delphi 2010– 2009年 08月 25日発売 RAD Studio 2010 には Delphi 2010, C Builder 2010, Delphi Prism 2010 が含まれる Windows 7 にいち早く対応 ��ート– ラインナップ Professional Enterprise Architect– i 2010はもうやめられない。 ��らしい!」-FabricioPontes de Araujo, Systems Analyst and Programmer IBS - Info BusinessSolutions4

2IDE

Delphi 7 の IDEMain Window(Menu & Tool Buttons & Component Pallet)Project ManagerコンポーネントObject InspectorEditor講演者の環境6Package

Delphi 2010 の IDE (Galileo)Menu&Tool ButtonsStructureProject ManagerEditorObject phi 2010 起動直後の画面Galileo IDE7Tool Pallet

Delphi 2010 の IDE (Classic Undocked)Main Window(Menu & Tool Buttons & Component Pallet)コンポーネントObject InspectorProject ManagerEditorDelphi 2010 Classic Undocked8

Delphi 2010 Classic Undocked 設定するには – 「表示」 「Classic Undocked」を選択 各ウィンドウが分離– 「ツール」 「オプション」 「ツールデザイナ」 �す デザイナが分離9

Delphi 2010 Classic Undocked のバグZ順序が入れ替わらない!Delphi できたのですが Delphi 7Delphi ��スできませんDelphi 201010

Delphi 2010 Classic Undocked のバグスナップが切れない!Delphi ��れらを利用できました。Delphi 7ランチャ(クリックで出現)Delphi ��です。Delphi に空隙が!11

Delphi 2010 IDE のスゴイところ � Delphi 2005 �たり前の機能 �!– True, False �– �に選択できる!– ��新されています12

Delphi 2010 IDE のスゴイところ MSBuild の使用– Delphi 2007 で採用– �ドを指定できるようになりました。 DOS のコマンドが使えます。 �の位置へコピーしたりできます。 � ビルド構成を任意に作成可能 。13

Delphi 2010 IDE のスゴイところ IDE インサイトがスゴイ!– F6 キーで起動– マウスを使わずに IDE ��と入力このとき IDE の要素全てから T ��「TMe」まで入れると、TMediaPlayer と TMemo が該当TMem まで入れてエンターするとTMemo のインスタンスが!

Delphi 2010 IDE のスゴイところ �ットでコンポーネントの絞り込み– 地味に便利(IDE ットTMe まで入れると該当する TMemo とTMediaPlayer のみ表示される15ツールパレット

Delphi 2010 IDE のスゴイところ 他には– IDEの言語切り替えツールの提供 �り替えられます。 国際化対応に便利– IDE に統合されたファイルブラウザ IDE からファイルが参照できます– クラス図と UML モデリング– トランスレーションエディタ– 履歴タブ 。 など履歴タブ16

Delphi 2010 エディタのスゴイところ ライブテンプレートがスゴイ!Delphi 7 までの Code Template に変わって、Live Template �動化できます。上の例は、for ive Template は、XML で記述されています。自分で Live Template を作ることもできます。17

Delphi 2010 エディタのスゴイところ SyncEdit がスゴイ!SyncEdit �のに Delphi IDE ��ます18

Delphi 2010 エディタのスゴイところ リファクタリングがスゴイ!– 豊富なリファクタリングコマンド 数名を変更する例Delphi ��ています。しかも、Delphi 2010 ��にとどまらない、Delphi �体験してください。19

Delphi 2010 エディタのスゴイところ �(黄色の部分)が表示されます。 ブロック補完– begin といれてエンターを押すと自動的に end が補完されたりします。 慣れるまでは自分で end ��イライラするようになります。 Unicode 対応– Delphi 2009 からエディタが完全に Unicode 化されました。 �いておいて)20

Delphi �ド ブックマーク– �クマークです。– Ctrl Shift 0 9 キーで、ブックマークを設定– Ctrl 0 9 � �り、という風に使います。 宣言部、実現部の移動– Ctrl Shift 実現部で を押せば宣言部に、宣言部で を押せば宣言部に移動します。 � Ctrl Shift C 例えば宣言部で procedure Test(const iStr: String); と書いて Ctrl Shift C と押すと procedure Test(const iStr: String);begin end; �ります。21

Delphi �ド インデント・アンインデント– Ctrl Shift I でインデント– Ctrl Shift U でアンインデント コード補完– Ctrl J tryf �対して Ctrl J を押すとtryffinallyend; に補完されます SyncEdit– Ctrl Shift J �22

Delphi �ド 一行削除– �これで空行を削除したりします。– Ctrl Y ハイパーリンク– Ctrl ��23

Delphi 2010 はデバッガもスゴイ デバッガ– �されました。 TDateTime 型なら日付で、TStrings �に型に即した表示ができます。 �ます。– スレッドのデバッグ �御できます。TDateTime 型のビジュアライザ– � ��24

Delphi 2010 はデバッガもスゴイ デバッガ– CPU ビューは機能別に独立可能に。– Ctrl �透明に �かった時に便利。Ctrl �内容を独立したウィンドウで25

その他もスゴイ 統合されたユニットテスト– DUnit �ークが統合されました。 データベース接続だってスゴイ Web アプリケーションの開発がスゴイ フォーマッタとかもある! とにかくスゴイ26

3VCL

Delphi 7 以降に導入された VCL 多くの VCL が新たに導入されています。– いくつかピックアップします。 TGridPanel– �ポーネントが置かれるパネルです TFlowPanel– 自動的に整列するパネルです。 TCategoryPanelGroup– �プです。28

Delphi 7 以降に導入された VCL リボンコントロール– �ます。 �派です。29

Delphi 7 以降に導入された VCL Vista スタイルのダイアログ– TFileOpenDialog, TFileSaveDialog, TTaskDialog タスクトレイアイコン– TTrayIcon– TBalloonHint Indy– Indy はバージョン 10 に。 その他にも色々追加されています。30

Delphi 2010 で導入された VCL ジェスチャーコントロール– TGestureManager ��ジェスチャーもコンポーネントの Touch h プロパティ。ここに GestureManager を結びつけ、Gestures ��ント OnGesture が発生する。31

Delphi 2010 で導入された VCL TTouchKeyboard– �チキーボード– ちゃんと漢字も打てます。32

Delphi 2010 で追加されたクラス TMonitor– � System �を実現します。 EnterCriticalSection, LeaveCriticalSection のような機能です。– System.TMonitor.Enter(AObject: TObject); これで ��ロックを取得します– EnterCriticalSection � TObject � �� ��ります。» Indy ��に便利ですprocedure TForm1.Button1Click(Sender: TObject);beginSystem.TMonitor.Enter(Self);try// ter から Exit �クセスがブロックされます。Thread �てくる場合があってもEnter Exit ッドは Enter 再入)は可能です33

Delphi 2009, 2010 で追加されたクラス TDirect2DCanvas– Windows 7 で追加された Direct2D を扱えるキャンバスです。– これを使うと簡単に Direct2D の機能を扱えます。 TStringBuilder– �速に行うクラスです。34

Delphi 2009, 2010 で拡張されたTObject TObject �ました– ToString– GetHashCode– Equals RTTI サポート– 今までの RTTI 用メソッドよりも詳細かつ柔軟な RTTI サポートが追加されました。35

Delphi 2010 はヘッダファイルがスゴイ Delphi 2010 では、Win32 SDK �ぼ全てが Delphi 用のユニットに変換されています ��索する用にしましょう。– RAD Studio 7.0 source Win32 rtl win 36

4言語

Delphi 2009 で変更された文字列型 UnicodeString の導入– Delphi 2009 から言語・IDE は Unicode �した。– ��トの文字列型UnicodeString ��フトJISなどWideStringUnicode 文字列COM 用UnicodeStringUnicode ��ードページの変換がない �バッファとして利用する時など38

Delphi 2009 で変更された文字列型 AnsiString にコードページを指定可能に– AnsiString �なりました。type– 例えば右記のコードです。SJISString type AnsiString(932);EUCString type AnsiString(20932);このコードでは AnsiString にvarSJIS: SJISString;EUC: re ShowCode(const iCode: String; const iStr: �ます。vari: Integer;– �に ��ます。for i : 1 to Length(iStr) doMemo1.Lines.Text : Memo1.Lines.Text IntToHex(Ord(iStr[i]), 1) ' �点です。 beginSJIS : 'テスト';EUC : �39ShowCode(SJIS);ShowCode(EUC);end;

Delphi 2009 で変更された文字列型 RawByteString とは?– �互に代入互換性があります。 ��どの問題があります。– RawByteString �のデータを扱う文字列型です。 RawByteString �ん。– String �も利用できます。 例えば、このように。beginSetLengt(Str, tr) , foo, bar);end;40

Delphi 2009 で変更された文字列型 TEncoding クラスの導入– TEncoding �ラスです。– �ラス(TStringList �うになります。– �コードでは文字列が EUC として扱われます。procedure TForm1.Button1Click(Sender: TObject);varEUC: TEncoding;beginwith TStringList.Create dotryAdd('テスト');EUC : TEncoding.GetEncoding(20932); // EUC-JP のインスタンスを取得trySaveToFile('C: Temp EUC.txt', EUC);finallyEUC.Free;end;finallyFree;end;end;41

Delphi 7 以降変更された Class Class に Delphi 2005(※) lphi 8 から追加されたものの Win32 で使えるように成ったのは Delphi 2005 です。– strict protected– strict private– Delphi �互いに private, protected が見える、という一種の friend 的機能が使えましたが、strict �ります。 Class 変数、定数– Class には、Class �した。typeTTest classclass var SFoo: Integer;const CBar: Integer 10;end;TCommands recordconst COMMAND SEND: String 'send';const COMMAND RECEIVE: String 'recv';end;左記の例での SFoo は TTest.SFoo としてアクセスできます。同様に CBar も TTest.CBar としてアクセスできます。実は、Class 同様 Record ��定数を宣言できます。42

ジェネリクス Delphi 2009 �– Java ではおなじみ、C �物です。– �書く必要はありません。typeTTest T classprivateFValue: T;publicconstructor Create(const iValue: T); reintroduce;property Value: T read FValue;end;constructor TTest T .Create(const iValue: T);beginFValue : iValue;end;ジェネリクスの例。ここでは String と procedure TForm1.Button1Click(Sender: TObject);varStr: TTest String ;Int: TTest Integer ;beginStr : nil;Int : nil;tryStr : TTest String .Create('テスト');Int : TTest Integer ee;end;end;43

無名関数 Delphi 2009 �ートされました。– �確保します。type// 匿名関数の型定義TFigureFunc reference to function(const iMsg: String): String;procedure ShowFigure(const iFigureFunc: にアクセスできます。この例では Side de の数によって ShowFigure cedure TForm2.Button1Click(Sender: TObject);varTriangle: TFigureFunc; // 匿名関数を代入するRectangle: TFigureFunc; // 変数Side: Integer;beginTriangle : function(const iMsg: String): StringbeginResult : Format(iMsg ' %d, 三角形', [Side]);end;Rectangle : function(const iMsg: String): StringbeginResult : Format(iMsg ' %d, 四角形', [Side]);end;Side : 3;if (Side 3) thenShowFigure(Triangle);if (Side 4) thenShowFigure(Rectangle);end;44

5まとめ

Delphi 2010 へ今すぐ行こう! Delphi 2010 は非常に安定したバージョンです。 起動も高速!まるで Delphi 7 の再来です。 ��ます。– もう Delphi って Unicode � Delphi 2010 は、これからの時代の Delphi �ょう。2010/3/1746

参考文献 Delphi 2010 機能一覧– delphi-2010-features-matrix-jp.pdf Delphi 7以降の IDEの新機能– http://edn.embarcadero.com/jp/article/34361 i 7以降の新機能トップ10 - by Pawel Glowacki– http://dn.embarcadero.com/jp/article/37433 Delphi 2010の新機能– -what%E2%80%99s-new Delphi ードで検証– ws02.html Delphi 2010 のヘルプ2010/3/1747

Delphi 7 の紹介 Delphi 7 – Borland Delphi 7 Studio – 2002年09月26日発売 歴代で最も人気のあったDelphi .NET Framework � – 本格的な.NET Framework 対応はDelphi 8 – ラインナップ Personal Professional Enterprise Architect

Related Documents:

1 1.0 Borland Delphi 1995-02-14 2 2.0 Borland Delphi 2 1996-02-10 3 3.0 Borland Delphi 3 1997-08-05 4 4.0 Borland Delphi 4 1998-07-17 5 5.0 Borland Delphi 5 1999-08-10 6 6,0 Borland Delphi 6 2001-05-21 7 7.0 Borland Delphi 7 2002-08-09 8 8.0 Borland Delphi 8 pour .NET 2003-12-22 2005 9.0 Borland Delphi 2005 2004-10-12 2006 10.0 Borland Delphi .

For Delphi Sydney and later it can be found in the Packages\Delphi\Delphi 10.4 directory. For earlier versions use the package in the Packages\Delphi\Delphi 10.3- directory. Note: The package is Design & Runtime together. P4D Components Component Functionality PythonEngine Load and connect to Python. Access to Python API (low-level .

Migrating Borland Delphi applications to the Microsoft .NET Framework with Delphi 8 features and code constructs in Delphi 7 must be replaced by safe counterparts in Delphi for .NET. Many Delphi 7 language features are no longer available in the Delphi for .NET environment

The FTP Client Engine for Delphi component library supports and has been tested with all 32-bit and 64-bit versions of Delphi including: Borland Delphi (2.0, 3.0, 4.0, 5.0. 6.0 and 7.0) Borland Delphi 8 for .NET Borland Delphi 2005 & 2006 Borland Turbo Delphi

For example buying Delphi XE 2 also gets you Delphi 7, Delphi 2007, Delphi 2009, Delphi 2010 and Delphi XE. Also the technology has changed so much during the last 10 years, and end users are no longer restricted to get ting the information through desktop applications, they use the

Kelebihan Borland Delphi 7.0 Borland delphi 7.0 merupakan pilihan bagi sebagian kalangan programmer untuk membuat aplikasi. Hal ini disebabkan kelebihan yang ada pada borland delphi 7.0 berikut ini beberapa kelebihan borlan delphi 7.0 antara lain : Berbasis Objek Orientid programming, seperti bagian yang ada pada program

Manager , CodeGear RAD Studio, DBArtisan , Delphi , ER/Studio , JBuilder and Rapid SQL . Founded in 1993, Embarcadero is headquartered in San Francisco, with offices located around the world. Embarcadero is online at www.embarcadero.com. December 8, 2010

AGMA and/or DIN standards IMPERIAL Series Load Rating Drum Capacity METRIC Series Power Supply Line Speed Clutch Load Rating Drum Capacity Power Supply Line Speed Clutch PERFORMANCE 4WS9M18 4WS16M20 4WS26M26 4WS1M6 4WS3M10 4WS6M12 10,000 lbs 16,000 lbs 26,200 lbs 1,500 lbs 3,700 lbs 6,400 lbs 5–10 hp 7.5–15 hp 10–25 hp.5–1.5 hp 1–3 hp .