Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Loading an array of images from an a file into a Picture Box in VB

Reply
 
Old 09-11-2009   #1 (permalink)
MikeG0930


 
 

Loading an array of images from an a file into a Picture Box in VB

I want to be able to load images from a file located in a folder. I don't
want to use ImageList. These images will appear in a picture box one at a
time in succession. I am also using the BitBlt Function. The line of code I
am having trouble with is:

PicAnimDC = CreateDC(Application.StartupPath & picF(i), picH(i))

picAnimDC - Stores the device context
picF(i) - Stores filename constants
picH(i) - Stores handles of loaded pictures

My System SpecsSystem Spec
Old 09-11-2009   #2 (permalink)
Family Tree Mike


 
 

RE: Loading an array of images from an a file into a Picture Box in VB



"MikeG0930" wrote:
Quote:

> I want to be able to load images from a file located in a folder. I don't
> want to use ImageList. These images will appear in a picture box one at a
> time in succession. I am also using the BitBlt Function. The line of code I
> am having trouble with is:
>
> PicAnimDC = CreateDC(Application.StartupPath & picF(i), picH(i))
>
> picAnimDC - Stores the device context
> picF(i) - Stores filename constants
> picH(i) - Stores handles of loaded pictures
When you say you are having trouble on this line, what is the trouble?

As a guess, I would try the following to build the filename properly:

PicAnimDC = CreateDC(Path.Combine(Application.StartupPath, picF(i)), picH(i))

Mike
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Read a line from a text file, without loading the entire file inmemory PowerShell
Picture Images Vista music pictures video
Picture browsers will not display images. Vista file management
Help and Support Images Not Loading Vista performance & maintenance
Images Not Loading in Vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46