惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
I
InfoQ
B
Blog RSS Feed
T
Threatpost
博客园_首页
M
MIT News - Artificial intelligence
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
U
Unit 42
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
Scott Helme
Scott Helme
T
Tor Project blog
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
S
Schneier on Security
Vercel News
Vercel News
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
L
LangChain Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
Latest news
Latest news
C
CXSECURITY Database RSS Feed - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
S
Security Affairs
A
About on SuperTechFans
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
W
WeLiveSecurity
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客

博客园 - 小洋房

防止中文程序在英文系统上乱码 [Delphi] 快速获取文件大小 SQL Server2005中四种排名函数的使用 Delphi字符串函数大全 DateUtils-Function 用Delphi创建服务程序 - 小洋房 - 博客园 由图像的灰度化看基本图像处理 [转摘]Indy10,采用线程,发送电子邮件 如何过XP的防火墙而不被拦截 安装MSDE 2000 自动安装SQL Server数据库 现有 Delphi 项目迁移到 Tiburon 中的注意事项 Delphi中的字符串(转) Delphi之通过崩溃地址找出源代码的出错行 Format函数详解 更改Delphi系统的默认字体 delphi指针 关于基础类数据结构的设计想法 判断SQL SERVER 服务是否断开
Playing With System Using Delphi
小洋房 · 2006-10-25 · via 博客园 - 小洋房

1.Open/close CD ROM
Uses mmsystem;
mciSendString('Set cdaudio door open wait', nil, 0, handle);  to open
mciSendString('Set cdaudio door closed wait', nil, 0, handle);  to close

2.Monitor stand by
Uses Shellapi;
SendMessage(Application.Handle, wm_SysCommand, SC_MonitorPower, 0) ;

3.Hide/show application on task bar
Uses Shellapi;
ShowWindow(application.handle, SW_hide);  to hide
ShowWindow(application.handle, SW_restore);  to show

4.Hide/show application on task list (task display when you press Ctrl+Alt+Del)
implementation
function RegisterServiceProcess(idProcess,dwType : Integer):Integer; stdcall; external 'KERNEL32.Dll';
...........
on your event handler
RegisterServiceProcess(GetCurrentProcessID, 0); to show
RegisterServiceProcess(GetCurrentProcessID, 1); to hide

5.Hide/show start button
Uses Shellapi;
ShowWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),1);    to show
ShowWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),0);    to hide
EnableWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),True);  to enable start button
EnableWindow(FindWindowEx(FindWindow('Shell_traywnd',nil),0,'Button',nil),False);  to disable start button

6.Hide/show task bar
Uses Shellapi;
ShowWindow(FindWindow('shell_traywnd',nil),1); to show
ShowWindow(FindWindow('shell_traywnd',nil),0); to hide
EnableWindow(FindWindow('shell_traywnd',nil),True); enable task bar
EnableWindow(FindWindow('shell_traywnd',nil),False); disable task bar

7.Hide/show desktop
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

8.Hide/show clock
Uses Shellapi;
ShowWindow(FindWindowEx(FindWindowEx(FindWindow('shell_traywnd',nil),0,'TrayNotifyWnd',nil),0,'TrayClockWClass',nil),1);  to show
ShowWindow(FindWindowEx(FindWindowEx(FindWindow('shell_traywnd',nil),0,'TrayNotifyWnd',nil),0,'TrayClockWClass',nil),0);  to hide

9.Shutdown/restart windows
Uses Shellapi;
ExitWindowsEx(ewx_Shutdown,0);  to shutdown
ExitWindowsEx(ewx_Reboot,0);  to restart
ExitWindowsEx(ewx_Poweroff,0);  to off your computer power

10.Scrolling Caption
procedure TForm1.Timer1Timer(Sender: TObject);
var  j : Integer;
     MyString: String;
     ScrollingCap: string;
begin
MyString := form1.Caption; //gives the title of your form that sits on the tastbar the caption of your form
form1.Caption:=ScrollingCap;
for j := 1 to Length(Scrollingcap) do //going from 1 to the length of chars in Scrollingcap
ScrollingCap[j] := MyString[j + 1];
ScrollingCap[Length(ScrollingCap)] := MyString[1];
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Scrollingcap:=form1.caption;
end;