The name of my project is DXTest (DXTest is the root namespace).
I have a folder under my project called Bitmaps, with a subfolder called Title, containing a title.jpg.
Title.jpg is an embedded resource.
I am converting a project that is in C# code to try to load this embedded file into a bitmap object.
The code is as follows:
The problem is, gettype().xxxxx is not allowed. I have tried me.GetType.Module.etc etc etc, but I always come back with a "null stream" error.
I *may* be approaching this totally wrong, as I have no C# experience, but I've had good luck converting the other 99.99999% of the project thus far.
Any help would be greatly appreciated.
Thanks!
--NipsMG s-)
I have a folder under my project called Bitmaps, with a subfolder called Title, containing a title.jpg.
Title.jpg is an embedded resource.
I am converting a project that is in C# code to try to load this embedded file into a bitmap object.
The code is as follows:
Code:
'NOTE: Resource is a string containing "DXTest.Bitmaps.Title.title.jpg"
sourceBitmap = New Bitmap(GetType().Module.Assembly.GetManifestResourceStream(Resource))
The problem is, gettype().xxxxx is not allowed. I have tried me.GetType.Module.etc etc etc, but I always come back with a "null stream" error.
I *may* be approaching this totally wrong, as I have no C# experience, but I've had good luck converting the other 99.99999% of the project thus far.
Any help would be greatly appreciated.
Thanks!
--NipsMG s-)