procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin if Key = #27 then Close; end; |
procedure TForm1.DGCScreen1Initialize(Sender: TObject); |
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin //If the escape key is pressed fade the palette out and //Close the demo if Key = #27 then begin DGCScreen1.FadePaletteOut(100); // 注目!! Close; end; end; |
DGCScreen1.FadePaletteOut(100); |
procedure TForm1.DGCScreen1Paint(Sender: TObject); begin //The paint event should only be called when surfaces are lost. This //can be caused when application switching with ALT+TAB. DrawFrame; DGCScreen1.Flip; end; |
DGCScreen1.Flip; |
procedure TForm1.DrawFrame; var n: Integer; begin with DGCScreen1.Back.Canvas do begin : : : : Release; //This must be called to release the device context. end; end; |
with DGCScreen1.Back.Canvas do |
Release; //This must be called to release the device context. |
with DGCScreen1.Back.Canvas do begin some canvas method Release; //This must be called to release the device context. end; |
DGCScreen1.FadePaletteIn(100); |
procedure TForm1.DGCScreen1Initialize(Sender: TObject); begin //Draw stuff on the hidden surface DrawFrame; //Quickly fade palette to black DGCScreen1.FadePaletteOut(1); //Flip the hidden surface with the visible one so you can //see it on the screen - but you can't see it yet cause the //palette is still black??? DGCScreen1.Flip; //Finally Smoothly fade the palette in DGCScreen1.FadePaletteIn(100); end; |