W
wind2000
Unregistered / Unconfirmed
GUEST, unregistred user!
1.电脑用了一段时间后装的软件多了,桌面上也多了很多图标,有时候弄个好看的桌面,可是
被图标给挡住了,看了很不爽!
2.上班的时候上QQ聊天不大好,可是不聊又不行,那么多MM没人陪闷坏了她们可不好,可是信息
一来任务栏上的QQ头像就乱跳,一不小心被老板看到了可不妙,怎么办呢?
===================================================================================
简单写下下面这两段代码,编译后156K,用ASPACK压缩一下只有74K,真正的小巧实用!
1.在桌面上建立Desk.exe和Tray.exe的快捷方式(注意:起始位置要设成两个文件的存放目录)
2.将Desk.exe的快捷方式移到任务栏上
3.运行Desk.exe奇数次隐藏桌面图标,偶数次显示桌面图标
4.运行Tray.exe奇数次隐藏任务栏,偶数次显示任务栏
{源代码如下}
program Desk;
{=============================}
{========桌面隐藏/显示========}
{============彭 涵============}
{============v 0.1============}
{=============================}
uses
Windows,
IniFiles,
SysUtils;
{$R *.res}
var
hDesktop : THandle;
MyIni: TIniFile;
bShow: boolean;
begin
hDesktop := FindWindow('ProgMan', nil);
MyIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Desk.ini');
with MyInido
begin
bShow := ReadBool('SETUP', 'DESKTOP_SHOW', False);
if bShow then
ShowWindow(hDesktop, SW_SHOW)
else
ShowWindow(hDesktop, SW_HIDE);
WriteBool('SETUP', 'DESKTOP_SHOW', not bShow);
UpdateFile;
Free;
end;
end.
program Tray;
{=============================}
{=======任务栏隐藏/显示=======}
{============彭 涵============}
{============v 0.1============}
{=============================}
uses
Windows,
IniFiles,
SysUtils;
{$R *.res}
var
hTray: THandle;
MyIni: TIniFile;
bShow: boolean;
begin
hTray := FindWindow('Shell_TrayWnd', nil);
MyIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Desk.ini');
with MyInido
begin
bShow := ReadBool('SETUP', 'SHELLTRAY_SHOW', False);
if bShow then
ShowWindow(hTray, SW_SHOW)
else
ShowWindow(hTray, SW_HIDE);
WriteBool('SETUP', 'SHELLTRAY_SHOW', not bShow);
UpdateFile;
Free;
end;
end.
被图标给挡住了,看了很不爽!
2.上班的时候上QQ聊天不大好,可是不聊又不行,那么多MM没人陪闷坏了她们可不好,可是信息
一来任务栏上的QQ头像就乱跳,一不小心被老板看到了可不妙,怎么办呢?
===================================================================================
简单写下下面这两段代码,编译后156K,用ASPACK压缩一下只有74K,真正的小巧实用!
1.在桌面上建立Desk.exe和Tray.exe的快捷方式(注意:起始位置要设成两个文件的存放目录)
2.将Desk.exe的快捷方式移到任务栏上
3.运行Desk.exe奇数次隐藏桌面图标,偶数次显示桌面图标
4.运行Tray.exe奇数次隐藏任务栏,偶数次显示任务栏
{源代码如下}
program Desk;
{=============================}
{========桌面隐藏/显示========}
{============彭 涵============}
{============v 0.1============}
{=============================}
uses
Windows,
IniFiles,
SysUtils;
{$R *.res}
var
hDesktop : THandle;
MyIni: TIniFile;
bShow: boolean;
begin
hDesktop := FindWindow('ProgMan', nil);
MyIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Desk.ini');
with MyInido
begin
bShow := ReadBool('SETUP', 'DESKTOP_SHOW', False);
if bShow then
ShowWindow(hDesktop, SW_SHOW)
else
ShowWindow(hDesktop, SW_HIDE);
WriteBool('SETUP', 'DESKTOP_SHOW', not bShow);
UpdateFile;
Free;
end;
end.
program Tray;
{=============================}
{=======任务栏隐藏/显示=======}
{============彭 涵============}
{============v 0.1============}
{=============================}
uses
Windows,
IniFiles,
SysUtils;
{$R *.res}
var
hTray: THandle;
MyIni: TIniFile;
bShow: boolean;
begin
hTray := FindWindow('Shell_TrayWnd', nil);
MyIni := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'Desk.ini');
with MyInido
begin
bShow := ReadBool('SETUP', 'SHELLTRAY_SHOW', False);
if bShow then
ShowWindow(hTray, SW_SHOW)
else
ShowWindow(hTray, SW_HIDE);
WriteBool('SETUP', 'SHELLTRAY_SHOW', not bShow);
UpdateFile;
Free;
end;
end.