An application desktop toolbar (also called an appbar) is a window that is similar to the Microsoft® Windows® taskbar. It is anchored to an edge of the screen, and it typically contains buttons that give the user quick access to other applications and windows. The system prevents other applications from using the desktop area occupied by an appbar. Any number of appbars can exist on the desktop at any given time.
很简单!只要判断鼠标的位置是不是〉=边缘,我做过类似的程序!要者留下e_mail.
if mouse.CursorPos.x <=0 then hide else show;
procedure TForm1.Timer1Timer(Sender: TObject); begin if Mouse.CursorPos.x <=0 then Hide else Show; end;
用SHAppDataMessage函数注册一个那样的窗口
给分
自动隐藏好像不行。。
APPBAR里面有自动隐藏的属性的
能给我一份原码么?
我可以开贴另外加分!!
[email protected]
谢谢
[email protected]
{
POINT pt;
RECT rcWindow;
GetClientRect( &rcWindow );
ClientToScreen(&rcWindow);
GetCursorPos( &pt );
if(pt.x >= rcWindow.right ¦¦ pt.x <= rcWindow.left
¦¦ pt.y <=rcWindow.top¦¦ pt.y >=rcWindow.bottom)
{
CRect rect;
GetWindowRect(rect);
MoveWindow(rect.left,-100,rect.Width(),103,true);
}
return 0;
}void CxxxDlg::OnTimer(UINT nIDEvent)
{
POINT pt;
RECT rcWindow;
GetClientRect( &rcWindow );
ClientToScreen(&rcWindow);
GetCursorPos( &pt );
if(pt.x <rcWindow.right &&pt.x >rcWindow.left
&& pt.y >=rcWindow.top && pt.y <= rcWindow.bottom+3)
{
CRect rect;
GetWindowRect(rect);
MoveWindow(rect.left,0,rect.Width(),150,true);
}
CDialog::OnTimer(nIDEvent); CDialog::OnTimer(nIDEvent);
}void CxxxDlg::OnMouseMove(UINT nFlags, CPoint point)
{
TRACKMOUSEEVENT stTRACKMOUSEEVENT;
stTRACKMOUSEEVENT.cbSize = sizeof(stTRACKMOUSEEVENT);
stTRACKMOUSEEVENT.hwndTrack=m_hWnd;
stTRACKMOUSEEVENT.dwFlags=TME_LEAVE;
_TrackMouseEvent(&stTRACKMOUSEEVENT);
CDialog::OnMouseMove(nFlags, point);
}
OnTimer() 起什么用呀?
如果在边上就movewindow成一小条。
看一看咯!祝你好运
{
if form.top=0
form.hide //or 自己处理隐藏的细节
}
能给我一份原码么?
[email protected]
我开贴另外加分!!
谢谢!
现在不去vchelp了。
有的给我一份吧
看看msdn帮助吧 很详细!
begin
if Mouse.CursorPos.x <=0 then Hide else Show;
end;
能给我一份原码么?
[email protected]
谢谢!
在WM_TIMER消息中不停的扫描鼠标指针的位置 发现鼠标指针靠近那一边就把window移出来
MoveWindow把它移到外面去啊!用定时器控制速度。
谢谢,给我来一份源码可以吗?
[email protected]