The title basically describes the problem, a specific example here :
This gives me the following error, however : "Value of type 'String' cannot be converted to 'System.Drawing.Image'." i.e. I need to indicate to Visual Basic to read the contents of ResPath & Stim1Physical as code rather than treat them as String variables ... Any help most appreciated !
p.s. tried to search for a solution and hits returned things like EbExecuteLine, Activator.CreateInstance, Application.Run "MyFunction", "myParameter" but im either not sure how to use them or they are not really suitable here ...
p.p.s. I'm using VB.NET 2005
Code:
Dim ResPath As String
Dim Stim1Physical As String
Sub AssignCustomImageToPictureBox()
ResPath = "IntegratedFeaturesConnectedTemplate.My.Resources.Resources._"
Stim1Physical = "BeautifulCode" 'refers to a picture in VS Project Resources with the name BeautifulCode
PictureBoxRight.Image = ResPath & Stim1Physical
End Sub
This gives me the following error, however : "Value of type 'String' cannot be converted to 'System.Drawing.Image'." i.e. I need to indicate to Visual Basic to read the contents of ResPath & Stim1Physical as code rather than treat them as String variables ... Any help most appreciated !
p.s. tried to search for a solution and hits returned things like EbExecuteLine, Activator.CreateInstance, Application.Run "MyFunction", "myParameter" but im either not sure how to use them or they are not really suitable here ...
p.p.s. I'm using VB.NET 2005