Hi people - I hope someone can make things clear to me. It's about Door library and referencing the object.
When I create image from some resource and make an object - things work well. Here is the example.
But when I create bitmap image on the forelayer on which I draw - I cannot make an object and get this type of error: Object of type 'System.Drawing.Bitmap' cannot be converted to type 'System.Windows.Forms.Control', Continue? And here is the example.
I have tried also with
I guess the solution would be to make an image control on the form and pass bitmap.value to it - but I would like to have bitmap on the forelayer on which I could draw. Well - I would also like that image to receive events - which is doable with image control in first example. Any ideas?
:sign0085:
When I create image from some resource and make an object - things work well. Here is the example.
B4X:
bitmapSrc.New3(IL1.Item(0))
dImage.Image = bitmapSrc.Value
obj.New1(False)
obj.FromControl("dImage")
But when I create bitmap image on the forelayer on which I draw - I cannot make an object and get this type of error: Object of type 'System.Drawing.Bitmap' cannot be converted to type 'System.Windows.Forms.Control', Continue? And here is the example.
B4X:
FormMain.ForeLayer = True
bitmapDraw.New2(240,320)
' drawing on image code (i omitted it here)
FormMain.FDrawImage ( bitmapDraw.Value, 0, 0)
obj.New1(False)
obj.FromControl("bitmapDraw")
I have tried also with
B4X:
obj.FromControl(bitmapDraw.Value)
I guess the solution would be to make an image control on the form and pass bitmap.value to it - but I would like to have bitmap on the forelayer on which I could draw. Well - I would also like that image to receive events - which is doable with image control in first example. Any ideas?
:sign0085:
Last edited: