Code:
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
for i := 1 to (Timer1.Interval) do
AnalogMeter1.Value := i;
begin
if RadioGroup1.Caption = 'LOGOFF' then
ExitWindowsEx(EWX_LOGOFF,1);
if RadioGroup1.Caption = 'SHUTDOWN' then
ExitWindowsEx(EWX_SHUTDOWN,1);
if RadioGroup1.Caption = 'REBOOT' then
ExitWindowsEx(EWX_REBOOT,2);
if RadioGroup1.Caption = 'FORCE' then
ExitWindowsEx(EWX_FORCE,4);
if RadioGroup1.Caption = 'POWEROFF' then
ExitWindowsEx(EWX_POWEROFF,0);
if RadioGroup1.Caption = 'FORCEIFHUNG' then
ExitWindowsEx(EWX_FORCEIFHUNG,16);
if RadioGroup1.Caption = 'HIBERNATE' then
SetSystemPowerState(False,False);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
for i := 1 to (Timer1.Interval) do
AnalogMeter1.Value := i;
begin
if RadioGroup1.Caption = 'LOGOFF' then
ExitWindowsEx(EWX_LOGOFF,1);
if RadioGroup1.Caption = 'SHUTDOWN' then
ExitWindowsEx(EWX_SHUTDOWN,1);
if RadioGroup1.Caption = 'REBOOT' then
ExitWindowsEx(EWX_REBOOT,2);
if RadioGroup1.Caption = 'FORCE' then
ExitWindowsEx(EWX_FORCE,4);
if RadioGroup1.Caption = 'POWEROFF' then
ExitWindowsEx(EWX_POWEROFF,0);
if RadioGroup1.Caption = 'FORCEIFHUNG' then
ExitWindowsEx(EWX_FORCEIFHUNG,16);
if RadioGroup1.Caption = 'HIBERNATE' then
SetSystemPowerState(False,False);
end;
end;
Probao sam i sa ItemIndex
A ovo radi:
Code:
AnalogMeter1.Value := i;
if RadioButton1.Checked then
ExitWindowsEx(EWX_LOGOFF,0);
if RadioButton2.Checked then
ExitWindowsEx(EWX_SHUTDOWN,0);
if RadioButton3.Checked then
ExitWindowsEx(EWX_REBOOT,0);
if RadioButton4.Checked then
ExitWindowsEx(EWX_FORCE,0);
if RadioButton5.Checked then
ExitWindowsEx(EWX_POWEROFF,0);
if RadioButton6.Checked then
ExitWindowsEx(EWX_FORCEIFHUNG,0);
if RadioButton7.Checked then
SetSystemPowerState(False,False);
AnalogMeter1.Value := i;
if RadioButton1.Checked then
ExitWindowsEx(EWX_LOGOFF,0);
if RadioButton2.Checked then
ExitWindowsEx(EWX_SHUTDOWN,0);
if RadioButton3.Checked then
ExitWindowsEx(EWX_REBOOT,0);
if RadioButton4.Checked then
ExitWindowsEx(EWX_FORCE,0);
if RadioButton5.Checked then
ExitWindowsEx(EWX_POWEROFF,0);
if RadioButton6.Checked then
ExitWindowsEx(EWX_FORCEIFHUNG,0);
if RadioButton7.Checked then
SetSystemPowerState(False,False);
[Ovu poruku je menjao apex dana 12.11.2005. u 15:59 GMT+1]
http://www.polovni-delovi.com - Najveći portal polovnih delova za sve tipove vozila