|
-
January 8th, 2013, 04:55 AM
#15
Re: [VB6] - pointers and bitmaps
 Originally Posted by WizBang
OK, I've looked over your class file. Although unfamiliar with your particular programming style, I can see many things which could be improved. For instance, you have some Do...Loops, and within the loops there is an If Then Else. This is a case where you could use Do Until or Do While. Also, there is a set of If Then statements within the ChangeImage sub which all have one condition in common. So in this case you could nest these inside one If Then for that common condition rather than test it for each one separately.
Incidentally, you can draw directly onto the surface of the UserControl, so it if often unnecessary to use a separate PictureBox. Even so, passing it as an Object is slower than passing it as a PictureBox.
However, changing a color in an image pixel by pixel is always very slow compared to using the same technique as for transparency. That's what I'd recommend. Rotating an image is of course another matter, but that's not likely to be what's slowing down the loading of the form.
finally i did find and resolve 1 problem in my control. my control enter in showimage()(for do effects and draw the image) 9 times. imagine 10 sprites in form... wow... it's takes time for show the form. but i resolve it, and now the form opens. at least don't takes 1 minute lol
thanks for all my friend... thanks
i will try see better my DIB's class for win more speed.... but i accept more advices
what you do for 'close' the thread? or there isn't any option for it?
Last edited by Cambalinho; January 8th, 2013 at 04:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|