Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

How to use a *.cls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 26 Nov 2006 04:01 GMT
I found a possible solution to a previous post about retrieving  image
extended properties.  I downloaded ImageProperties.cls from
http:'www.mvps.org/emorcillo
website.

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?

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!

Thank you,

Daniel
Stefan Hoffmann - 26 Nov 2006 09:58 GMT
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 <--
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.