培养游戏设计与开发精英 网站地图 | 联系我们
首页 | 学校简介 | 课程设置 | 师资力量 | 权威认证 | 开班信息 | 在线服务 | 学员天地 | 就业广场 | 学院新闻 | 媒体关注 | 交通指南
招生办公告栏

报名/咨询热线:

027-87685520、67863577

点此浏览最新一期招生简章 点此直接在线报名
游戏课程体系
汇众益智游戏学院
v4.0专业课程设置
游戏策划课程
游戏美术设计
游戏程序设计
权威专业资格认证
最新开班信息
汇众益智所获荣誉
游戏课程相关
点此浏览汇众益智游戏学院简介
《学校简介》
点此浏览就业广场栏目
《课程设置》
点此浏览最新一期招生简章
《招生简章》
专题讲座
《专题讲座》
点此进入学员天地栏目
《学员天地》
点此浏览就业广场栏目
《就业广场》
你现在的位置:首页 >> 网游 >> 正文 网游
怎样让移动图像显示更快一些...
发布:武汉游戏学院 来源:www.gamedu.org

***怎样让移动图像显示更快一些***
Hide Controls When Setting Properties to Avoid Multiple Repaints
Every repaint is expensive. The fewer repaints Visual Basic must perform, the faster your application will appear. One way to reduce the number of repaints is to make controls invisible while you are manipulating them. For example, suppose you want to resize several list boxes in the Resize event for the form:

Sub Form_Resize ()Dim i As Integer, sHeight As Integer sHeight = ScaleHeight / 4 For i = 0 To 3 lstDisplay(i).Move 0, i * sHeight, _ ScaleWidth, sHeight NextEnd SubThis creates four separate repaints, one for each list box. You can reduce the number of repaints by placing all the list boxes within a picture box, and hiding the picture box before you move and size the list boxes. Then, when you make the picture box visible again, all of

the list boxes are painted in a single pass:

在vb中用move方法移动图片时,速度有些慢,当图片很大时,这时可以用下面的方法:Sub Form_Resize ()Dim i As Integer, sHeight As Integer picContainer.Visible = False picContainer.Move 0, 0, ScaleWidth, ScaleHeight sHeight = ScaleHeight / 4 For i = 0 To 3 lstDisplay(i).Move 0, i * sHeight, _ ScaleWidth, sHeight Next picContainer.Visible = TrueEnd SubNote that this example uses the Move method instead of setting the Top and Left properties. The Move method sets both properties in a single operation, saving additional repaints.

  • 上一篇文章:
  • 下一篇文章:
  • 常用功能:[收藏本页] [在线咨询] [在线报名] [联系我们] [关于我们]

    联系电话:027-87685520 027-67863577 全省报名咨询电话(免长话费):400-811-8830

    地 址:武汉市洪山区广埠屯资讯广场B座6楼(华中师范大学北门) >> 详细交通指南

    版权声明:Copyright 2008© 汇众益智游戏学院武汉校区.All Rights Reserved