I would like to put the name of a resource into a string, because this resource name appears everywhere in the code and this prevents quick changes.
Dim fontMemPointer As IntPtr = Marshal.AllocCoTaskMem(My.Resources.DIGITALDREAMNARROW.Length)
You see a font name in this case called "DIGITALDREAMNARROW". I tried declare a string in which I put the font name so I can quickly use other fonts.
Dim MyFont As String = "DIGITALDREAMNARROW"
Dim fontMemPointer As IntPtr = Marshal.AllocCoTaskMem(My.Resources.MyFont.Length)
But obviously, the part after My.Resources. is an exact literal name which is not interpreted as a string. Is there a technique to solve this?