home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,707 of 10,840   
   Rick Rothstein [MVP - Visual Basic] to All   
   Re: Resource files and string arrays   
   27 Oct 05 12:47:34   
   
   From: rickNOSPAMnews@NOSPAMcomcast.net   
      
   > 1) Convert the string array into one big string with each   
   element   
   > separated by some special value, store that string into the   
   resource   
   > file's string table as a single entry, and then when I load the   
   string   
   > from the resource file parse it into a regular string array.   
   The   
   > problem with this is the obvious kludgy-ness of having to   
   generate the   
   > string, and then re-parse it whenever I want to read it from the   
   > resource file.  But its certainly doable.   
      
   I've not worked with Resource File personally, so I can't help you   
   out with questions related to it directly. However, combining a   
   one-dimensional array into a single String and recovering the   
   array back again from the String are very simple things to do in   
   VB6.   
      
   Array to String   
   ================   
   Dim YourArray() As String   
   Dim Delimiter As String   
   Dim CombinedArray As String   
   Delimiter = vbTab   
   CombinedArray = Join(YourArray, Delimiter)   
      
   String to Array   
   =================   
   Dim YourArray() As String   
   Dim Delimiter As String   
   Dim CombinedArray As String   
   Delimiter = vbTab   
   YourArray = Split(CombinedArray, Delimiter)   
      
   Rick   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca