Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. string concat

string concat

Scheduled Pinned Locked Moved Visual Basic
comhelp
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    united18
    wrote on last edited by
    #1

    Hi, I am facing a strange problem in this. http://www.codeproject.com/vb/net/vbmp3header.asp When i try to trap the value of artist and title as: dim artist as string artist = objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist) dim title as string title = objMP3V1.Frame(MP3ID3v1.FrameTypes.title) dim new Name as string newName = artist + title The variable 'newName' does not contain the values of both title and artist. It only contains of artist whereas individually i am able to see the values of artist (msgbox(artist)) and title (msgbox(title)). Pls reply within half hour.......

    D G 2 Replies Last reply
    0
    • U united18

      Hi, I am facing a strange problem in this. http://www.codeproject.com/vb/net/vbmp3header.asp When i try to trap the value of artist and title as: dim artist as string artist = objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist) dim title as string title = objMP3V1.Frame(MP3ID3v1.FrameTypes.title) dim new Name as string newName = artist + title The variable 'newName' does not contain the values of both title and artist. It only contains of artist whereas individually i am able to see the values of artist (msgbox(artist)) and title (msgbox(title)). Pls reply within half hour.......

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      united18 wrote:

      Pls reply within half hour.......

      You're joking right? This is an all-volunteer effort forum. Not a tech support line. If you want immediate help, call Microsoft. Don't forget your credit card. But, as to your problem, string concatenation is done using:

      newName = artist **&** " - " **&** title
      

      RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      U 1 Reply Last reply
      0
      • U united18

        Hi, I am facing a strange problem in this. http://www.codeproject.com/vb/net/vbmp3header.asp When i try to trap the value of artist and title as: dim artist as string artist = objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist) dim title as string title = objMP3V1.Frame(MP3ID3v1.FrameTypes.title) dim new Name as string newName = artist + title The variable 'newName' does not contain the values of both title and artist. It only contains of artist whereas individually i am able to see the values of artist (msgbox(artist)) and title (msgbox(title)). Pls reply within half hour.......

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        This line: dim new Name as string is not even possible to compile. So, you are not showing us the code that you are using. How much does the real code differ from what you showed? (Sorry if this sounds picky, but I have wasted a lot of time looking for errors that doesn't exist in code that people doesn't even use.) --- b { font-weight: normal; }

        U 1 Reply Last reply
        0
        • G Guffa

          This line: dim new Name as string is not even possible to compile. So, you are not showing us the code that you are using. How much does the real code differ from what you showed? (Sorry if this sounds picky, but I have wasted a lot of time looking for errors that doesn't exist in code that people doesn't even use.) --- b { font-weight: normal; }

          U Offline
          U Offline
          united18
          wrote on last edited by
          #4

          sorry actually i wrote dim newName as string it was just a typing mistake here. in the program i wrote 'newName' only and not 'new name'

          1 Reply Last reply
          0
          • D Dave Kreskowiak

            united18 wrote:

            Pls reply within half hour.......

            You're joking right? This is an all-volunteer effort forum. Not a tech support line. If you want immediate help, call Microsoft. Don't forget your credit card. But, as to your problem, string concatenation is done using:

            newName = artist **&** " - " **&** title
            

            RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            U Offline
            U Offline
            united18
            wrote on last edited by
            #5

            I tried this also, then also it is not concatenating. Both ways i do not get a compilation error, but only one value is stored in 'newName'

            D 1 Reply Last reply
            0
            • U united18

              I tried this also, then also it is not concatenating. Both ways i do not get a compilation error, but only one value is stored in 'newName'

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              dim artist as string
              artist = objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist)
              dim title as string
              title = objMP3V1.Frame(MP3ID3v1.FrameTypes.Title)
              dim newName as string
              newName = artist + title

              If this is indeed the code your using, then the only possibility is that the call to objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) returned an empty string. Try copying and psting your code next time, not just typing what you think you used. We've all tried to chase down bugs in code that wasn't actually being used around here and it wastes a lot of time. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              U 1 Reply Last reply
              0
              • D Dave Kreskowiak

                dim artist as string
                artist = objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist)
                dim title as string
                title = objMP3V1.Frame(MP3ID3v1.FrameTypes.Title)
                dim newName as string
                newName = artist + title

                If this is indeed the code your using, then the only possibility is that the call to objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) returned an empty string. Try copying and psting your code next time, not just typing what you think you used. We've all tried to chase down bugs in code that wasn't actually being used around here and it wastes a lot of time. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                U Offline
                U Offline
                united18
                wrote on last edited by
                #7

                yes.... u r right. 1) i will copy the code rather than typing it here. 2) objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) .This code return the value of title and similarly objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist) returns the value of Artist. But when i try to concat by either i) artist + title or ii) artist & title ---- it returns only artist's value. But this problem was solved when i created 3 label fields :- label1, label2, label3. what i did was:- label1.text=objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) label2.text=objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) label3.text=label1.text + "-" + label2.text With this code it was concatening. But in this case also if i make these 3 label fields invisible ('label1.visible=false') then it doesn't concatenate again. So i have to always set the visible property to true of these 3 labels. This is quite strange though. Anyways thanks a lot for your help. Regards

                D 1 Reply Last reply
                0
                • U united18

                  yes.... u r right. 1) i will copy the code rather than typing it here. 2) objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) .This code return the value of title and similarly objMP3V1.Frame(MP3ID3v1.FrameTypes.Artist) returns the value of Artist. But when i try to concat by either i) artist + title or ii) artist & title ---- it returns only artist's value. But this problem was solved when i created 3 label fields :- label1, label2, label3. what i did was:- label1.text=objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) label2.text=objMP3V1.Frame(MP3ID3v1.FrameTypes.Title) label3.text=label1.text + "-" + label2.text With this code it was concatening. But in this case also if i make these 3 label fields invisible ('label1.visible=false') then it doesn't concatenate again. So i have to always set the visible property to true of these 3 labels. This is quite strange though. Anyways thanks a lot for your help. Regards

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  WHAT???? This is REALLY strange. Since the .Text property of a Label only accepts a String, I have no idea what's going wrong. Perhaps a bad string comming from the library you're using? You might want to check with the people that wrote the library for any issues. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  U 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    WHAT???? This is REALLY strange. Since the .Text property of a Label only accepts a String, I have no idea what's going wrong. Perhaps a bad string comming from the library you're using? You might want to check with the people that wrote the library for any issues. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                    U Offline
                    U Offline
                    united18
                    wrote on last edited by
                    #9

                    i know this sounds strange, even u can check like this when u get time and if possible clarify me if u think i am making a mistake. Whatever, atleast this way (labels) it is working. btw the class i was using for fetching id3 tags from mp3 files is : http://www.codeproject.com/vb/net/vbmp3header.asp

                    D 1 Reply Last reply
                    0
                    • U united18

                      i know this sounds strange, even u can check like this when u get time and if possible clarify me if u think i am making a mistake. Whatever, atleast this way (labels) it is working. btw the class i was using for fetching id3 tags from mp3 files is : http://www.codeproject.com/vb/net/vbmp3header.asp

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      united18 wrote:

                      when u get time

                      That's funny! :laugh: I won't get that kind of time for months!

                      united18 wrote:

                      btw the class i was using for fetching id3 tags from mp3 files is : http://www.codeproject.com/vb/net/vbmp3header.asp

                      So go to the bottom of his article and post your problem there. THe author will get an email message that you posted your question and he might be able to tell you something about it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups