Hello agus,

Wednesday, September 24, 2003, 1:22:43 AM, you wrote:

as> 1. Apakah tombol Alt+F4 bisa di nonaktifkan, karena   
as> jika tombol tersebut ditekan maka program saya pun
as> akan keluar / berhenti
as> 2. Bagaimanakah menyimpan program password saya
as> didalam startup, dan saya ingin program saya itu di
as> load pertama kali sebelum program lainnya.

1. gini lho (dari www.delphipages.com)

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := CloseVariable;
//If CloseVariable is true it will close, but if false, it will not.
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
CloseVariable := True;  //Allows it to close
Close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
CloseVariable := False;
end;

****

2. begini (dari www.swissdelphicenter.com)

Uses
  Registry;

procedure SetAutoStart(AppName, AppTitle: string; register: boolean);
const
   RegKey = '\Software\Microsoft\Windows\CurrentVersion\Run';
   // or: RegKey = '\Software\Microsoft\Windows\CurrentVersion\RunOnce';
var
  Registry: TRegistry;
begin
  Registry := TRegistry.Create;
  try
    Registry.RootKey := HKEY_LOCAL_MACHINE;
    if Registry.OpenKey(RegKey, False) then
    begin
      if register = false then
        Registry.DeleteValue(AppTitle)
      else
        Registry.WriteString(AppTitle, AppName);
    end;
  finally
    Registry.Free;
  end;
end;

// Example:

procedure TForm1.Button1Click(Sender: TObject);
begin
  // 1.Parameter: Path to your Exe-File
  // 2. Parameter: the Title of your Application
  // 3. Set (true) or Unset (false) Autorun
  SetAutoStart(ParamStr(0),'Title of your Application',true);

end;

*****

NB: download aja program Tips Explorer di files section delphindo.
ada +3100 delphi tips dari berbagai website

-- 
Best regards,
 Irwan
 [EMAIL PROTECTED]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/i7folB/TM
---------------------------------------------------------------------~->

Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Kirim email ke