Results 1 to 2 of 2

Thread: How accessing a String Table Resource from code?

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    32

    How accessing a String Table Resource from code?

    I have a problem in VB.NET.

    I have a solution with a resource template. I also have a String table in that resource template.

    Now I would like to access some string values from that string table in code. So I can display that text in a message box or something.

    Can anyone please help me?

    Thanks...

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The thing to remember is getting the name right.

    VB Code:
    1. Dim asm As Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
    2.     Dim rm As New Resources.ResourceManager("FullNameSpace.ResourceFileName", asm)
    3.     Dim str As String = rm.GetString("ResourceItemName")

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