>I have limited VB knowledge. I needed help translating these 4 lines of Visual Basic code into Visual FoxPro. All this code is doing is displaying messages in an editbox on a form so I can follow the progress of a fax modem in sending mode.
>
>Here is VB code:
>
>*** ActiveX Control Event ***
>LPARAMETERS bsmsg, bnewline
>Private Sub FaxManJr1_Message(ByVal bsMsg As String, By Val bNewLine As Integer)
>THISFORM.Edit1.SedlText = bsMsg
>If bNewLine Then THISFORM.Edit1.SelText = vbCrLf
>End Sub
>
>
>I will keep working on it too. Thanks for the help.
I think the problem is trying to evaluate an integer as true or false. In VB this is valid. You should check for a value different than 0 which would evaluate to true in VB (-1), and replace the named constant vbCrLf with its VB value:
If bNewLine <> 0 Then
Thisform.Edit1.SelText = Chr(13) + Chr(13)
Endif
Oh and also remove the Sub declarations lines, "Private Sub.." and "End Sub".