Sub frame(c As Canvas,clone As ImageView,color As Paint) As Image
''set the correct canvas dimension
c.Width=clone.Width
c.Height=clone.Height
' draw shape
Dim w,h,gros As Int
gros=5dip
w=c.Width
h=c.Height
'clear canvas
c.ClearRect(0,0,c.Width,c.Height)
'draw a color rectangular
c.DrawRect(0,0,c.Width,c.Height,fx.Colors.RGB(96,156,96),True,0)
'draw the frame shape
c.DrawRect(0,0,c.Width,30dip,color,True,0)
c.DrawRect(w-gros,0,gros,h,color,True,0)
c.DrawRect(0,h-gros,c.Width,gros,color,True,0)
c.DrawRect(0,0,gros,h,color,True,0)
Return c.Snapshot
End Sub