Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Surprise!


Reply
Views: 1549  
Thread Tools Rate Thread
  #1  
Old 08-20-2010, 10:43 AM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default Surprise!

This hint is a little surprise. So, you'd have to either read the code and understand what it does or try it out!
  1. Create a new application (select "File | New Application" from the main menu)
  2. Select the empty form and double click on it's "OnResize" event
  3. Change the generated "FormResize()" function to look like the following and run the program.

procedure TForm1.FormResize( Sender: TObject );
var
R : TRect;
DC : HDc;
Canv : TCanvas;
begin
R := Rect( 0, 0, Screen.Width, Screen.Height );
DC := GetWindowDC( GetDeskTopWindow );
Canv := TCanvas.Create;

Canv.Handle := DC;
Canvas.CopyRect( R, Canv, R );
ReleaseDC( GetDeskTopWindow, DC );
end;

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)