Would you like to react to this message? Create an account in a few clicks or log in to continue.


Bismil Team Groub
 
AnasayfaAramaLatest imagesKayıt OlGiriş yap

 

 windows oturumunu delphi ile kapatın

Aşağa gitmek 
YazarMesaj
dynamic
Co Admin
Co Admin
dynamic


Mesaj Sayısı : 220
Kayıt tarihi : 25/09/08
Yaş : 34

windows oturumunu delphi ile kapatın Empty
MesajKonu: windows oturumunu delphi ile kapatın   windows oturumunu delphi ile kapatın Icon_minitimeSalı Ekim 21, 2008 6:06 am

windows oturumunu delphi ile kapatın Resim1nq8

unit Unit1;

interface

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

type
TForm1 = class(TForm)
Label1: TLabel;
Button1: TButton;
Label2: TLabel;
Timer1: TTimer;
Label3: TLabel;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
function Uptime: string;
var
count,
days,
min,
hours,
seconds : longint;
begin
Count := GetTickCount();
Count := Count div 1000;
Days := Count div (24 * 3600);
if Days > 0 then
Count := Count - (24 * 3600 * Days);
Hours := Count div 3600;
if Hours > 0 then
Count := Count - (3600 * Hours);
Min := Count div 60;
Seconds := Count mod 60;
Result := IntToStr(Days)+' GÜN '+IntToStr(Hours)+
' SAAT '+IntToStr(Min)+' DAKİKA '+
IntToStr(seconds) +' SANİYE '+'BİLGİSAYARINIZ AÇIK OLARAK GÖRÜNÜYOR';
end;
begin
Label1.Caption:=Uptime;
end;
procedure TForm1.Button1Click(Sender: TObject);

var c:boolean;
x:integer;
begin
x:=Application.MessageBox('WİNDOWS OTURUMU KAPATACAKTIR ONAYLIYORMUSUNUZ..?','ReStart',MB_YESNO);
if (x=IDYES) then
begin
c:=ExitWindowsEx(EWX_REBOOT,2);
if (c=false) then
ShowMessage('KAPATILMA İPTAL EDİLMEKTEDİR..');
end;


end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
label3.Caption:= timetostr(time);
end;

end.
Sayfa başına dön Aşağa gitmek
 
windows oturumunu delphi ile kapatın
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» DeLphi 7 EnterPrise
» Delphi Örnek Prg
» Delphi Veritabanı ve Görsel Eğitim Seti

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
 :: BT Bilgisayar ve Teknolojisi :: Programlama :: Delphi / Pascal-
Buraya geçin: