AJUDA COM CODIGO VB NET

FABRICIOWEB 06/07/2016 07:12:19
#464528
Estou reescrevendo um codigo em vb6 alguem pode me ajudar com esse trecho preciso dele em vb6 ?

x = If(b(2) > &H80, -(b(2) - &H80), b(2))
y = If(b(3) > &H80, -(b(3) - &H80), b(3))

eu fiz assim mas não sei se esta correto


If b(2) > &H80 Then
x = b(2) - &H80
End If

If (b(3) > &H80) Then
y = b(3) - &H80
End If
FABRICIOWEB 07/07/2016 16:42:35
#464619
alguem?
OCELOT 07/07/2016 17:15:44
#464621
Resposta escolhida
Esta linha

x = If(b(2) > &H80, -(b(2) - &H80), b(2))

é basicamente um if ... else ...
If b(2) > &H80 Then
x = -(b(2) - &H80)
Else
x = b(2)
End If


Tópico encerrado , respostas não são mais permitidas