var
Form1: TForm1;
hSysTab,hTray,htime:Hwnd;
implementation
{$R *.DFM}procedure TForm1.GetHandles;
begin
hSysTab:=FindWindow('Shell_TrayWnd', nil);
hSysTab:=FindWindowEx(hSysTab, 0, 'ReBarWindow32', nil); hTray:=FindWindow('Shell_TrayWnd', nil);
hTray:=FindWindowEx(hTray, 0, 'TrayNotifyWnd', nil); hTime:=FindWindow('Shell_TrayWnd', nil);
hTime:=FindWindowEx(hTime, 0, 'TrayNotifyWnd', nil);
hTime:=FindWindowEx(hTime, 0, 'TrayClockWClass', nil);
procedure TForm1.Button1Click(Sender: TObject);
begin GetHandles;
SetWindowPos(hSysTab, 0, 0, 0, 794, 22, SWP_NOMOVE);
SetWindowPos(hTray, 0,790, 0, 300, 22, SWP_SHOWWINDOW);
SetWindowPos(hTime, 0, 0, 0, 102, 20, SWP_NOMOVE);
end;上面的代码可以实现调整宽度,但是系统闪一下,又会恢复原来的宽度。这该怎么做呀.(让调整后不再回去).
Form1: TForm1;
hSysTab,hTray,htime:Hwnd;
implementation
{$R *.DFM}procedure TForm1.GetHandles;
begin
hSysTab:=FindWindow('Shell_TrayWnd', nil);
hSysTab:=FindWindowEx(hSysTab, 0, 'ReBarWindow32', nil); hTray:=FindWindow('Shell_TrayWnd', nil);
hTray:=FindWindowEx(hTray, 0, 'TrayNotifyWnd', nil); hTime:=FindWindow('Shell_TrayWnd', nil);
hTime:=FindWindowEx(hTime, 0, 'TrayNotifyWnd', nil);
hTime:=FindWindowEx(hTime, 0, 'TrayClockWClass', nil);
procedure TForm1.Button1Click(Sender: TObject);
begin GetHandles;
SetWindowPos(hSysTab, 0, 0, 0, 794, 22, SWP_NOMOVE);
SetWindowPos(hTray, 0,790, 0, 300, 22, SWP_SHOWWINDOW);
SetWindowPos(hTime, 0, 0, 0, 102, 20, SWP_NOMOVE);
end;上面的代码可以实现调整宽度,但是系统闪一下,又会恢复原来的宽度。这该怎么做呀.(让调整后不再回去).
他是用鉤子實現換皮膚的系統時鐘。上次我問Kingron,他說很簡單。http://msk.nestor.minsk.by/kg/2005/07/kg50704.html連接有點慢,多刷幾次。