UnKnowN Posted April 17, 2006 at 01:47 PM Report #22527 Posted April 17, 2006 at 01:47 PM Private Sub Command1_Click() Dim a, b, c As Color Dim j, k, l As Integer a = Picture1.BackColor b = Picture2.BackColor c = Picture3.BackColor j = Int(Rnd * 3) + 1 If j = 1 Then a = RGB(255, 0, 0) End If If j = 2 Then a = RGB(0, 165, 255) End If If j = 3 Then a = RGB(30, 255, 30) End If k = Int(Rnd * 3) + 1 If k = 1 Then b = RGB(255, 0, 0) End If If k = 2 Then b = RGB(0, 165, 255) End If If k = 3 Then b = RGB(30, 255, 30) End If l = Int(Rnd * 3) + 1 If l = 1 Then c = RGB(255, 0, 0) End If If l = 2 Then c = RGB(0, 165, 255) End If If l = 3 Then c = RGB(30, 255, 30) End If End Sub O que é que está mal ? O erro dá-se em Dim a, b, c As Color User-defined type not-defined Quero agradecer desde já ao Ridelight, foi com o programa dele que consegui encontrar as perfect colors para a Slot 😞 http://ridelight.no.sapo.pt/simulador.html PS: Tenho 3 PictureBox's e 1 Botao 🙂
Tiago Salgado Posted April 17, 2006 at 06:39 PM Report #22552 Posted April 17, 2006 at 06:39 PM Dá-te erro porque não te permite fazer esse tipo de declaração.
UnKnowN Posted April 17, 2006 at 07:24 PM Author Report #22564 Posted April 17, 2006 at 07:24 PM Entao pkek o erro só da no c ?
vbmaster Posted April 17, 2006 at 08:47 PM Report #22579 Posted April 17, 2006 at 08:47 PM sem saber a versão, nada feito... continuam a ignorar o post das regras!
Tiago Salgado Posted April 17, 2006 at 10:41 PM Report #22602 Posted April 17, 2006 at 10:41 PM Em 17/04/2006 às 21:24, UnKnowN disse: Entao pkek o erro só da no c ? Porque é a ultima variavel declarada...se acrescentares o "d" ele irá dar erro no d 😞
UnKnowN Posted April 18, 2006 at 12:42 PM Author Report #22635 Posted April 18, 2006 at 12:42 PM Hmm... ok... Mas entao como é que resolvo ? Não vejo onde esteja o rpoblema 😐
Tiago Salgado Posted April 18, 2006 at 12:58 PM Report #22640 Posted April 18, 2006 at 12:58 PM Em vez de pores a = Picture1.BackColor e dps tentares por a = RGB(0, 165, 255) metes tipo: If j = 1 Then Picture1.BackColor = RGB(255, 0, 0) End If
UnKnowN Posted April 18, 2006 at 01:25 PM Author Report #22646 Posted April 18, 2006 at 01:25 PM Deu, Obrigadão Tiago Salgado. Este Moço é do Best LOL!! XD PS: 1º Post Editado 😞
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now