Results 1 to 4 of 4

Thread: [RESOLVED] Trying to read into ID3 Tag

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2008
    Posts
    26

    Resolved [RESOLVED] Trying to read into ID3 Tag

    i am reading a tutorial that is telling me to dim a variable as taginfo

    Dim CurrentTag As TagInfo

    the compiler doesnt like this comment, and causes it to crash.

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Trying to read into ID3 Tag

    Crash? Or an error something like "User-Defined type not defined"? (forgot what the actual error is).

    The tutorial should have a declaration of that type.

    vb Code:
    1. Type taginfo
    2.    'members here
    3. End Type

    You will need to paste this into the general declarations of your code. What is the link to the tutorial you are reading?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2008
    Posts
    26

    Re: Trying to read into ID3 Tag

    http://www.developerfusion.co.uk/show/62/3/

    but I see now how the code works, but it is the first time that I have seen a user defined type used. What is the purpose?

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Trying to read into ID3 Tag

    Quote Originally Posted by VBNewbieReady2Learn
    http://www.developerfusion.co.uk/show/62/3/

    but I see now how the code works, but it is the first time that I have seen a user defined type used. What is the purpose?
    To create your own data type...sometimes string, integer, double, etc. is not what we need. Sometimes we need more values:

    vb Code:
    1. Type Person
    2.    strFirstName As String
    3.    strLastName As String
    4.    strEmail As String
    5.    strPhoneNumber As String
    6.    'etc...
    7. End Type
    8.  
    9. Private udtPerson As Person
    10.  
    11. Private Sub Form_Load()
    12.     With udtPerson
    13.         .strFirstName = "Billy"
    14.         .strLastName = "Bob"
    15.         .strEmail = "[email protected]"
    16.         .strPhoneNumber = "1-555-555-5555"
    17.     End With
    18. End Sub

    There are a lot of things you can do with UDTs...create arrays of them, save them directly to disk, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width