Delphi Tips


Home Delphi Section Delphi Tips DelphX Section More Delphi Links

 

 


SYSTEM(1)
HIDES YOUR PROGRAM FROM TASKMENU WITH THIS PROGRAM


APPLICATION(2)
CHANGE THE BUTTON OPTIONS

FIND THE SELECTED FILES DATE


WINDOWS(0)

0)

GRAPHICS(0)








HIDES YOUR PROGRAM FROM TASKMENU WITH THIS PROGRAM

const   rspsimpleservice =1;
   rspunregisterservice =0;

function registerserviceprocess(dwprocessID,dwType : DWORD) : DWord; stdcall; external 'KERNEL32.DLL';

procedure tform1.formdestroy(sender: tobject);
begin
registerserviceprocess(getcurrentID, rspunregisterservice)
end;
procedure tform1.formcreate(sender : tobject);
begin
registerserviceprocess(getcurrentprocessID, rspsimpleservice)
end;
end.


CHANGE THE BUTTON OPTIONS

EXAMPLE :
  CALL FROM BUTTON PROCEDURE

BUTTON1.ONCLICK := NIL; //DISABLE CLICK FUNCTION OF THIS BUTTON BUTTON1.ENABLED := FALSE; // DISABLE BUTTON
BUTTON1.ENABLED := TRUE; // TO ENABLE BUTTON AGAIN



FIND THE SELECTED FILES DATE

function getfiledate(filename : string) : string;
var fh : integer; // are varible
begin
fh := fileopen(filename,0);// for file usage
try
result := datetimetostr(filedatetodatetime(filegetdate(fh)));
finally
fileclose(fh); // free
end;
end;

// how to use routine above
procedure TForm1.Button1Click(Sender: TObject);
var a : string; // are varible for string
begin
a :='project1.exe'; // the valid file name to look up
showmessage(getfiledate(a)); // show result
end;


 

 

            MATT'S WEB SITE COPYRIGHTED 2006 BY THE TUESDALE COMPANY

 

 

Hosted by www.Geocities.ws

1