A
andycool1
I get the following error in my code when I set Option Strict to On:
Option Strict On disallows implicit conversions from 'System.Object'
to 'System.Drawing.Image'
The blue error underline starts at "ResMan" and goes to the end of the
line in this line of code:
Dim i As System.Drawing.Image = ResMan.GetObject("logo.gif")
ResMan is declared in another module as follows:
Public ResMan As New Resources.ResourceManager("DemoProject.Images",
System.Reflection.Assembly.GetCallingAssembly)
I can see that the GetObject method returns an Object and I need a
System.Drawing.Image, but how do I do the explicit conversion?
Option Strict On disallows implicit conversions from 'System.Object'
to 'System.Drawing.Image'
The blue error underline starts at "ResMan" and goes to the end of the
line in this line of code:
Dim i As System.Drawing.Image = ResMan.GetObject("logo.gif")
ResMan is declared in another module as follows:
Public ResMan As New Resources.ResourceManager("DemoProject.Images",
System.Reflection.Assembly.GetCallingAssembly)
I can see that the GetObject method returns an Object and I need a
System.Drawing.Image, but how do I do the explicit conversion?