Recent

Author Topic: Invisible form  (Read 4847 times)

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Invisible form
« on: June 20, 2007, 11:56:21 am »
Here is a code to make a part of your form invisible.

Add
Code: [Select]
Windows to your units
add
Code: [Select]
RGN1, RGN2, rgn3: HRGN; to your variables
Draw a button on your form

Create a OnClick event for that button, then write this inside the code.
Code: [Select]

   RGN1 := CreateRectRgn( 0, -20,100,100);

   SetWindowRgn( Handle, RGN1, True );
   DeleteObject( RGN1 );
   


voila, now compile the program, you will see an only the upper left corner of the form. Change the values after CreateRectRgn to move the hole somewhere els on the form

 

TinyPortal © 2005-2018