|
-
Apr 8th, 2007, 12:31 AM
#1
Thread Starter
Member
StdPicture Object
What is an stdpricture Object? Can Please explain me with a simple example?
-
Apr 8th, 2007, 12:40 AM
#2
Re: StdPicture Object
StdPicture is about the same as IPictureDisp. This object is exactly the same as the Picture object you can access in various controls such as PictureBoxes and Images.
Code:
Dim MyPicture As StdPicture
Set MyPicture = LoadPicture("c:\test.bmp")
Set Picture1.Picture = MyPicture
Set MyPicture = Nothing
' array example
Dim Pictures() As StdPicture
ReDim Pictures(2)
Set Pictures(0) = LoadPicture("c:\image1.jpg")
Set Pictures(1) = LoadPicture("c:\image2.jpg")
Set Pictures(2) = LoadPicture("c:\image3.jpg")
Set Picture1.Picture = Pictures(1)
' clear memory
Erase Pictures
The difference between StdPicture and IPictureDisp is that StdPicture is provided via OLE Automation while IPictureDisp is natively in VB's runtime.
Edit!
I'll never learn out of [vbcode][/vbcode] tags.
-
Apr 8th, 2007, 01:43 AM
#3
Thread Starter
Member
Re: StdPicture Object
Thanks merri
But what is the advantage using of a stdpicture object over Picture object access in various controls. in what situation i should go for a stdpicture object?
-
Apr 8th, 2007, 02:31 AM
#4
Re: StdPicture Object
If you want to store (a lot of) pictures you want to use the picture object instead of tons of PictureBox or Image controls. If you want to store images to memory so that they're not visible, but are instantly ready for use. If you want to use a picture object as internal working buffer for handling graphics data.
-
Apr 8th, 2007, 02:43 AM
#5
Thread Starter
Member
Re: StdPicture Object
 Originally Posted by Merri
If you want to store (a lot of) pictures you want to use the picture object instead of tons of PictureBox or Image controls. If you want to store images to memory so that they're not visible, but are instantly ready for use. If you want to use a picture object as internal working buffer for handling graphics data.
Thanks marrie. i really undestand.
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
|