ACSPanama
asked on
Display .PCT Quicktime pictures using Access
I have a database where I need to display on a form .PCT pictures created by Quicktime.
I always use WebBrowser1 .ocx to display .jpg pictures but it won't display .PCT picutures.
(Handy Code I wrote:)
*************
Dim varPath As Variant
Dim varPic1 As Variant
Dim varX As Variant
Dim varY As Variant
Dim varZ As Variant
varPath = DLookup("[PicPath]", "QRY_PicLookup", "[Screen]=" & [List67].Column(1))
varPic1 = DLookup("[PIC1]", "QRY_PicLookup", "[ID]=" & List67.Column(0))
varX = "about:<html><center><body scroll='no'><img src='" 'Centers Picture
varY = "</img><p> </center><pre> </pre></body></html>" 'Puts Picture in Center
varZ = "'width=100% height=100% />"
'Puts Picture in WebBrowser Contol Centered & Turns off ScrollBar & Scales Picture to WebBrowser Size
WebBrowser1.Navigate varX + varPath + varPic1 + varZ + varY
*************
I noticed in my Access controls there is a QuickTime Object...perhaps this could work however I don't know the string comands to use it from VB for this control.
Converting the images from .PCT to .JPG is not an option.
Any Ideas...Thanks a million in advance!
I always use WebBrowser1 .ocx to display .jpg pictures but it won't display .PCT picutures.
(Handy Code I wrote:)
*************
Dim varPath As Variant
Dim varPic1 As Variant
Dim varX As Variant
Dim varY As Variant
Dim varZ As Variant
varPath = DLookup("[PicPath]", "QRY_PicLookup", "[Screen]=" & [List67].Column(1))
varPic1 = DLookup("[PIC1]", "QRY_PicLookup", "[ID]=" & List67.Column(0))
varX = "about:<html><center><body
varY = "</img><p> </center><pre> </pre></body></html>" 'Puts Picture in Center
varZ = "'width=100% height=100% />"
'Puts Picture in WebBrowser Contol Centered & Turns off ScrollBar & Scales Picture to WebBrowser Size
WebBrowser1.Navigate varX + varPath + varPic1 + varZ + varY
*************
I noticed in my Access controls there is a QuickTime Object...perhaps this could work however I don't know the string comands to use it from VB for this control.
Converting the images from .PCT to .JPG is not an option.
Any Ideas...Thanks a million in advance!
ASKER
Discovered that you can use Unbound Object Frame and it views the Quicktime .PCT files perfectly! Who would of guessed?
There is a sample database here:
http://www26.brinkster.com/alzowze/blobs/blobs.asp
I story my file names in a table and sort them by a query. This works with .PCT, .JPG files etc.
Here is my Code:
Dim varPath As Variant
Dim varPic1 As Variant
varPath = DLookup("[PicPath]", "QRY_PicLookup", "[Screen]=" & [List67].Column(3))
varPic1 = DLookup("[PIC1]", "QRY_PicLookup", "[ID]=" & List67.Column(0))
Me.ImgView1.Picture = varPath + varPic1 'Puts Picture in ImageBox
There is a sample database here:
http://www26.brinkster.com/alzowze/blobs/blobs.asp
I story my file names in a table and sort them by a query. This works with .PCT, .JPG files etc.
Here is my Code:
Dim varPath As Variant
Dim varPic1 As Variant
varPath = DLookup("[PicPath]", "QRY_PicLookup", "[Screen]=" & [List67].Column(3))
varPic1 = DLookup("[PIC1]", "QRY_PicLookup", "[ID]=" & List67.Column(0))
Me.ImgView1.Picture = varPath + varPic1 'Puts Picture in ImageBox
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or you can open IE in an unbound OLE control and run the Quicktime in that (I haven't tried that either).
Or you can convert the pct files to a temporary jpg file on the fly to display it and then delete the jpg file.