안녕 하세요?
BacTeria 박종민 입니다.
다음은 Tray Bar 옆에 시간 나오죠? 거기 옆에 버튼을 넣는 소스 입니다.
응용 하시면 글자도 넣을 수 있습니다.
자세한건 도움말을 참고 하세요...
---------------------------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
GetHandle: HWND;
Rect: TRect;
Value: Byte;
begin
GetHandle := FindWindow('Shell_TrayWnd', nil);
GetHandle := FindWindowEx(GetHandle, 0, 'TrayNotifyWnd', nil);
GetWindowRect(GetHandle, Rect);
Value := 50;
MoveWindow(GetHandle, Rect.Left - Value, 0,
Rect.Right - Rect.Left + Value - 2, Rect.Bottom - Rect.Top, True);
GetHandle := CreateWindow('BUTTON', '연습', WS_CHILD, Rect.Right - Rect.Left,
1, Value - 5, Rect.Bottom - Rect.Top - 4, GetHandle, 0, 0, nil);
ShowWindow(GetHandle, SW_SHOW);
end;
|