Hello,
Displaying an output text in the window as shown in this attached screenshot.
The following code is all most similar to vb6 code but doesn’t work under Paint Event , need help.
Dim LPhase(4) As String
dim CR as string
CR= EndOfLine
// 4 events
LPhase(1) = " NL:"
LPhase(2) = " PQ:"
LPhase(3) = " PL:"
LPhase(4) = " DQ:"
Dim mo , ip , JC As integer
// compute ...
For mo = 1 To 12 //months loop
// compute ...
For Ip = 1 To 4 //4 event per month loop
// compute ...
Select Case Ip
Case 1
// compute ...
JC =1
Case 2
// compute ...
JC = 2
Case 3
// compute ...
JC = 3
Case 4
// compute ...
JC= 4
End Select
dim str1, str2 , stroutput as string
str1 = LPhase(ip) // 4 events per month
str2= " date : " + JC.ToText // date event
stroutput = str1+ " " + str2 //concat..
g.DrawString(stroutput, 10 ,ip*15 , 0, false)
If ip mod 4 = 0 Then g.DrawString("----", 15,ip*20,0,false) // separation between each group of 4 events, could be blank space
system.debugLog " Phases : " + stroutput //print events for the complet year (12 monts)
Next Ip
Next mo