Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Comments
ely_bob 5-Aug-10 16:57pm    
Are you double buffering?, is this a Forms app, or a Web app?

1 solution

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


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!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900