All pastes #483105 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-05-11 15:49 UTC
rendered paste body
'Qual é a diferença de fechar o 1º if no inicio ou no fim? É que o meu programa
'n corre correctamente se eu fecha-lo no fim..

'R: se fechares logo o 1º if:

If img.Top <= 1200 Or img.Top > 4200 Then
	Controla_Bola
End If

If img.Left <= 960 Or img.Left >= 1320 Then
	If img.Top >= 1320 And img.Left <= 2520 Then
		Controla_Bola
	End If
End If

'R: se fechares o 1º if no fim:

If img.Top <= 1200 Or img.Top > 4200 Then
	Controla_Bola
	If img.Left <= 960 Or img.Left >= 1320 Then
		If img.Top >= 1320 And img.Left <= 2520 Then
			Controla_Bola
		End If
	End If
End If