Тема: Форма
Показать сообщение отдельно
  #2  
Старый 05.05.2011, 10:04
AlexSku AlexSku вне форума
Специалист
 
Регистрация: 07.05.2007
Адрес: Москва
Сообщения: 884
Репутация: 21699
По умолчанию

Один из примеров.
На форму можно положить TShape в виде круга. Делаем TransparentColor=true и совпадающие цвета Form.Color= Form.TransparentColor. Остальные настройки:
Код:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls;

type
  TForm1 = class(TForm)
    Shape1: TShape;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

end.
Код:
object Form1: TForm1
  Left = 227
  Top = 103
  BorderStyle = bsNone
  Caption = 'Form1'
  ClientHeight = 340
  ClientWidth = 376
  Color = clBlack
  TransparentColor = True
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Shape1: TShape
    Left = 0
    Top = 0
    Width = 376
    Height = 340
    Align = alClient            // это не обязательно.
    Brush.Color = clAqua
    Shape = stCircle
  end
end
Ответить с цитированием