Ich habe seit einiger Zeit Freigabe experimentellen GExperts Versionen, die die Code-Formatierer, die früher als DelForEx mit einigen Verbesserungen und Korrekturen. Die neueste Version ist von 2008-12-26 und unterstützt die folgenden Delphi-Versionen: Delphi 6 bis 7 Delphi 2005 bis 2010 Delphi XE Delphi XE2 zu XE7 Bitte beachten Sie, dass ich es nur mit Delphi 2007 verwenden, so dass die anderen Versionen Kann unbekannte Bugs haben. Auch werden nicht alle Sprachverbesserungen von späteren Delphi-Versionen funktionieren, z. B. Verschachtelte Typen, generische und anonyme Methoden. Btw: Jede Hilfe Verbesserung der Formatierer, vor allem das Hinzufügen der neuen Sprachkonstrukte würde geschätzt werden. Der Quellcode kann aus dem Subversion-Repository heruntergeladen werden, der von meiner Homepage aus verlinkt ist. Die TWM-Version von GExperts funktioniert gut und ist gut in die IDE integriert. Es ermöglicht Ihnen, schreiben und ändern Sie Ihren Code ohne Sorgen zu viel über exakte Formatierung, dann nur auf den zugeordneten Hotkey getroffen und es sofort reformiert. Ich habe immer gefunden, es einfach, bis auf den Stil passen, bevorzuge ich, und nicht so komplex wie JEDI-Code-Format, das sah aus wie Overkill zu mir. Die Delphi 2009-Version ist jetzt über den oben angezeigten Link verfügbar, basiert aber auf einer Beta-Version von GExperts. Es ist immer noch viel die gleiche Formatierung unter, und, und ist nicht bewusst die Syntax einiger der neueren Delphi-Erweiterungen. Verfahren TForm1.FormCreate (Sender: TObject) var 160160DummyForm: TForm0 160160f: integer 160160tempComp: beantwortet 31 08 Dezember um 12: die folgenden Formen Legen Sie in der OnCreate-Ereignis der Nachkomme Form 19How erben TComponent 160160try 160160160160DummyForm beginnen: TForm0.Create ( Application) 160160160160for f: DummyFormponentCount - 1 downto 0 do 160160160160begin 160160160160160160 160160160160160160tempComp: Findcomponent (DummyFormponentsf. Name) 160160160160160160if nicht zugeordnet (tempcomp) dann 160160160160160160begin 160160160160160160160160 160160160160160160160160tempComp: DummyFormponentsf 160160160160160160160160DummyForm. RemoveComponent (tempcomp) 160160160160160160160160InsertComponent (tempcomp) 160160160160160160160160if tempcomp ist TControl dann 160160160160160160160160160160with tempcomp wie TControl tun 160160160160160160160160160160160160if Eltern DummyForm dann 160160160160160160160160160160160160160160Parent: Selbst 160160160160160160end 160160160160end 160160160160 160160160160 - - - gt 160160160160160160160160160160160160160160160160the DFM-Datei für die descentant Form. Schließen und dann das Formular Gerät öffnen 160160160160160160160160160160160160160160160160will können Sie die geerbten Komponenten visuell 160160finally 160160160160DummyForm. Free 160160end Ende, wo TForm0 ist der Vorfahr Form zu bearbeiten. Wenn Sie eine Anzahl von Eigenschaften für jede Komponente außer Kraft setzen möchten, schneiden Sie die Komponente in der dfm-Datei aus und fügen Sie sie ein. Dies ermöglicht es Ihnen, visuell bearbeiten. 2010. janur 30. szombat Gibt es einen Weg, um eine Jpegs Höhe und Breite ohne TJPEGImage Ich habe über 10000 Bilder, die jeden Monat überprüft werden müssen und mit TJPEGImage. LoadFromFile, um die Höhe und Breite ist zu langsam. Dies könnte nicht mit allen Arten von JPG-Bildern arbeiten: function GetJpegSize (const Filename: string): TPoint var 160160fs: TFileStream 160160SegmentPos: Integer 160160SOIcount: Integer 160160x, y: Wort 160160b: Byte beginnen 160160fs: TFileStream. Create (Dateiname, fmOpenRead oder fmShareDenyNone) 160160try 160160160160fs. Position: 0 160160160160fs. Read (x, 2) 160160160160if x ltgt D8FF dann 160160160160160160raise Exception. Create (Nicht eine JPEG-Datei) 160160160160SOIcount: 0 160160160160fs. Position: 0 160160160160while fs. Position 7 lt fs. Size tun 160160160160begin 160160160160160160fs. Read (b, 1) FF 160160160160160160if b dann 160160160160160160begin 160160160160160160160160fs. Read (b, 1) 160160160160160160160160if b D8 dann 160160160160160160160160160160Inc (SOIcount) 160160160160160160160160if b DA dann 160160160160160160160160160160Break 160160160160160160end 160160160160end 160160160160if b ltgt DA dann 160160160160160160raise Exception. Create (Corrupt JPEG-Datei ) 160160160160SegmentPos: -1 160160160160fs. Position: 0 160160160160while fs. Position 7 lt fs. Size do 160160160160begin 160160160160160160fs. Read (b, 1) 160160160160160160if b FF dann 160160160160160160begin 160160160160160160160160fs. Read (b, 1) 160160160160160160160160if b in C0, C1, C2 dann 160160160160160160160160begin 160160160160160160160160160160SegmentPos: fs. Position 160160160160160160160160160160Dec (SOIcount) 160160160160160160160160160160if SOIcount 0 dann 160160160160160160160160160160160160Break 160160160160160160160160end 160160160160160160end 160160160160end 160160160160if SegmentPos -1 dann 160160160160160160raise Exception. Create (Corrupt JPEG-Datei) 160160160160if fs. Position 7 gt fs. Size dann 160160160160160160raise Exception. Create (Corrupt Jpeg Datei) 160160160160fs. Position: SegmentPos 3 160160160160fs. Read (y, 2) 160160160160fs. Read (x, 2) 160160160160Result: Point (Swap (x), Swap (y)) 160160finally 160160160160fs. Free 160160end Ende 2010. janur 29. pntek String-Funktion RecordsetFromXML (const XML:: string): Cord-Funktion RecordsetToXML (const Recordset: Cord): string var 160160RS: Variant Wie ein ADO-Recordset in XML und die umgekehrte Art und Weise verwendet 160160Classes, ADOInt Funktion RecordsetToXML (: Cord const Cord) zu konvertieren 160160Stream: TStringStream 160160Result beginnen: 160160if Recordset nil dann 160160160160Exit 160160Stream: TStringStream. Create () 160160try 160160160160RS: CreateOleObject (ADODB. Recordset) 160160160160RS: Cord 160160160160RS. Save (TStreamAdapter. Create (Strom) als IUnknown, AdPersistXML) 160160160160Stream. Position: 0 160160160160Result: Stream. DataString 160160finally 160160160160Stream. Free 160160end end function RecordsetFromXML (const XML: string): Cord var 160160RS: Variant 160160Stream: TStringStream 160160Result beginnen: nil 160160if XML dann 160160160160Exit 160160try 160160160160Stream: TStringStream. Create (XML) 160160160160Stream. Position: 0 160160160160RS: CreateOleObject (ADODB. Recordset) 160160160160RS. Open (TStreamAdapter. Create (Stream) als IUnknown) 160160160160Result: IUnknown (RS) als Recordset 160160finally 160160160160Stream. Free 160160end Ende 2010. janur 28. cstrtk Deal mit Font, bgColor, Ausrichtung. (// Funktion ColorToHtml (M-Color: TColor): string Funktion StrToHtml (MSTR: string mFont: TFont nil): string //) Funktion ColorToHtml (M-Color: TColor): string beginnen 160160mColor: ColorToRGB (M-Color) 160160Result: Format (.2x .2x.2x, 160160160160GetRValue (M-Color), GetGValue (M-Color), GetBValue (M-Color)) end function StrToHtml (MSTR: string mFont: TFont nil): string var 160160vLeft, vright: string 160160Result beginnen: MSTR 160160Result: StringReplace (Ergebnis, Verstärker, ampamp, rfReplaceAll) 160160Result: StringReplace (Ergebnis, lt, ampLT, rfReplaceAll) 160160Result: StringReplace (Ergebnis, gt, ampGT, rfReplaceAll) 160160if nicht zugeordnet (mFont) dann 160160160160Exit 160160vLeft: Format (ltFONT FACES COLORsgt, 160160160160mFont. Name, ColorToHtml (mFont. Color)) 160160vRight: lt / FONTgt 160160if fsBold in mFont. Style dann 160160begin 160160160160vLeft: vLeft ltBgt 160160160160vRight: lt / Bgt vright 160160end 160160if fsItalic in mFont. Style dann 160160begin 160160160160vLeft: vLeft ltIgt 160160160160vRight: lt / IGT vright 160160end 160160if fsUnderline in mFont. Style dann 160160begin 160160160160vLeft: vLeft ltUgt 160160160160vRight: lt / Ugt vright 160160end 160160if fsStrikeOut in mFont. Style dann 160160begin 160160160160vLeft: vLeft ltSgt 160160160160vRight: lt / Sgt vright 160160end 160160Result: vLeft vright Ergebnis Ende Funktion DBGridToHtmlTable (mDBGrid: TDBGrid mStrings: TStrings 160160mCaption: TCaption): Boolean const 160160cAlignText: arrayTAlignment der Zeichenfolge (links, rechts, Mitte) var 160160vColFormat: string 160160vColText: string 160160vAllWidth: Integer 160160vWidths: array of Integer 160160vBookmark: string 160160I, J: Integer 160160Result beginnen: false 160160if nicht belegt (mStrings) dann 160160if 160160160160Exit nicht zugeordnet (mDBGrid) dann 160160160160Exit 160160if nicht dann 160160if 160160160160Exit Assigned (mDBGrid. DataSource) nicht zugeordnet (mDBGrid. DataSource. DataSet) dann 160160if 160160160160Exit nicht 160160160160Exit 160160vBookmark mDBGrid. DataSource. DataSet. Active dann: mDBGrid. DataSource. DataSet. Bookmark 160160mDBGrid. DataSource. DataSet. DisableControls 160160try 160160160160J: 0 160160160160vAllWidth: 0 160160160160for I: 0 bis mDBGrid. Columns. Count - 1 do 160160160160160160if mDBGrid. ColumnsI. Visible dann 160160160160160160begin 160160160160160160160160Inc (J) 160160160160160160160160SetLength (vWidths, J) 160160160160160160160160vWidthsJ - 1: mDBGrid. ColumnsI. Width 160160160160160160160160Inc (vAllWidth, mDBGrid. ColumnsI. Width) 160160160160160160end 160160160160if J lt 0 dann 160160160160160160Exit 160160160160mStrings. Clear 160160160160mStrings. Add (Format (ltTABLE BGCOLORs BORDER1 WIDTH100gt, 160160160160160160ColorToHtml (mDBGrid. Color))) 160160160160if mcaption ltgt dann 160160160160160160mStrings. Add (Format (ltCAPTIONgtslt / CAPTIONgt, StrToHtml (mcaption))) 160160160160vColFormat: 160160160160vColText: 160160160160vColFormat: vColFormat ltTRgt1310 160160160160vColText: vColText ltTRgt1310 160160160160J: 0 160160160160for I: 0 bis mDBGrid. Columns. Count - 1 do 160160160160160160if mDBGrid. ColumnsI. Visible dann 160160160160160160begin 160160160160160160160160vColFormat: vColFormat Format (160160160160160160160160160160160160ltTD BGCOLORs ausrichtet WIDTHdgtDisplayTextdlt / TDgt1310, 160160160160160160160160160160ColorToHtml (mDBGrid. ColumnsI. Color), 160160160160160160160160160160cAlignTextmDBGrid. ColumnsI. Alignment, 160160160160160160160160160160160160Round (vWidthsJ / vAllWidth 100), J) 160160160160160160160160vColText: vColText Format (160160160160160160160160160160160160ltTD BGCOLORs Aligns WIDTHdgtslt / TDgt1310, 160160160160160160160160160160ColorToHtml (mDBGrid. ColumnsI. Title. Color), 160160160160160160160160160160cAlignTextmDBGrid. ColumnsI. Alignment, 160160160160160160160160160160160160Round (vWidthsJ / vAllWidth 100), 160160160160160160160160160160160160StrToHtml (mDBGrid. ColumnsI. Title. Caption, 160160160160160160160160160160160160mDBGrid. ColumnsI. Title. Font)) 160160160160160160160160Inc (J) 160160160160160160end 160160160160vColFormat: vColFormat lt / TRgt1310 160160160160vColText: vColText lt / TRgt1310 160160160160mStrings. Text: mStrings. Text vColText 160160160160mDBGrid. DataSource. DataSet. First 160160160160while nicht mDBGrid. DataSource. DataSet. Eof tun 160160160160begin 160160160160160160J: 0 160160160160160160vColText: vColFormat 160160160160160160for I : 0 bis mDBGrid. Columns. Count - 1 160160160160160160160160if mDBGrid. ColumnsI. Visible tun dann 160160160160160160160160begin 160160160160160160160160160160vColText: StringReplace (vColText, Format (gtDisplayTextdlt, J), 160160160160160160160160160160160160Format (gtslt, StrToHtml (mDBGrid. ColumnsI. Field. DisplayText, 160160160160160160160160160160160160160160mDBGrid. ColumnsI. Font)), 160160160160160160160160160160160160rfReplaceAll) 160160160160160160160160160160Inc (J) 160160160160160160160160end 160160160160160160mStrings. Text: mStrings. Text vColText 160160160160160160mDBGrid. DataSource. DataSet. Next 160160160160end 160160160160mStrings. Add (lt / TABLEgt) 160160finally 160160160160mDBGrid. DataSource. DataSet. Bookmark: vBookmark 160160160160mDBGrid. DataSource. DataSet. EnableControls 160160160160vWidths: nil 160160end 160160Result: True End /////// Quelle-Prozedur TForm1.Button1Click (Sender: TObject) beginnen 160160DBGridToHtmlTable (DBGrid1, Memo1.Lines, Caption) 160160Memo1.Lines. SaveToFile (c: temp. htm ) 160160ShellExecute (Handle, nil, c: temp. htm, nil, nil, SWSHOW) Ende /////// End Demo 2010. janur 27. szerda Ich muss die Byte-Reihenfolge der verschiedenen Integer-Werte für eine Anwendung umzukehren. Was wäre der beste Weg, um diese Big-Endian / Little-Endian Swap Hinweis: Ich muss Werte aller Größen (Wort int64) konvertieren. Funktion EndianWort (w: Wort): Wortanfang 160160result: Swap (w) Endfunktion EndianInt (i: Integer): Ganzzahlanfang 160160result: Swap (i) Endfunktion EndianLong (L: longint): longint begin 160160result: swap (L shr 16) oder (longint (swap (L und FFFF)) shl 16) Ende Man könnte die Swap-Funktion verwenden, aber das Problem ist nur, dass es nur Worte oder ganze Zahlen tauscht. Ich schrieb thefollowing Funktion etwas zu tauschen: Prozedur SwapBytes (var Bytes Len: Integer) var 160160Swapped: PChar 160160i: Integer beginnen 160160GetMem (Swapped, Len) 160160try 160160160160for i: 0 bis Len - 1 160160160160160160SwappedLen tun - i - 1: PChar (Bytes ) i 160160160160Move (Swapped, Bytes, Len) 160160finally 160160160160FreeMem (Swapped) 160160end Ende Typ 160160TData1 Wort 160160TData2 Wort 160160TData4 Kardinal 160160TData8 Doppel 160160PData2 TData2 Funktion Swap2 (a: Kardinal): Wortfunktion Swap4 (a: Kardinal): Kardinal Funktion Swap2Signed (a : Kardinal): Smallint Funktion Swap4Signed (a: Kardinal): longint Verfahren Swap4Array (a, b: Zeiger n: ganze Zahl) Prozedur Swap2Array (a, b: Zeiger n: ganze Zahl) Prozedur SwapDoubleTo8 (const a: Doppel var b: TData8) Funktion Swap8ToDouble (var a: TData8): Doppelfunktion Swap2 (a: Kardinal): Wort asm 160160bswap eAX 160160shr eax, 16 End-Funktion Swap2signed (a: Kardinal): Smallint asm 160160bswap eAX 160160shr eax, 16 End-Funktion Swap4 (a: Kardinal ): 160160bswap eAX Ende Funktion Kardinal asm Swap4Signed (a: Kardinal): longint asm 160160bswap eAX Ende Prozedur Swap2Array (a, b: Zeiger n: ganze Zahl) asm 160160push ebx 160160xor ebx, ebx 160160lea eax, eax ECX 2 160160lea edx, EDX ECX 2 160160sub ebx, ECX 160160L1: 160160mov cx, Wort ptreax ebx 2 160160bswap cx 160160mov Wort ptredx ebx 2, cx 160160inc ebx 160160jnz L1 160160pop ebx Ende Prozedur Swap4Array (a, b: Zeiger n: ganze Zahl) asm 160160push ebx 160160xor ebx, ebx 160160lea eax, eax ECX 4 160160lea edx, EDX ECX 4 160160sub ebx, ECX 160160L1: 160160mov ECX, dword ptreax ebx 4 160160bswap ECX 160160mov dword ptredx ebx 4, ECX 160160inc ebx 160160jnz L1 160160pop ebx Ende Prozedur SwapDoubleTo8 (const a: Doppel var b: TData8) asm 160160mov edx, dword ptra 160160mov ECX, dword ptra 4 160160bswap edx 160160bswap ECX 160160mov dword ptr eAX, ECX 160160mov dword ptr eAX 4, EDX Ende Funktion Swap8ToDouble (var a: TData8): Doppel var 160160hold: Doppel asm 160160mov edx, dword ptreax 160160mov ECX, dword ptreax 4 160160bswap edx 160160bswap ECX 160160mov dword ptr halten, ECX 160160mov dword ptr halten 4, EDX 160160fld Ende Prozedur SwapInt64To8 halten (Konst a: int64 var b: TData8) asm 160160mov edx, dword ptra 160160mov ECX, dword ptra 4 160160bswap edx 160160bswap ECX 160160mov dword ptr eAX, ECX 160160mov dword ptr eAX 4, EDX Ende Funktion Swap8ToInt64 (var a: TData8): int64 asm 160160mov edx, dword ptreax 4 160160mov eax, dword ptreax 160160bswap edx 160160bswap eAX beenden Wie kann ich Laden eines JPEG-Bildes aus einer Ressource-Datei, die mit meiner Anwendung verknüpft ist Im Folgenden wird das Erstellen einer Ressourcendatei mit einem JPEG-Bild und das Laden der JPEG-Datei aus der Ressourcendatei gezeigt. Das resultierende JPEG-Bild wird in einer Bildkomponente angezeigt. Erstellen Sie eine Textdatei mit der Erweiterung. rc. Die Textdatei sollte etwas anderes als der Projektname oder einen Unit-Namen in Ihrer Anwendung benannt werden, um Verwechslungen für den Compiler zu vermeiden. Die Textdatei sollte die folgende Zeile enthalten: MYJPEG JPEG C: DownLoadMY. JPG Dabei steht MYJPEG für den Namen der Ressource JPEG ist der benutzerdefinierte Ressourcentyp. C: DownLoadMY. JPG ist der Pfad und Dateiname der JPEG-Datei. Für unser Beispiel nennen wir die Datei foo. rc. Führen Sie jetzt das Programm BRCC32.exe (Borland Resource CommandLine Compiler) aus dem Verzeichnis Delphi / C Builders aus, das den vollständigen Pfad der rc-Datei angibt: Sie sollten nun eine kompilierte Ressourcendatei haben, die genauso benannt ist wie die. rc-Datei, die Sie kompiliert haben Die Erweiterung der. res. Die folgende demonstriert mit dem eingebetteten JPEG in Ihrer Anwendung: procedure LoadJPEGFromRes (TheJPEG: string thepicture: TPicture-) var 160160ResHandle: THandle 160160MemHandle: THandle 160160MemStream: TMemoryStream 160160ResPtr: PByte 160160ResSize: Longint 160160JPEGImage: TJPEGImage beginnen 160160ResHandle: Findresource (hInstance, PChar (TheJPEG ), JPEG) 160160MemHandle: Load (hInstance, ResHandle) 160160ResPtr: LockResource (MemHandle) 160160MemStream: TMemoryStream. Create 160160JPEGImage: TJPEGImage. Create 160160ResSize: SizeofResource (hInstance, ResHandle) 160160MemStream. SetSize (ResSize) 160160MemStream. Write (ResPtr, ResSize) 160160FreeResource (MemHandle) 160160MemStream. Seek (0, 0) 160160JPEGImage. LoadFromStream (MemStream) 160160ThePicture. Assign (JPEGImage) 160160JPEGImage. Free 160160MemStream. Free Ende procedure TForm1.Button1Click (Sender: TObject) beginnen 160160LoadJPEGFromRes (MYJPEG, Image1.Picture) Ende Typ 160160TRGB Datensatz 160160160160R: Integer 160160160160G: Integer 160160160160B: Integer 160160end Typ 160160THLS Datensatz 160160160160H: Integer 160160160160L: Integer 160160160160S: Integer 160160end Typ 160160THWB Datensatz 160160160160H: Integer 160160160160W: Integer 160160160160B: Integer 160160end Funktion ColorToRGB (PColor: TColor): TRGB Funktion RGBToColor (PR, PG, PB: Integer): TColor Funktion RGBToCol (PRGB: TRGB): TColor Funktion RGBToHLS (PRGB: TRGB): THLs Funktion HLSToRGB (PHLS: THLs): TRGB Funktion min (P1, P2, P3: double): Doppelfunktion max (P1, P2, P3: double): Doppelfunktion RGBToColor (PR, PG, PB: Integer): TColor beginnen 160160Result: TColor ((PB 65536) (PG 256) PR) Ende Funktion ColorToRGB (PColor: TColor) : TRGB var 160160i: Integer 160160i beginnen: PColor 160160Result. R: 0 160160Result. G: 0 160160Result. B: 0 160160while i - 65536 gt 0 160160begin 160160160160i tun: i - 65536 160160160160Result. B: Result. B 1 160160end 160160while i - 256 gt 0 do 160160begin 160160160160i: i - 256 160160160160Result. G: Result. G 1 160160end 160160Result. R: i Funktion RGBToCol Ende (PRGB: TRGB): TColor beginnen 160160Result: RGBToColor (PRGB. R, PRGB. G, PRGB. B ) end Funktion RGBToHLS (PRGB: TRGB): THLs var 160160LR, LG, LB, LH, LL, LS, LMin, LMax: Doppel 160160LHLS: THLs 160160i: Integer beginnen 160160LR: PRGB. R / 256 160160LG: PRGB. G / 256 160160LB: PRGB. B / 256 160160LMin: min (LR, LG, LB) 160160LMax: max (LR, LG, LB) 160160LL: (LMax LMin) / 2 160160if LMin LMax dann 160160begin 160160160160LH: 0 160160160160LS: 0 160160160160Result. H: Runde (LH 256) 160160160160Result. L: rund (LL 256) 160160160160Result. S: rund (LS 256) 160160160160exit 160160end 160160if LL lt 0.5 dann 160160160160LS: (LMax - LMin) / (LMax LMin) 160160if LL gt 0,5 dann 160160160160LS: ( LMax - LMin) / (2,0 - LMax - LMin) 160160if LR LMax dann 160160160160LH: (LG - LB) / (LMax - LMin) 160160if LG LMax dann 160160160160LH: 2,0 (LB - LR) / (LMax - LMin) 160160if LB LMax 160160160160LH dann: 4.0 (LR - LG) / (LMax - LMin) 160160Result. H: rund (LH 42,6) 160160Result. L: rund (LL 256) 160160Result. S: rund (LS 256) Ende Funktion HLSToRGB (PHLS: THLs) : TRGB var 160160LR, LG, LB, LH, LL, LS: Doppel 160160LHLS: THLs 160160L1, L2: double beginnen 160160LH: PHLS. H / 255 160160LL: PHLS. L / 255 160160LS: 0 PHLS. S / 255 160160if LS dann 160160begin 160160160160Result. R: PHLS. L 160160160160Result. G: PHLS. L 160160160160Result. B: PHLS. L 160160160160Exit 160160end 160160if LL lt 0.5 dann 160160160160L2: LL (1,0 LS) 160160if LL gt 0,5 dann 160160160160L2: LL LS - LL LS 160160L1: 2.0 LL - L2 160160LR: LH 1,0 / 3,0 160160if LR lt 0 dann 160160160160LR: LR 1,0 160160if LR gt 1 dann 160160160160LR: LR - 1,0 160160if 6.0 LR lt 1 dann 160160160160LR: L1 (L2 - L1) 6.0 LR 160160else wenn 2,0 LR lt 1 dann 160160160160LR: L2 160160else wenn 3,0 LR lt 2 dann 160160160160LR: L1 (L2 - L1) ((2.0 / 3.0) - LR) 6.0 160160else 160160160160LR: L1 160160LG: LH 160160if LG lt 0 dann 160160160160LG: LG 1.0 160160if LG gt 1 dann 160160160160LG: LG - 1.0 160160if 6.0 LG lt 1 dann 160160160160LG: L1 (L2 - L1) 6.0 LG 160160else wenn 2,0 LG lt 1 dann 160160160160LG: L2 160160else wenn 3,0 LG lt 2 dann 160160160160LG: L1 (L2 - L1) ((2,0 / 3.0) - LG) 6.0 160160else 160160160160LG: L1 160160LB: LH - 1,0 / 3,0 160160if LB lt 0 160160160160LB dann: LB 1,0 160160if LB gt 1 dann 160160160160LB: LB - 1,0 160160if 6,0 LB lt 1 dann 160160160160LB: L1 (L2 - L1 ) 6.0 LB 160160else wenn 2,0 LB lt 1 dann 160160160160LB: L2 160160else wenn 3,0 LB lt 2 dann 160160160160LB: L1 (L2 - L1) ((2.0 / 3.0) - LB) 6.0 160160else 160160160160LB: L1 160160Result. R: rund (LR 255 160160Result. G): rund (LG 255) 160160Result. B: rund (LB 255) Ende Funktion max (P1, P2, P3: double): double 160160Result beginnen: -1 160160if (P1 gt P2) dann 160160begin 160160160160if (P1 gt P3) dann 160160160160begin 160160160160160160Result: P1 160160160160end 160160160160else 160160160160begin 160160160160160160Result: P3 160160160160end 160160end 160160else wenn P2 gt P3 dann 160160begin 160160160160result: P2 160160end 160160else 160160160160result: P3 Ende Funktion min (P1, P2, P3: double): double beginnen 160160Result: -1 160160if (P1 lt P2) dann 160160begin 160160160160if (P1 lt P3) dann 160160160160begin 160160160160160160Result: P1 160160160160end 160160160160else 160160160160begin 160160160160160160Result: P3 160160160160end 160160end 160160else wenn P2 lt P3 dann 160160begin 160160160160result: P2 160160end 160160else 160160160160result: P3 Ende String-Grids sind sehr nützlich, aber Manchmal ist es notwendig, einen eigenen Inplace-Editor zu verwenden. Zum Beispiel, um ein Raster zu erstellen, das nur Zahlen, aber keine Text-Zeichen erlaubt. Wenn Sie Grids (TStringGrid, TDBGrid) verwenden, können Sie Text in die Zellen des Rasters eingeben. Dies geschieht mit dem Inplace-Editor von Borland. Manchmal ist es notwendig, um einen eigenen Inplace-Editor, zum Beispiel zu verhindern, dass der Benutzer in Text statt Zahlen zu geben. Das folgende Beispiel zeigt, wie Sie dies tun. Zuerst benötigen Sie zwei neue Klassen: einen für Ihr Grid und einen für Ihren Inplace-Editor. In diesem Beispiel verwende ich TStringGrid, aber es sollte auch mit TDBStringGrid arbeiten. Verwendet 160160Windows, Nachrichten, SysUtils, Klassen, Grafiken, Steuerelemente, Formen, Dialoge, 160160Grids 160160 // Mein eigener Inplace-Editor. Dieser Editor - für Beispiel - nur 160160 // Zahlen erlauben, kein Text 160160TMyInplaceEdit Klasse (TInplaceEdit) 160160protected 160160160160procedure KeyPress (var Key: Char) außer Kraft setzen 160160end 160160 // Meine eigene String, die meine eigenen Inplace-Editor 160160TMyStringGrid Klasse verwenden (TStringGrid 160160protected) 160160160160function CreateEditor: TInplaceEdit außer Kraft setzen 160160end // Hier definieren i, dass mein String MyInplace-Editor-Funktion TMyStringGrid. CreateEditor verwenden sollte: TMyInplaceEdit. Create (Selbst) Ende // Die Inplace-Edit nur allowes numers, kein Text: 160160Result TInplaceEdit beginnen - Charaktere Verfahren TMyInplaceEdit. KeyPress (var Key: Char) beginnen 160160if nicht (Key in 0..9) dann 160160begin 160160160160beep 160160160160Key: 0 160160end 160160else 160160160160inherited Ende niemanden wissen, wie der HTML-Code für die Eltern eines ActiveX zu erhalten bilden die Problem, das wir haben, ist ein ActiveX-Formular, das in ein HTML-Dokument geladen wird. Dieses ActiveX-Formular verfügt über Schaltflächen, um zusätzliche ActiveX-Formulare zu laden. Wir möchten diese zusätzlichen ActiveX-Formulare auf die aktuelle HTML-Seite in einem Frame platzieren. Der folgende Code zeigt Ihnen, wie Sie das Dokument, etc. aus einem ActiveForm greifen können. TYourActiveForm. YourMethod var 160160vClientSite: IOleClientSite 160160vContainer: IOleContainer 160160vServiceProvider: IServiceProvider 160160vDocument: IHTMLDocument2 160160vBackgroundImage: OleVariante 160160vClientSite beginnen: ActiveFormControl. ClientSite 160160vClientSite. GetContainer (vContainer) 160160if vContainer. QueryInterface (IServiceProvider, vServiceProvider) SOK dann 160160begin 160160160160if vServiceProvider. QueryService (IIDIWebBrowserApp, IIDIWebBrowser2, 160160160160160160FBrowser) SOK dann 160160160160begin 160160160160160160vDocument: FBrowser. Document als IHTMLDocument2 160160160160160160vBackgroundImage: vDocument. body. style. backgroundImage 160160160160160160if vBackgroundImage dann 160160160160160160160160vBackgroundImage: vDocument. body. getAttribute (Hintergrund, 0) 160160160160160160if vBackgroundImge ltgt dann 160160160160160160160160ShowMessage (vBackgroundImage) 160160160160160160else 160160160160160160160160ShowMessage (No Hintergrundbild definiert.) 160160160160end 160160end Ende 2010. janur 18. htf So erstellen und einfügen. Wmf in eine RTF-Datei Nun, erstellen Sie eine Metadatei mit dem alten wmf-Format (mit erweiterten false). Code funktioniert wie folgt: var 160160f: TPicture - 160160c: TMetafileCanvas 160160fs: TMemoryStream beginnen 160160f: TPicture. create 160160f. Metafile. width: 100 160160f. Metafile. height: 100 160160f. Metafile. Enhanced: false 160160c: TMetafileCanvas. create (f. Metafile, 0) 160160c. Ellipse (5, 5, 95, 95) 160160c. Free Ende die Bytes der Metadatei zu bekommen, in einem Puffer setzen und rufen Sie diese Funktion: procedure TRtfWriter. InsertWMFFromBuffer (Puffer: PByte const BufLen: integer 160160iWidth, iHeight: integer) var 160160wmfTag: string 160160HexEncoded: string 160160i: integer 160160HexEncoded beginnen: 160160for i: 0 bis BufLen - 1 do 160160begin 160160160160HexEncoded: Hexencoded IntToHex (Puffer, 2) 160160160160Inc (Puffer) 160160end 160160 160160HexEncoded: Copy (Hexencoded, (Sizeof (LongInt) Sizeof (SmallInt) Sizeof (TSmallRect) 160160160160Sizeof (Word) Sizeof (LongInt) Sizeof (Word)) 2 1, 160160160160Length (Hexencoded)) 160160HexEncoded: Lowercase (Hexencoded) 160160wmfTag: 160160wmfTag: Format (wmfTag, iWidth 20, iHeight 20, HexEncoded) 160160fStream. Write (wmfTag1, Länge (wmfTag)) Ende Beachten Sie, dass fStream ein Stream mit der rtf-Datei ist, an der meine TRtfWriter-Klasse arbeitet. Youll haben, um die rtf Job selbst, aber thats der Weg, um eine wmf-Datei einzufügen. Wenn Sie einen schnellen Test wünschen, legen Sie diesen auf die Oberseite der Akte: und dieses auf der Unterseite habe ich ein Formular mit einem Seitensteuerelement, und jedes Registerblatt des Seitensteuers enthält einen Rahmen. Ich möchte den Rahmen zusammen mit dem übergeordneten Tabblatt löschen, wenn der Benutzer auf eine bestimmte Schaltfläche auf dem Rahmen klickt. Was ist der beste Weg, dies zu tun Es scheint, dass, wenn die Registerkarten kostenlos Methode aus dem Inneren der Button-Click-Ereignishandler aufgerufen wird, wird die Schaltfläche freigegeben, bevor die Ereignishandler beendet wird ausgeführt wird. Der Weg, dies zu lösen ist wie TCustomform. Release tut es: Post (über PostMessage) eine Benutzer-Nachricht an das Formular, haben das Formular frei die Komponente in Reaktion auf die Nachricht. const 160160UMDESTROYCONTROL WMUSER 230 Prozedur UmDestroyControl (var msg: TMessage) Nachricht UMDESTROYCONTROL var 160160ctrl: Twincontrol 160160ctrl beginnen: GetParentForm (Sender als TButton) 160160PostMessage (ctrl. handle, UMDESTROYCONTROL, 0, Integer (Sender)) 160.160 Verfahren TForm1.UmDestroyControl (var msg : string) var 160160MyObject: IUnknown 160160MyLink: IShellLink 160160MyFile: IPersistFile 160160ds: Wide 160160StartMenuDir TMessage) 160160TObject (msg. lparam).Freies Ende So fügen Sie Programme auf dem Windows-Startmenü Prozedur CreateStartmenuLink (exefile, Arbeitspfad, Args, Beschr beginnen: String 160160reginfo: TRegIniFile 160160reg: TRegistry 160160s: string beginnen 160160regInfo: 160160160160TRegIniFile. Create (SoftwareMicrosoftWindowsCurrentVersionExplorer) 160160StartMenuDir: regInfo. ReadString (Shell Folders, Startmenü,) 160160regInfo. Free 160160s: ExtractFilePath (StartMenuDir Beschr. lnk) 160160ForceDirectories (e) 160160if FileExists (StartMenuDir Beschr. lnk) dann 160160160160DeleteFile (StartMenuDir Beschr. lnk) 160160MyObject: CreateComObject (CLSIDShellLink) 160160MyLink: MyObject als IShellLink 160160MyFile: MyObject als IPersistFile 160160MyLink. SetArguments (PChar (args)) 160160MyLink. SetPath (PChar (exefile)) 160160MyLink. Arbeitsverzeichnisdefinieren (PChar (Arbeitspfad)) 160160s: ExtractFileName (StartMenuDir Beschr. lnk) 160160s: Kopie (s, 1, Länge (en) - 4) 160160MyLink. SetDescription (PChar (n)) 160160ds: StartMenuDir Beschr. lnk 160160MyFile. Save ( PWChar (ds), false) 160160reg: TRegistry. Create 160160reg. RootKey: HKEYUSERS 160160reg. openkey (.DefaultSoftwareMicrosoftWindowsCurrentVersionExplorerShell Ordner, true) 160160StartMenuDir: reg. ReadString (Startmenü) 160160reg. closekey 160160reg. free 160160s: ExtractFilePath (StartMenuDir Beschr LNK ) 160160ForceDirectories (e) 160160if FileExists (StartMenuDir Beschr. lnk) dann 160160160160DeleteFile (StartMenuDir Beschr. lnk) 160160ds: StartMenuDir Beschr 160160MyFile. Save (PWChar (ds. lnk), false) Ende Typ 160160TShellLinkInfo Rekord 160160160160PathName: string 160160160160Arguments: string 160160160160Description: String 160160160160WorkingDirectory: string 160160160160IconLocation: string 160160160160IconIndex: integer 160160160160ShowCmd: integer 160160160160HotKey: Wort 160160end Funktion GetSpecialFolderPath (Ordner: Integer CanCreate: Boolean): 160160string var 160160FilePath: array0..MAXPATH Saiblings beginnen 160160 160160SHGetSpecialFolderPath (0, FilePath, Ordner, CanCreate) 160160Result: FilePath end function CreateShellLink (const AnwName, Beschr: string Dest: Integer): string Der Link öffnet sich in Ordner von Dest angegebenen befinden. Gibt den vollständigen Pfadnamen der Link-Datei var 160160SL: IShellLink 160160PF: IPersistFile 160160LnkName: Wide beginnen 160160OleCheck (CoCreateInstance (CLSIDShellLink, nil, CLSCTXINPROCSERVER, IShellLink, 160160160160SL)) 160.160 160160Get eine Schnittstelle Zeiger darauf. 160160PF: SL als IPersistFile 160160OleCheck (SL. SetPath (PChar (AppName))) 160160if Desc ltgt dann 160160160160OleCheck (SL. SetDescription (PChar (Desc))) 160.160 160160LnkName: GetSpecialFolderPath (Dest, True) ChangeFileExt (AnwName,.lnk) 160160PF. Save (PWideChar (LnkName), True) 160160Result: LnkName Ende nachschlagen SHGetSpecialFolderLocation oder ShlObj. pas für die CSIDLconstants. So bestimmen Sie den Pfad eines TTable Wenn eine Tabelle über einen Alias referenziert wird, ist der physische Pfad nicht sofort verfügbar. Verwenden Sie die DbiGetDatabaseDesc-BDE-Funktion, um diesen Pfad zu erhalten. Diese Funktion übernimmt den Aliasnamen und einen Zeiger auf eine DBDesc-Struktur. Die DBDesc-Struktur wird mit den Informationen über diesen Alias gefüllt. Diese Struktur ist definiert als: Der physikalische Name / Pfad wird im SzPhyName-Feld der DBDesc-Struktur enthalten sein. Mögliche Rückgabewerte für die DBIGetDatbaseDesc Funktion sind: DBIERRNONE Die Datenbank Beschreibung für pszName wurde erfolgreich abgerufen. DBIERROBJNOTFOUND Die in pszName angegebene Datenbank wurde nicht gefunden. Das folgende Codebeispiel zeigt, wie die physikalische Pfadname einer TTable-Komponente zu erhalten mit dem DBDEMOS alias: var 160160vDBDesc: dbdesc 160160DirTable: string beginnen 160160Check (DbiGetDatabaseDesc (PChar (Table1.DatabaseName), vDBDesc)) 160160DirTable: Format (ss, vDBDesc. szPhyName, Table1.TableName) 160160ShowMessage (DirTable) end Hier sind drei Möglichkeiten, um den Pfad mit einem Alias verbunden. A) nur für permanente Aliasnamen. b) works on BDE and local aliases and c) works with BDE and local aliases as well as with tables with a hardcoded path, using DBI calls. a) For permanent aliases only function GetDBPath1(AliasName: string): TFileName var 160160ParamList: TStringList begin 160160ParamList : TStringList. Create 160160with Session do 160160try 160160160160GetAliasParams(AliasName, ParamList) 160160160160Result : UpperCase(ParamList. ValuesPATH) 160160finally 160160160160Paramlist. Free 160160end end b) Works on BDE and local aliases function GetDBPath2(AliasName: string): TFileName var 160160ParamList: TStringList 160160i: integer begin 160160ParamList : TStringList. Create 160160with Session do 160160try 160160160160try 160160160160160160GetAliasParams(AliasName, ParamList) 160160160160except 160160160160160160for i : 0 to pred(DatabaseCount) do 160160160160160160160160if (Databasesi. DatabaseName AliasName) then 160160160160160160160160160160ParamList. Assign(Databasesi. Params) 160160160160end 160160160160Result : UpperCase(ParamList. ValuesPATH) 160160finally 160160160160Paramlist. Free 160160end end c) The following example assumes the TTable being active function GetDBPath3(ATable: TTable): TFileName var 160160TblProps: CURProps 160160pTblName, pFullName: DBITblName begin 160160with ATable do 160160begin 160160160160AnsiToNative(Locale, TableName, pTblName, 255) 160160160160Check(DBIGetCursorProps(Handle, TblProps)) 160160160160Check(DBIFormFullName(DBHandle, pTblName, TblProps. szTableType, pFullName)) 160160160160Result : ExtractFilePath(StrPas(pFullName)) 160160end end This article illustrates the usage of the TInifile object, and gives guideline when and how to use ini files for the storage of personal settings. This article is part of a series of five articles about preserving user sensitive settings. INI-files are meant to retain settings between instances of your applications. Their structure is very simple, which limits their functionality. This article explains the structure of ini files, and the basics of how to read and write them from Delphi. Structure of ini files Lets first have a look at the structure of ini-files. Basically, an ini file has a number of blocks, enclosed in square brackets, and every block has some settings. Example: here is a part of my W2000 win. ini file: Note-1This section is required only to install the optional WinZip Internet Browser Support build 0231. Note-2Removing this section of the win. ini will have no effect except preventing installation of WinZip Internet Browser Support build 0231. MAPI 1.0 Time Zone StandardNameGMT Standard Time DaylightNameGMT Daylight Time We have blocks between square brackets, such as The data behind an item name can be alphabetical, numeric or boolean. Binary data is limited to those data which does no contains a 0 or CR/LF. Blank lines may be used between the blocks. As you can see above, many applications use the win. ini file to store settings-information. You are free to choose the win. ini file. If you have just a few settings, this may be the right choice. Other applications should not suffer in any way. If you have more than one block of information, it is preferable to define your own ini file. Writing ini-files from Delphi Delphi provides us with a TIniFile object. This object is defined in the unit ini-files. Add this unit to your uses clause. Then create : You may or may not include a path with the filename. If you dont, windows will assume it must be created in the windows directory. This is the default. By using the ExtractFileDir(Application. Exename), you can easily create ini-files in the directory in which your application is created. Simply pass the entire path with the file name. If the file already exists, windows will open it. If it does not, windows will create it. The next thing you will want is to write some information to it. We will construct a small demo application. Start your Delphi, choose new application, and save your form as formDemoIniFile, and your project as DemoIniFile. Put a textbox, a SaveFile dialog and an OpenDialog component on your form. Next, drop two buttons on your form, and call them btnExit and btnOpenFile. In the btnOpenFileClick event, write: procedure TForm1.btnFileOpenClick(Sender: TObject) var 160160lIniFileVar: TIniFile begin 160160OpenDialog1.Filter : Text files. txtAll files. 160160if OpenDialog1.execute then 160160begin 160160160160edit1.text : OpenDialog1.FileName 160160160160lIniFileVar : TIniFile. create(DemoApp. ini) 160160160160lIniFileVar. WriteString(OPENEDFILES, OPENDIALOG1, edit1.text) 160160160160lIniFileVar. WriteString(OPENEDFILES, OPENDIALOG1LASTDIR, 160160160160160160ExtractFileDir(edit1.text)) 160160160160lIniFileVar. free 160160end end lIniFileVar is a local variable in this routine of th type TIniFile. When we create it, we pass the filename, in this case DemoApp. ini. Next we use the WriteString method to write the contents of to the edit1.text to the inifile. We specify this string must be stored in the block OPENEDFILES and that the item name OPENDIALOG1. next we also write the directory. After we have run this program, the result might look: Writing numeric data is essentially the same, and so is writing booleans. Reading them from Delphi Of course we gain nothing when we can write data but cannt read them. So we expand our example a bit with a few lines to read the previous data before we present the OpenFileDialog. procedure TForm1.btnFileOpenClick(Sender: TObject) var 160160lIniFileVar: TIniFile begin 160160// read old data and assign them to OpenFile dialog. 160160lIniFileVar : TIniFile. create(DemoApp. ini) 160160OpenDialog1.FileName : lIniFileVar. ReadString(OPENEDFILES, OPENDIALOG1, ) 160160OpenDialog1.InitialDir : lIniFileVar. ReadString(OPENEDFILES, 160160160160160160160160160160160160160160160160 OPENDIALOG1LASTDIR, ) 160160lIniFileVar. Free 160160OpenDialog1.Filter : Text files. txtAll files. 160160// ask user to open file 160160if OpenDialog1.execute then 160160begin 160160160160edit1.text : OpenDialog1.FileName 160160160160// Store new file data in ini file. 160160160160lIniFileVar : TIniFile. create(DemoApp. ini) 160160160160lIniFileVar. WriteString(OPENEDFILES, OPENDIALOG1, edit1.text) 160160160160lIniFileVar. WriteString(OPENEDFILES, OPENDIALOG1LASTDIR, 160160160160160160ExtractFileDir(edit1.text)) 160160160160lIniFileVar. free 160160end end Note that the ReadString Function requires a third argument, this is the default value. Note that one may use the ReadSectionValues (const Section: string Strings: TStrings) method to read all values of an entire section. There are some circumstances in which you might want to read an entire block (also called section). If you wish to use this function, some Delphi hacking might be useful. By default, the buffer for the reading sections is 16K. You can upgrade this to 32K no problem.160160 Simply start Delphi, open Program FilesBorlandDelphi5SourceVclinifil. pas, and look for the ReadSection and ReadSections procedures. Both have a constant : Change this constant to 32768 and you claim double the amount of memory. When you study this unit, you will find that all methods boil down to usage of the windows WritePrivateProfileString and GetPrivateProfileString functions. The unit has no WriteSectionValues procedure. Should you wish, it can be easily added. 160160160160 procedure TCustomIniFile. WriteSectionValues(const Section: 160160string Strings: TStrings) var 160160KeyList: TStringList 160160i: Integer begin 160160KeyList : TStringList. Create 160160for i : 0 to Strings. Count - 1 do 160160begin 160160160160WriteString(Section, Strings. Namesi, 160160160160160160Strings. ValuesStrings. Namesi) 160160end end There is an alternative for the usage of the TInifile object. Any TStringList has a LoadFromFile and SaveToFile method. Using the Values property, one could extract item values from them, and even change them. But as these methods do not adhere to the windows apis and their rules about file locations, this practice is not recommended. Also, as the Values property does not support usage of sections, this may lead to problems with duplicate item names. You now know how to use ini-files. You should also be aware of its possibilities. As for its limitations: Dont try to store binary data. Neither store strings which contain a CR/LF, as your values can be just 1 line of160160length. In order to give a control the appearance of being transparent, in the WMEraseBkgnd message processing section Im invalidating the rectangle the control covers in the parent controls context and then having the parent control repaint itself in the rectangle thats hidden behind the control. However, this doesnt work when the controls DoubleBuffer property is set to true. Does anyone know how to get this working with double buffered controls VCL double-buffering is ineffective and limited. If you need double-buffering, you will need to implement it yourself. To do this process the WMPAINT message and do something like this: 1) Do your own effective double-buffering: procedure TCustomElPanel. WMPaint(var Msg: TWMPaint) var 160160DC, MemDC: HDC 160160MemBitmap, OldBitmap: HBITMAP 160160PS: TPaintStruct 160160R: TRect 160160ARgn: HRGN begin 160160if (Msg. DC ltgt 0) then 160160160160PaintHandler(Msg) 160160else 160160begin 160160160160DC : GetDC(0) 160160160160MemBitmap : CreateCompatibleBitmap(DC, ClientRect. Right, ClientRect. Bottom) 160160160160ReleaseDC(0, DC) 160160160160MemDC : CreateCompatibleDC(0) 160160160160OldBitmap : SelectObject(MemDC, MemBitmap) 160160160160try 160160160160160160DC : BeginPaint(Handle, PS) 160160160160160160GetClipBox(DC, R) 160160160160160160if IsRectEmpty(R) then 160160160160160160160160R : ClientRect 160160160160160160else 160160160160160160begin 160160160160160160160160InflateRect(R, 1, 1) 160160160160160160end 160160160160160160with R do 160160160160160160160160ARgn : CreateRectRgn(Left, Top, right, Bottom) 160160160160160160SelectClipRgn(MemDC, ARgn) 160160160160160160Perform(WMERASEBKGND, MemDC, MemDC) 160160160160160160Msg. DC : MemDC 160160160160160160WMPaint(Msg) 160160160160160160SelectClipRgn(MemDC, 0) 160160160160160160DeleteObject(ARgn) 160160160160160160Msg. DC : 0 160160160160160160with R do 160160160160160160160160BitBlt(DC, Left, Top, Right, Bottom, MemDC, Left, Top, SRCCOPY) 160160160160160160EndPaint(Handle, PS) 160160160160finally 160160160160160160SelectObject(MemDC, OldBitmap) 160160160160160160DeleteDC(MemDC) 160160160160160160DeleteObject(MemBitmap) 160160160160end 160160end end 2) When painting, ask your parent to draw on your canvas or do the following: if Transparent then begin 160160GetClipBox(Canvas. Handle, Rect) 160160OffsetRect(Rect, Left, Top) 160160RedrawWindow(Parent. Handle, Rect, 0, RDWERASE or RDWINVALIDATE or 160160160160RDWNOCHILDREN or RDWUPDATENOW) 160160begin 160160160160OffsetRect(Rect, - Left, - Top) 160160160160DC : GetDC(Handle) 160160160160bitblt(Canvas. Handle, 0, 0, Rect. Right - Rect. Left, Rect. Bottom - Rect. Top, 160160160160160160DC, Rect. Left, Rect. Top, SRCCOPY) 160160160160ReleaseDC(Handle, DC) 160160end endBoard index raquo delphi raquo Delphi 2007 - IDE just closes Re:Delphi 2007 - IDE just closes Thanks for all the posts, but I think I found the problem. Im using special GExperts version with integrated DelForEx code formater from dummzeuch. de/delphi/gexperts/english. html It seems that the problem only happens when CodeProof option is active in GExperts. After I turned it off, the problem seems to have disappeared. Maybe the IDE should have some kind of protection to avoid plugins to just quotkillquot it without even showing an error message. quotCarlosquot ltwarmboo. hotmailgt escreveu na mensagem news:47d045d01newsgroups. borland. gt Finally I decided to move from TurboDelphi Pro 2006 to Delphi 2007 (latest gt ISO available) and now Im suffering from a very critical problem: gt After loading a project and start working on it, for no apparent reason, gt the IDE just closes No errors or messages is shown. It justs disappears gt Everytime this happens, I loose everything I was doing :-( gt Looks like switching to D2007 was bad decision. gt Anyone suffering with this problem Anything that can be done Sun, 29 Aug 2010 21:25:00 GMT Re:Delphi 2007 - IDE just closes Ok, it seems that GExperts was not the guilt. After some days of work with no problems, today I faced the problem again. So, I removed GExperts, and could reproduce the problem in a specific form, when inserting a new OnBeforeInsert event code, and putting the mouse over some declaration (what triggers the help insight tooltip). So, I disabled Tooltip Help Insight, and the problem quotseemsquot to have stoped (lets see if there will be no more surprises) :-( quotCarlosquot ltwarmboo. hotmailgt escreveu na mensagem news:47d054c61newsgroups. borland. gt Thanks for all the posts, but I think I found the problem. gt Im using special GExperts version with integrated DelForEx code formater gt from dummzeuch. de/delphi/gexperts/english. html gt It seems that the problem only happens when CodeProof option is active in gt GExperts. After I turned it off, the problem seems to have disappeared. gt Maybe the IDE should have some kind of protection to avoid plugins to just gt quotkillquot it without even showing an error message. gt quotCarlosquot ltwarmboo. hotmailgt escreveu na mensagem gt news:47d045d01newsgroups. borland. gtgt Finally I decided to move from TurboDelphi Pro 2006 to Delphi 2007 gtgt (latest ISO available) and now Im suffering from a very critical gtgt problem: gtgt After loading a project and start working on it, for no apparent reason, gtgt the IDE just closes No errors or messages is shown. It justs disappears gtgt Everytime this happens, I loose everything I was doing :-( gtgt Looks like switching to D2007 was bad decision. gtgt Anyone suffering with this problem Anything that can be done Other Threads
No comments:
Post a Comment