unit msgs;

interface

uses
  Windows, Messages, SysUtils, Forms, Classes, Controls, KsButtons, StdCtrls, 
  KsSkinButtons, KsHooks,
  KsForms, KsSkinForms, KsMessages, KsSkinMessages, KsListBoxs,
  KsSkinListBoxs, Mask, KsEdits, KsSkinEdits, KsCheckBoxs,
  KsSkinCheckBoxs, KsControls, KsGroupBoxs, KsSkinGroupBoxs;

type
  TfrmMsg = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    NgRadioGroup1: TSeSkinRadioGroup;
    NgRadioGroup2: TSeSkinRadioGroup;
    NgCheckBox1: TSeSkinCheckBox;
    NgEdit1: TSeSkinEdit;
    NgListBox1: TSeSkinListBox;
    NgMessage1: TSeSkinMessage;
    NgForm1: TSeSkinForm;
    NgButton1: TSeSkinButton;
    NgButton2: TSeSkinButton;
    procedure FormCreate(Sender: TObject);
    procedure NgButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMsg: TfrmMsg;

implementation

uses Main, KsEffects, Dialogs;

{$R *.DFM}

procedure TfrmMsg.FormCreate(Sender: TObject);
begin
  NgListBox1.State[2] := cbChecked;
end;

procedure TfrmMsg.NgButton1Click(Sender: TObject);
var
  Btns: TMsgDlgButtons;
  i: integer;
begin
  Btns := [];
  for i := 0 to NGListBox1.Items.Count - 1 do
    if NGListBox1.State[i] = cbChecked then
      Btns := Btns + [TMsgDlgBtn(i)];

  NGMessage1.DropShadow := NGCheckBox1.Checked;
  NGMessage1.ShowAnimation := TKsAnimation(NgRadioGroup2.ItemIndex);
  NGMessage1.MessageDlg(NGEdit1.Text, TMsgDlgType(NGRadioGroup1.ItemIndex),
    Btns, 0);
end;

end.
