我应该怎么做才能使我的高级图形应用程序变得流畅? [英] What should I do to make my high graphical application smooth?
问题描述
我使用过flash(.swf)动画&我的vb.net应用程序中有高质量的图形图像.但是问题在于,有时我单击菜单时会在菜单下显示细线&;需要一些时间来加载它.尽管在该菜单下没有任何行,但在加载其他表单时,它在菜单下显示了行.我有25个表格和每个表格都有高质量的图像(图像尺寸为1280 * 1024).有什么办法可以摆脱这个问题?尽管它的图形和显示效果高,有什么方法可以使我的应用程序流畅?动画的?请帮助我.
I have used flash(.swf) animation & high quality graphical image there in my vb.net application. But problem is that sometimes when I click on menu it shows small line under it & take time to load it. It shows line under menu when load another forms though there is no line under that menu. I have 25 forms & every form has high quality image(image size is 1280*1024). Is there any way to get rid of this problem? Is there any way to make my application smooth though its high graphical & animated? Please help me.
推荐答案
尝试将其放在每种形式的构造函数中:
Try put this in the constructor of each form:
Public Sub New()
MyBase.New()
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.UserPaint, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)
End Sub
在绘制之前使用SuspendLayout形式,完成后使用ResumeLayout.
确保在Paint事件中完成所有绘制.
并查看这些链接的一些想法:
如何在Windows窗体中使用透明图像和标签 [ http://www.bobpowell.net/transcontrols.htm [
Use the form SuspendLayout before drawing and ResumeLayout when done.
Make sure that all the painting is done in the Paint event.
And have a look at these links for some ideas:
How to Use Transparent Images and Labels in Windows Forms[^]
http://www.bobpowell.net/transcontrols.htm[^]
Good luck!
这篇关于我应该怎么做才能使我的高级图形应用程序变得流畅?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!