I'm converting some VB6 code to C#. VB6 stores resources in a .frx
file, the same way C# stores it in .resx
files. How do I convert the images in a .frx
file into something that can be embedded in a .resx
file?
In the .frm file, it contains lines like this:
Image = "blah.frx" : 1234
The string is the file (obviously), and the numbers are a hexadecimal offset to the image. There's a 12 byte header at that location, and the last 4 bytes of that header contain the length of the image in bytes. The image itself immediately follows the 12 byte header.
Converting to a .resx is just calling Convert.ToBase64String() on that image.