Hi Erel,Add a global boolean variable and set it to true in Panel1_Touch.
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Panel1 As Panel
Dim Canvas1 As Canvas
Dim SD As SignatureData 'This object holds the data required for SignatureCapture
End Sub
Sub Activity_Create(FirstTime As Boolean)
Panel1.Initialize("Panel")
Panel1.Color = Colors.Gray
Canvas1.Initialize(Panel1)
Activity.AddView(Panel1, 20%x, 20%y, 60%x, 40%y)
SD.Initialize
SD.Canvas = Canvas1
SD.Panel = Panel1
SD.SignatureColor = Colors.Black
SD.SignatureWidth = 5dip 'Stroke width
End sub
mPath = aPath
mFileName = aFileName
Dim aAltezza, aLarghezza As Int
bmp.Initialize(mPath, mFileName)
If bmp.Height > bmp.Width Then
aAltezza = bmp.Height
aLarghezza = bmp.Width
Else
aAltezza = bmp.Width
aLarghezza = bmp.Height
End If
Dim aRect As Rect
aRect.Initialize(1dip, 3dip, aAltezza , aLarghezza)
mCanvasFirma.DrawBitmap(bmp, Null, aRect)