Sub draw(pData As String)
tela.ClearRect(0,0,tela.Width,tela.Height)
DateTime.DateFormat = "yyyy mm dd"
Dim r As Int = 1
For i = 0 To 6
tela.DrawText(DayNames(i),24+(28*i),18,fx.DefaultFont(10),fx.Colors.Blue,"RIGHT")
Next
Log (DateTime.dateparse(pData))
Dim c As Int = DateTime.GetDayOfWeek(DateTime.DateParse(pData)) + 1
Log(pData)
Log(c)
For i = 1 To DaysOfMonth(aa,mm)
If c > 6 Then
c = 0
r = r + 1
End If
If c = 6 Then
tela.DrawText(i,24+(28*c),18+(22*r),fx.DefaultFont(12),fx.Colors.Red,"RIGHT")
Else
tela.DrawText(i,24+(28*c),18+(22*r),fx.DefaultFont(12),fx.Colors.Black,"RIGHT")
End If
c = c + 1
Next
lAnno.Text = aa
lMese.Text = MonthNames(mm-1)
End Sub