[Delphi Codes] Useful Codes to add into a Delphi Rat

A Place For Programmers Of All Levels To Discuss Programming & Web Building.

Moderator: Community Moderator

Post Reply
User avatar
djfshady
Corporal
Corporal
Posts: 25
Joined: 26 Nov 2010, 20:12
Location: United Kingdom
Been thanked: 5 times
Contact:

[Delphi Codes] Useful Codes to add into a Delphi Rat

Post by djfshady »

These are for more advanced delphi user's as i am not explaining how to add them into delphi (for beginners). sorry beginner's , but i will post a tut on how to shortly. i will also add more codes to this thread.

Open/close CD ROM

Code: Select all

Uses mmsystem;
mciSendString('Set cdaudio door open wait', nil, 0, handle);    to open
mciSendString('Set cdaudio door closed wait', nil, 0, handle);    to close
Hide/show application on task bar

Code: Select all

Uses Shellapi;
ShowWindow(application.handle, SW_hide);  //hide
ShowWindow(application.handle, SW_restore);   //show
Hide/show application in task list

Code: Select all

implementation
function RegisterServiceProcess(idProcess,dwType : Integer):Integer; stdcall; external 'KERNEL32.Dll';
Hide/show start button

Code: Select all

Uses Shellapi;
ShowWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),1);  //show

ShowWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),0);  //hide

EnableWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),True);?    //enable start button

EnableWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),False)?;    //disable start button
Hide/show desktop

Code: Select all

Uses Shellapi;
ShowWindow(FindWindow('progman',nil),1);    //to show
ShowWindow(FindWindow('progman',nil),0);    //to hide
EnableWindow(FindWindow('shell_traywnd',nil),True); //to enable desktop
EnableWindow(FindWindow('shell_traywnd',nil),False); //to disable desktop
Shutdown/Restart windows

Code: Select all

Uses Shellapi;
ExitWindowsEx(ewx_Shutdown,0);    //to shutdown
ExitWindowsEx(ewx_Reboot,0);    //to restart
Image
Post Reply

Return to “Programming/Web Building Chat & Support”