was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

34 Visitors Online


 
...ein transparentes Formular ohne Code erzeugen (D6)?
Autor: JodeQa
[ Tip ausdrucken ]  

Tip Bewertung (23):  
     


{
  this is very simple, actually .. you don't need to coding any single line :)
  practically, you just have to set 3 TForm properties
  1. Color
  2. TransparentColorValue
  3. TransparentColor

  For example, just put 1 TButton on the form, then set the form properties :
  1. Color := clBlue
  2. TransparentColorValue := clBlue
  3. TransparentColor := True

  better set the TForm.BorderStyle to bsNone
  RUN .. you'll see only TButton

  logically, you must set TForm.Color same with TForm.TransparentColorValue

  Next Example, let s create 2 TShape

  +-----------+
  |  clWhite
  |           |
  |     +----------+
  |     |  clBlue  |
  +-----|          |
        |          |
        |          |
        +----------+

  then set the form properties :
  1. Color := clBlue
  2. TransparentColorValue := clBlue
  3. TransparentColor := True

  +-----------+
  |  clWhite
  |           |
  |     +-----+
  |     |
  +-----+

  you can also use Bitmap/picture, but it a litte bit tricky, you need a color picker / eye dropper tool,
  to find out the color value for the color i wish to 'remove'
  i use CorelPhotoPaint EyeDropper tool
  after you find the RGB color value, repeat the steps

  tips : if you don't know how to set the RGB value into your TForm Properties
         double click on the "white space" in TForm.Color / TForm.TransparentColorValue property value
         it will bring you Windows color Picker Dialog,


  then, just RUN your program :)
}


 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners