11-03-2010, 05:27 PM
اخي الكريم TF6M بارك الله فيك على هكذا درس . و لكن هناك ملاحظة :
لماذا انشئت ال Thread في ال [FONT=Simplified Arabic Fixed]initialization وحررته في ال finalization
[FONT=Simplified Arabic Fixed]:
ثم صرحت بانشائه في الحدث OnClick للزر :
اقصد ان اقول ان ال Thread قد تم انشاءه مع ال [FONT=Simplified Arabic Fixed]initialization فقط Suspended .
[FONT=Simplified Arabic Fixed]
لماذا انشئت ال Thread في ال [FONT=Simplified Arabic Fixed]initialization وحررته في ال finalization
[FONT=Simplified Arabic Fixed]:
كود :
[COLOR=#0000bb][FONT=Simplified Arabic Fixed][COLOR=#0000bb]initialization[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]MyTh[/COLOR][COLOR=#007700]:=[/COLOR][COLOR=#0000bb]MyThread[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Create[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]True[/COLOR][COLOR=#007700][FONT=Simplified Arabic Fixed]);[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]finalization[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]MyTh[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Free[/COLOR][FONT=Simplified Arabic Fixed][COLOR=#007700];[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]end[/COLOR][COLOR=#007700]. [/COLOR][/COLOR]ثم صرحت بانشائه في الحدث OnClick للزر :
كود :
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]procedure TMainFrm[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Button1Click[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]Sender[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#0000bb]TObject[/COLOR][COLOR=#007700][FONT=Simplified Arabic Fixed]);[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]begin[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]MyTh[/COLOR][COLOR=#007700]:=[/COLOR][COLOR=#0000bb]MyThread[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000bb]Create[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]False[/COLOR][FONT=Simplified Arabic Fixed][COLOR=#007700]);[/COLOR]
[FONT=Simplified Arabic Fixed][COLOR=#0000bb]end[/COLOR][COLOR=#007700];[/COLOR]اقصد ان اقول ان ال Thread قد تم انشاءه مع ال [FONT=Simplified Arabic Fixed]initialization فقط Suspended .
[FONT=Simplified Arabic Fixed]

