QQ 窗口

chenguying 2003-11-21 12:13:35
我做了一个窗口,如何实现将他拖到显示器边缘的时候,鼠标离开隐藏,鼠标放到上面再出现,就像 QQ 那样。
...全文
41 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
seaskycj 2004-01-06
  • 打赏
  • 举报
回复
gz
chenhao1949 2003-12-28
  • 打赏
  • 举报
回复
你好这么简单的问题你还问呀!
你可以自己找资料看看呀!
jf_xs 2003-12-28
  • 打赏
  • 举报
回复
if ((this.y<=0) or (this.x<=0)) then
if (((pointerx()<this.x) or (pointerx()>this.x+this.Width - 18))) then
if this.x<=0 then
this.x = -(this.Width - 24)//隐藏
end if
elseif ((pointery()<this.y - 50) or (pointery()>this.y+this.Height - 80) or (pointerx() < this.x) or (pointerx() > this.x+this.Width) ) then
if this.y<=0 then
this.y = -(this.Height - 10) //隐藏
end if
end if

if this.x<=0 then
if ((pointerx()<=this.width) and (pointery()>this.y) and &
(pointery()<this.y + this.Height)) then
this.x = 0;
end if
end if

if this.y<=0 then
if ((pointery()<=this.height) and (pointerx()>this.x) and &
(pointerx()<this.x+this.width)) then
this.y = 0;
end if
end if
end if

不知这个是不是你想要的!
把它放在timer事件里,最好触发时间短一点,一般设成0.1秒的触发时间就可以了
tommyhuanglei 2003-11-24
  • 打赏
  • 举报
回复
不用api就可以你计算一下显示器的数值大小,然后判断窗口的位置,如果在屏幕的边缘,鼠标离开的时候就把窗口移到最边上,留一点边在屏幕上,然后当鼠标在窗口的边上的时候把窗口移动到屏幕里面就可以了!
dawei71141812003 2003-11-24
  • 打赏
  • 举报
回复
你可以先判断鼠标的位置是不是在应用程序的窗口中,如果在高把应用程序的窗口高设大一点,如果不在,就设很小(跟QQ一样,在上面还有一丝可以看到)
mittee 2003-11-21
  • 打赏
  • 举报
回复
查一些api函数,能实现
chenguying 2003-11-21
  • 打赏
  • 举报
回复
如何实现啊?请楼上的老兄指点指点!
最好写出实现方法,分数可以再加!!!
xuStanly 2003-11-21
  • 打赏
  • 举报
回复
不用API也能实现。

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧