Hi all,
Some code is not so easy for translate into PB.
This are the part of code I have it difficult with it
VB60 source
Try to convert it PB but fails
1) Visual Basic used always the Statements "CLOSE", "END" is that allowed in PowerBasic to?
Some code is not so easy for translate into PB.
This are the part of code I have it difficult with it
VB60 source
Code:
Private Sub DOEN_Click() Dim PauseTime, Start Instring$ = "" [COLOR="Red"][B]Call WriteReport(Comm.Text)[/B][/COLOR] 'Debug.Print Mid$(Comm.Text, 3, 1) [COLOR="red"][B]If Mid$(Comm.Text, 3, 1) = "L" Or Mid$(Comm.Text, 2, 1) = "L" Or Mid$(Comm.Text, 3, 1) = "l" Or Mid$(Comm.Text, 2, 1) = "l" Then Call ReadReport(Instring$, 2)[/B][/COLOR] Boodschap.Text = Instring$ End If End Sub
Code:
CALLBACK FUNCTION ShowFRM_PIC_CONTROL_USBProc() SELECT CASE AS LONG CB.MSG CASE %WM_COMMAND SELECT CASE AS LONG CB.CTL CASE %IDC_BTN_DOEN IF CB.CTLMSG = %BN_CLICKED OR CB.CTLMSG = 1 THEN LOCAL Pauze_Time AS DOUBLE LOCAL Start AS DOUBLE LOCAL sText AS STRING LOCAL s1 AS STRING g_Instring$ = "" [COLOR="red"][B]CONTROL GET TEXT CB.HNDL, %IDC_TXT_COMM, sText WriteReport(sText) 'WriteReport(Comm.Text) 'COMM is a TextBox ID Name such as %IDC_TXT_COMM 'Debug.Print Mid$(Comm.Text, 3, 1) CONTROL GET TEXT CB.HNDL, %ID_TXT_COMM TO s1 IF MID$(s1, 3, 1) = "L" OR _ MID$(s1, 2, 1) = "L" OR _ MID$(s1, 3, 1) = "l" OR _ MID$(s1, 2, 1) = "l" THEN 'If Mid$(Comm.Text, 3, 1) = "L" Or _ ' Mid$(Comm.Text, 2, 1) = "L" Or _ ' Mid$(Comm.Text, 3, 1) = "l" Or _ ' Mid$(Comm.Text, 2, 1) = "l" Then ReadReport(g_Instring, 2) END IF [/B][/COLOR] CONTROL SET TEXT CB.HNDL, %IDC_TXT_MESSAGE, g_InString 'Boodschap.Text = Instring$ END IF .............
Comment