• 网络学院
  • IT资讯
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
窗体动态效果的实现
  站点:
  • 首 页
  • 最新软件
  • 文章教程
  • 国内软件
  • 国外软件
  • 绿色软件
  • 源码下载
  • 字体下载
窗体动态效果的实现
软件发布 窗体动态效果的实现
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件 绿软下载
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回文章教程首页 >> 文章首页 >> 编程技术 >> PB教程 >> 窗体动态效果的实现

窗体动态效果的实现

添加时间: 2006-2-21 20:00:49  作者: PowerBuilder教程  阅读次数:630   来源: http://www.d9soft.com

       

    最近用pb做了一个触摸屏的程序,项目组要求窗口显示关闭的时候有点动态效果,于是我就写了如下的程序,供大家参考借鉴。

 


  ---------------------------------
  // 实现关闭窗体时的动态效果
  // -------------------------------
  // 函数名:gf_closequery
  // 参数说明:
  //         window    window类型,调用窗口的名字
  //         closetype integer类型,窗口关闭方式,value = 0~10
  // -------------------------------
  // 申明局部变量
  int li_x ,li_y,li_width,li_height,li_ceny,

li_cenx,li_xminusy,li_wminush
  Integer li_gd

  // 取出当前窗口的坐标值、大小值
  li_x = window.x
  li_y = window.y
  li_width = window.width
  li_height = window.height

  // 设置窗体关闭前的动画效果
  // 关键是看哪个值发生了变化——x、y、h、w
  CHOOSE CASE closetype
   CASE 0      // closetype = 0,从下到上逐渐消失
  for li_gd = li_height to 0 step -1
   window.height = li_gd
   window.show()
  next
 CASE 1      // closetype = 1,从上到下逐渐消失
  for li_gd = li_y to li_height+li_y step 1
   window.y = li_gd
   window.height = li_height+li_y - li_gd
   window.show()
  next
 CASE 2      // closetype = 2,从右到左逐渐消失
  for li_gd =  li_width to 0 step -1
   window.width = li_gd
  next
 CASE 3      // closetype = 3,从左到右逐渐消失
  for li_gd =  li_x to li_x+li_width step 1
   window.x = li_gd
   window.width = li_x+li_width - li_gd
   window.show()
   next
  case 4      // closetype = 4,从上下向中间挤压逐渐消失
  li_ceny = li_y+li_height/2
  for li_gd = li_y to li_ceny step 1
   window.y = li_gd




   window.height = li_height - 2*(li_gd - li_y)
  next
 case 5      // closetype = 5,从左右向中间挤压逐渐消失
  li_cenx = li_x+li_width / 2
  for li_gd = li_x to li_cenx step 1
   window.x = li_gd
   window.width = li_width - 2*(li_gd - li_x)
  next
 case 6      // closetype = 6,从左上->右下
  for li_gd = li_y to li_height+li_y step 1
   window.y = li_gd
   window.height = li_height+li_y - li_gd
   if window.x < li_x + li_width then
    window.x = li_x + (li_gd - li_y)
   else
    window.x = li_x + li_width
   end if
   if window.width > 0 then
    window.width = li_x+li_width - window.x
   else
    window.width = 0
   end if
  next
  window.x = li_x + li_width
  window.y = li_height+li_y
  window.width = 0
  window.height = 0
   window.show()
   case 7      // closetype = 7,从右下->左上
  for li_gd = li_height to 0 step -1
   window.height = li_gd
   if window.width > 0 then
    window.width = li_width - (li_height - li_gd)
   else
    window.width = 0
   end if
  next
  window.x = li_x
  window.y = li_y
  window.width = 0
  window.height = 0
  window.show()
 case 8      // closetype = 8,从右上->左下
  for li_gd = li_y to li_height+li_y step 1
   window.y = li_gd
   window.height = li_height+li_y - li_gd
   if window.width > 0 then
    window.width = li_width - (li_gd - li_y)
   else


    window.width = 0
   end if
  next
  window.x = li_x
  window.y = li_height+li_y
  window.width = 0
  window.height = 0
  window.show()
   case 9      // closetype = 9,从左下->右上
  for li_gd = li_x to li_x+li_width step 1
   window.x = li_gd
   window.width = li_width +li_x -li_gd
   if window.height > 0 then
    window.height = li_height -(li_gd - li_x)
   else
    window.height = 0
   end if
  next
  window.x = li_x+li_width
  window.y = li_y
  window.width = 0
  window.height = 0
  window.show()
 case 10      // closetype = 10,从四面到中间
  li_ceny = li_y+li_height/2
  li_cenx = li_x+li_width / 2
  for li_gd = li_y to li_ceny step 1
   window.y = li_gd
   window.height = li_height - 2*(li_gd - li_y)
   if window.x < li_x + li_cenx then
    window.x = li_x + (li_gd - li_y)
   else
    window.x = li_x + li_cenx
   end if
   if window.width > 0 then
    window.width = li_width - 2*(li_gd - li_y)
   else
    window.width = 0
   end if
  next
  window.x = li_cenx
  window.y = li_ceny
  window.width = 0
  window.height = 0
  window.show()
 case else
  window.show()
  window.width = li_width
  window.height = li_height
  window.x = li_x
  window.y = li_y
END CHOOSE
return 0
************************
// 调用该函数在窗体的 closequery 事件中
gf_closequery (w_main,mod(integer(string(now(),"ss")),11))


    上面是关闭时的效果,窗体打开时的动态效果的语句跟上面的差不多,在此就不写啦,如果有需要的可以告诉我,我单独发送。谢谢。

 

上下文章:

 

上一篇文章: PB实现数据窗口动态排序的方法 下一篇文章: 在PB下实现圆形的窗口

相关文章:

  • 飞速在线看视频 傲盾加速帮你实现速度感受
  • Photoshop教程:教你如何创出发丝的炫彩莹亮效果
  • 用端口碰撞技术实现服务器远程管理
  • 模仿景深效果 用PS扫除杂乱背景
  • Photoshop简单的艺术化效果

相关软件:

  • XP内存优化工具任务管理器版(效果非常不错)
  • 窗体属性修改专家 2008 奥运特别版
  • 《靓妹》全动态Web报表试用版Asp.NET适配件(控件) 3.0
  • 动态壁纸王 V3.4
  • 大厅动态显示系统 V1.0
  • ajxpform窗体换肤控件 V2.0

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

编程技术分类导航

  • ASP & ASP.NET教程
  • PHP教程
  • JSP教程
  • C/C++教程
  • VB & VB.NET教程
  • VC教程
  • Delphi教程
  • BCB教程
  • VFP教程
  • PB教程
  • JAVA教程
  • XML教程
  • C#教程
  • CGI教程

本类经典文章推荐

  • 第一章 什么是PowerBuilder
  • 第二章 PowerBuilder 入门之创建新...
  • 第二章 PowerBuilder 入门之定义表...
  • 第二章 PowerBuilder 入门之向数据...
  • 第二章 PowerBuilder 入门之向表中...
  • 第二章 PowerBuilder 入门之创建第...
  • 第二章 PowerBuilder 入门之创建应...
  • 第二章 PowerBuilder 入门之创建第...
  • 第二章 PowerBuilder 入门之创建数...
  • 第二章 PowerBuilder 入门之运行应...

PB教程阅读排行

  • 第二章 PowerBuilder 入门之创建新...
  • 第一章 什么是PowerBuilder
  • 第二章 PowerBuilder 入门之定义表...
  • 第二章 PowerBuilder 入门之向数据...
  • 第二章 PowerBuilder 入门之创建第...
  • 第二章 PowerBuilder 入门之创建应...
  • 第二章 PowerBuilder 入门之向表中...
  • 第二章 PowerBuilder 入门之创建数...
  • 第二章 PowerBuilder 入门之运行应...
  • 第二章 PowerBuilder 入门之创建第...

编程技术阅读总排行

  • VB入门教程之一
  • Java连接数据库实例
  • 第二章 PowerBuilder 入门之创建新...
  • VC++之List Box/Check List Box控...
  • 第一章 什么是PowerBuilder
  • VC++ List Ctrl控件
  • VC++ Combo Box/Combo Box Ex控件
  • 学C++不得不看的一篇文章
  • VB入门教程之二
  • VC++之Button控件

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有