-
Dec 12th, 2013, 08:31 PM
#1
Thread Starter
Lively Member
[RESOLVED] Loading bmp's
I have a folder with 163 bmp's and they each have different names. Is there a way to load these into an Image Clip or a Picture Clip at run time? I do not want to load each one individually. Thanks in advance.
-
Dec 12th, 2013, 08:38 PM
#2
Re: Loading bmp's
You could simply load them in a loop by using DIR(). About altering the loading order: what's the criteria you want to apply to define the loading order? for example if you want to load them alphabetically, one way would be loading all the file paths into array, sorting the array and then loading all pics in a loop.
Last edited by jcis; Dec 12th, 2013 at 09:11 PM.
-
Dec 12th, 2013, 08:58 PM
#3
Thread Starter
Lively Member
Re: Loading bmp's
Thank you jcis;
Your answer has given me enough so I can work it out now...Thank you
-
Dec 12th, 2013, 09:14 PM
#4
Re: [RESOLVED] Loading bmp's
No problem, tell us if you need more help, i've been posting loops like this using DIR() some weeks ago.
-
Dec 12th, 2013, 09:26 PM
#5
Re: [RESOLVED] Loading bmp's
You say:
Originally Posted by TheOldNewbie
I have a folder with 163 bmp's and they each have different names. Is there a way to load these into an Image Clip or a Picture Clip at run time? I do not want to load each one individually. Thanks in advance.
But now the thread is resolved by a suggestion to do the very thing you said you didn't want to?
-
Dec 12th, 2013, 11:25 PM
#6
Re: [RESOLVED] Loading bmp's
Originally Posted by dilettante
But now the thread is resolved by a suggestion to do the very thing you said you didn't want to?
By "I do not want to load each one individually" I assume he means he doesn't want to add LoadPicture() in code once for every Picture he wants to load, or else, what would be the reason for him to refuse to use a simple loop to load Pictures? that's why I adviced about using DIR() in a loop. Anyway, i never used the PictureClip component, it might have some method to directly load multiple files from a given folder.
Last edited by jcis; Dec 12th, 2013 at 11:30 PM.
-
Dec 12th, 2013, 11:27 PM
#7
Re: [RESOLVED] Loading bmp's
No, it doesn't. The whole point is to load a single composite image to save vast amounts of memory and GDI handles.
-
Dec 12th, 2013, 11:41 PM
#8
Re: [RESOLVED] Loading bmp's
163 images don't use that many GDI handles.
Last edited by Niya; Dec 13th, 2013 at 08:03 AM.
Reason: Correction: Changed 'do' to "don't"
-
Dec 12th, 2013, 11:47 PM
#9
Re: [RESOLVED] Loading bmp's
You have to remember the days when people ran Windows in 24MB of RAM... or even 4MB in some cases.
http://support.microsoft.com/kb/138349
-
Dec 13th, 2013, 03:18 AM
#10
Thread Starter
Lively Member
Re: [RESOLVED] Loading bmp's
Guys;
I meant that I did not want to load each one at design time. I had not used Dir() in so long I overlooked it. When jcis suggested it, it "rung a bell". I used Dir() and it worked perfectly. Thanks to all...
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
|