|
-
Mar 27th, 2000, 02:09 AM
#1
Thread Starter
Fanatic Member
I loaded about a hundred image which means I have a hundred image controls. Everytime I switch application and switch back to the form with these hundred image control, it seems like it is going through repainting or reloading again.
Anyone knows how to prevent this, because I end up have to wait another 15 seconds.
Thanks
-
Mar 27th, 2000, 03:44 AM
#2
transcendental analytic
You have 100 of imagecontrols? That's make me sick and your computer too. I would use the Bitblt API to draw all your images on the form. Load each file into one single picture and then use Bitblt to draw them on the form. Heres the Declarations:
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Here's how to use it:
BitBlt Me.hDC, posx, posy, pic.scalewidth, pic.scaleheight, pic.hdc, 0, 0, vbSrcCopy
You can experiment with the values, set posx and posy to specify were the picture goes.
-
Mar 27th, 2000, 08:54 AM
#3
Thread Starter
Fanatic Member
Well, when you don't know any other way, you have to find substitution.
Anyway, thanks for your tip.
You see, I am creating a employee browser. If I do it like your way, I am going have to find someother way to drap and drop.
Anyway, Thanks.
-
Mar 27th, 2000, 05:39 PM
#4
transcendental analytic
It's hard but all hard programmers can do that. At least I have done much without any controls at all. Sorry, I need to know more about this drag & drop purpose if you want me to help you with that.
-
Mar 28th, 2000, 01:31 AM
#5
Thread Starter
Fanatic Member
Thanks!
I am trying to make a directory image browser similar to the Paint Shop Pro. It has a drag and drop feature to categorize the images.
Thanks for your input.
-
Mar 28th, 2000, 04:41 AM
#6
transcendental analytic
If you are not dragging and dropping them to other apps, It may be easy to just have one image control, that gets visible, when you start dragging, and invisible when you drop it. Easy thing with those mousemove events. And when the move is done, you can run a refreshing method that updates all with Bitblt. Let me know if you have more problems with that.
-
Mar 28th, 2000, 04:48 AM
#7
Thread Starter
Fanatic Member
Kedaman!
Thanks for the info. I do need help on something else. Can you check the posting for "Bitblt?????"
Thanks!
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
|