Aplikasi bisa dijalankan sekali saja


Tips & Trik Delphi, Tips Belajar Delphi, Belajar Delphi Online
unit Unit1;

interface

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

type

TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

const
NamaAtom =’Program versi demo‘;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
var
atom : integer;
begin
if GlobalFindAtom(NamaAtom) = 0 then
atom := GlobalAddAtom(NamaAtom)
else
begin
ShowMessage(‘Program ini hanya dapat dijalankan sekali dalam satu sesi Windows’ + #10 + #13 +
‘Untuk menjalankan program ini lagi, restart komputer Anda atau silakan‘ + #10 + #13 +
REGISTER !!‘);
Application.Terminate;
end;
end;

end.

TransCODE Software





3 pemikiran pada “Aplikasi bisa dijalankan sekali saja

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s