hi Daniel,
> I have 2 issues however. Firstly it was posted in his 'Old VB6' section,
> does this mean I will have problems with access 2000 and 2003?
Maybe, but not necessarily.
> Secondly, How do I use this file? I imported it into my db, but how do I
> make call to use it? I know nothing about APIs any help in understanding
> them would be much appreciated!
It is a class module. You don't need to know anything about API calls,
but you need to know a little bit about classes and objects:
To use it, you have to create an object and us it:
Dim obj As ImageProperties
Set obj = New ImageProperties
' do stuff with obj.
Set obj = Nothing
mfG
--> stefan <--
Daniel - 26 Nov 2006 15:17 GMT
Stefan,
Based on your previous post I have a basic Fucntion
****
Function img()
Dim obj As ImageProperties
Set obj = New ImageProperties
With obj
.OpenImage ("c:\picture.jpg")
Debug.Print "Height: " & .Height
Debug.Print "Width: " & .Width
Debug.Print "HorizontalResolution: " & .HorizontalResolution
Debug.Print "VerticalResolution: " & .VerticalResolution
Debug.Print "PixelFormat: " & .PixelFormat
'For Each it In .Item()
'If IsNull(it) = False Then Debug.Print "Item: " & it
'Next it
End With
obj.CloseImage
Set obj = Nothing
End Function
****
Is there a way to make the commented out section work,
For Each it In .Item()
If IsNull(it) = False Then Debug.Print "Item: " & it
Next it
that is to loop through all the Item tags to basically make a complete
listing of all the image properties? How do you enumerate them all in a loop
function without having to explicitly having to code each tag?
Could you also point me in the right direction for getting so basic info
about classes and objects.
Thank you,
Daniel
> hi Daniel,
> > I have 2 issues however. Firstly it was posted in his 'Old VB6' section,
[quoted text clipped - 19 lines]
> mfG
> --> stefan <--
Stefan Hoffmann - 26 Nov 2006 16:21 GMT
hi Daniel,
> Is there a way to make the commented out section work,
As far as i can see in the source of the class no.
> For Each it In .Item()
> If IsNull(it) = False Then Debug.Print "Item: " & it
> Next it
You can use a normal for-loop instead:
Dim Count As Long
For Count = 0 To obj.Count - 1
With obj.Item(Count)
'...
End With
Next Count
> Could you also point me in the right direction for getting so basic info
> about classes and objects.
http://www.di-mgt.com.au/classes.html
http://www.amazon.com/phrase/Object-Oriented-Programming
mfG
--> stefan <--