unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Image1: TImage;
    ComboBox1: TComboBox;
    procedure ComboBox1Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if Combobox1.ItemIndex=0 then
begin
ShellExecute(handle, nil,'shutdown',' -s -t 00','', SW_SHOWNORMAL);
end;

if Combobox1.ItemIndex=1 then
begin
ShellExecute(handle, nil,'shutdown',' -r','', SW_SHOWNORMAL);
end;

if Combobox1.ItemIndex=2 then
begin
ShellExecute(handle, nil,'shutdown',' -l','', SW_SHOWNORMAL);
end;

end;

end.
