test su costruzione immagini con lenti e specchi
,

esci con ../scienze.htm o precedente indice1.htm

ottica.ppt per tornare vedi ottica.htm




Private Sub CommandButton40_Click()
Rem mostra scheda
Label41.Visible = "true"
Label42.Visible = "false"
End Sub

Private Sub CommandButton43_Click()
Rem mostra scheda2
Label42.Visible = "true"
Label41.Visible = "false"

End Sub

Private Sub CommandButton41_Click()
Rem cela scheda
Label41.Visible = "false"
Label42.Visible = "false"
End Sub


Private Sub CommandButton44_Click()
Rem mostra informazioni 1
Label43.Visible = "true"
End Sub

Private Sub CommandButton45_Click()
Rem cela informazioni 1
Label43.Visible = "false"
End Sub


Rem visualizza immagini *********************************

Private Sub CommandButton1_Click()
Rem apre foto1
Call cancellax
TextBox1.SetFocus
Image1.Visible = "true"
Label15.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub
Private Sub CommandButton2_Click()
Rem apre foto2
Call cancellax
TextBox1.SetFocus
Image2.Visible = "true"
Label17.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton3_Click()
Rem apre foto3
Call cancellax
TextBox1.SetFocus
Image3.Visible = "true"
Label16.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub



Private Sub CommandButton4_Click()
Rem apre foto4
Call cancellax
TextBox1.SetFocus
Image4.Visible = "true"
Label19.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub




Private Sub CommandButton5_Click()
Rem foto 5
Call cancellax
TextBox1.SetFocus
Image5.Visible = "true"
Label18.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton6_Click()
Rem foto 6
Call cancellax
TextBox1.SetFocus
Image6.Visible = "true"
Label24.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton7_Click()
Rem foto7
Call cancellax
TextBox1.SetFocus
Image7.Visible = "true"
Label22.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton8_Click()
Rem foto8
Call cancellax
TextBox1.SetFocus
Image8.Visible = "true"
Label23.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton9_Click()
Rem foto9
Call cancellax
TextBox1.SetFocus
Image9.Visible = "true"
Label21.Visible = "true"
Label39.Caption = "immagine assente:indica posizione della sorgente 1-2-3-4-5 ?"
End Sub

Private Sub CommandButton19_Click()
Rem apre foto10
Call cancellax
TextBox1.SetFocus
Image10.Visible = "true"
Label30.Visible = "true"
Label39.Caption = "indica posizione della sorgente 12-3-4-5 ?"
End Sub

Private Sub CommandButton20_Click()
Rem apre foto11
Call cancellax
TextBox1.SetFocus
Image11.Visible = "true"
Label27.Visible = "true"
Label39.Caption = "indica posizione della immagine 12-3-4-5 ?"
End Sub

Private Sub CommandButton21_Click()
Rem apre foto12
Call cancellax
TextBox1.SetFocus
Image12.Visible = "true"
Label26.Visible = "true"
Label39.Caption = "indica posizione della immagine 12-3-4-5 ?"
End Sub

Private Sub CommandButton22_Click()
Rem apre foto13
Call cancellax
TextBox1.SetFocus
Image13.Visible = "true"
Label29.Visible = "true"
Label39.Caption = "indica posizione della immagine 12-3-4-5 ?"

End Sub
Private Sub CommandButton23_Click()
Rem apre foto14
Call cancellax
TextBox1.SetFocus
Image14.Visible = "true"
Label28.Visible = "true"
Label39.Caption = "indica posizione della immagine 12-3-4-5 ?"
End Sub
Private Sub CommandButton24_Click()
Rem apre foto15
Call cancellax
TextBox1.SetFocus
Image15.Visible = "true"
Label31.Visible = "true"
Label39.Caption = "indica posizione della immagine 12-3-4-5 ?"

End Sub

Private Sub CommandButton25_Click()
Rem apre foto16
Call cancellax
TextBox1.SetFocus
Image16.Visible = "true"
Label32.Visible = "true"
Label39.Caption = "s.concavo 1,lente con 2, s.convesso 3: indica elemento originante immagine"
End Sub

Private Sub CommandButton26_Click()
Rem apre foto17
Call cancellax
TextBox1.SetFocus
Image17.Visible = "true"
Label34.Visible = "true"
Label39.Caption = "s.concavo 1, lente div. 2, s. convesso 3; indica elemento originante immagine"
End Sub

Private Sub CommandButton27_Click()
Rem apre foto18
Call cancellax
TextBox1.SetFocus
Image18.Visible = "true"
Label33.Visible = "true"
Label39.Caption = "s.concavo, s.convesso, l,lente divergente:indica elemento originante immagine"
End Sub

Rem verifica rispsote con codice +++++++++++++++++++++++++++++++++++++

Private Sub CommandButton10_Click()
Rem verifica foto1
Dim foto As String
foto = "oltre C1 1 :ridotta, reale, capovolta, tra f2-c2"
Call verifica(1, foto)
Image19.Visible = "true"
End Sub

Private Sub CommandButton11_Click()
Rem verifica foto2
Dim foto As String
foto = " tra c1-f1 3:ingrandita, reale, capovolta, oltre c2"
Call verifica(3, foto)
Image20.Visible = "true"
End Sub

Private Sub CommandButton12_Click()
Rem verifica foto3
Dim foto As String
foto = " su f1 4 :senza immagine, infinito"
Call verifica(4, foto)
Image21.Visible = "true"
End Sub
Private Sub CommandButton13_Click()
Rem foto 4
Dim foto As String
foto = "su c1 2 :uguale, reale, capovolta su c2"
Call verifica(2, foto)
Image22.Visible = "true"
End Sub

Private Sub CommandButton14_Click()
Rem foto 5
Dim foto As String
foto = "tra f1 e co 5; ingrandita, virtuale, diritta"
Call verifica(5, foto)
Image23.Visible = "true"
End Sub
Private Sub CommandButton15_Click()
Rem foto 6
Dim foto As String
foto = "oltre c 1 :ridotta, reale, capovolta, tra f-c"
Call verifica(1, foto)
Image24.Visible = "true"
End Sub

Private Sub CommandButton16_Click()
Rem foto 7
Dim foto As String
foto = "su centro 2 : uguale, reale, capovolta, su c "
Call verifica(2, foto)
Image25.Visible = "true"
End Sub

Private Sub CommandButton17_Click()
Rem foto 8
Dim foto As String
foto = "tra f-c 3 : ingrandita, reale capovolta, oltre c"
Call verifica(3, foto)
Image26.Visible = "true"
End Sub

Private Sub CommandButton18_Click()
Rem foto 9
Dim foto As String
foto = "su f 4 : nessuna immagine, infinito"
Call verifica(4, foto)
Image27.Visible = "true"
End Sub



Private Sub CommandButton28_Click()
Rem verifica foto10
Dim foto As String
foto = "tra f e co 5: ingrandita, virtuale, diritta, oltre specchio"
Call verifica(5, foto)
Image28.Visible = "true"
End Sub

Private Sub CommandButton29_Click()
Rem verifica foto11
Dim foto As String
foto = "tra centro e fuoco 2"
Call verifica(2, foto)
Image29.Visible = "true"
End Sub

Private Sub CommandButton30_Click()
Rem verifica foto12
Dim foto As String
foto = "su centro 3"
Call verifica(3, foto)
Image29.Visible = "true"

End Sub

Private Sub CommandButton31_Click()
Rem verifica foto13
Dim foto As String
foto = "oltre centro 4"
Call verifica(4, foto)
Image31.Visible = "true"
End Sub

Private Sub CommandButton32_Click()
Rem verifica foto14
Dim foto As String
foto = "infinito 5 "
Call verifica(5, foto)
Image32.Visible = "true"
End Sub

Private Sub CommandButton33_Click()
Rem verifica foto15
Dim foto As String
foto = "virtuale 1 "
Call verifica(1, foto)
Image33.Visible = "true"
End Sub

Private Sub CommandButton34_Click()
Rem verifica foto16
Dim foto As String
foto = "specchio convesso 3 virtuale diritta ridotta"
Call verifica(3, foto)
Image34.Visible = "true"
End Sub

Private Sub CommandButton35_Click()
Rem verifica foto17
Dim foto As String
foto = "lente divergente 2: virtuale diritta ridotta"
Call verifica(2, foto)
Image35.Visible = "true"
End Sub

Private Sub CommandButton36_Click()
Rem verifica foto18
Dim foto As String
foto = "specchio concavo 1: ingrandita, diritta ,virtuale 1 "
Call verifica(1, foto)
Image36.Visible = "true"
End Sub




Rem controlla e fornisce risultato ------------------------------

Private Sub verifica(k As Integer, x As String)
Rem verifica esattezza del codice inserito
Dim errate As Integer
Dim prove As Integer
Dim percento As Integer
Dim finale As Integer

Dim foto As String
foto = x
Dim scelta As Integer
Dim n As Integer
scelta = TextBox1
n = k
errate = 0
prove = 18
If scelta = n Then
Label2.Caption = "esatto : " & n & " era :" & foto
Label2.BackColor = vbCyan
Else
Label2.Caption = "errato : " & n & " era :" & foto
errate = errate + 1
Label2.BackColor = vbRed
End If

End Sub





Private Sub CommandButton37_Click()
Rem cancella tutto ++++++++++++++++++++++++++++++++++++++
TextBox1 = ""
Image1.Visible = "false"
Image2.Visible = "false"
Image3.Visible = "false"
Image4.Visible = "false"
Image5.Visible = "false"
Image6.Visible = "false"
Image7.Visible = "false"
Image8.Visible = "false"
Image9.Visible = "false"

Image10.Visible = "false"
Image11.Visible = "false"
Image12.Visible = "false"
Image13.Visible = "false"
Image14.Visible = "false"
Image15.Visible = "false"
Image16.Visible = "false"
Image17.Visible = "false"
Image18.Visible = "false"

Label2.Caption = ""
Label39.Caption = ""
Label10.Caption = ""
TextBox2 = ""
TextBox3 = ""
Rem Image40.Visible = "false"

Label41.Visible = "false"
TextBox1 = ""
Label42.Visible = "false"
Label40.Visible = "false"
Rem Label35.Visible = "false"

Image19.Visible = "false"
Image20.Visible = "false"
Image21.Visible = "false"
Image22.Visible = "false"
Image23.Visible = "false"
Image24.Visible = "false"
Image25.Visible = "false"
Image26.Visible = "false"
Image27.Visible = "false"
Image28.Visible = "false"
Image29.Visible = "false"
Image30.Visible = "false"
Image31.Visible = "false"
Label43.Visible = "false"
Rem Label32.Visible = "false"
Rem Label33.Visible = "false"
Image32.Visible = "false"
Image33.Visible = "false"
Image34.Visible = "false"
Image35.Visible = "false"
Image36.Visible = "false"


End Sub



Private Sub Image13_Click()

End Sub

Private Sub Image14_Click()

End Sub

Private Sub Image19_Click()

End Sub

Private Sub Image10_Click()

End Sub

Private Sub Image18_Click()

End Sub

Private Sub Image30_Click()

End Sub

Private Sub Image33_Click()

End Sub

Private Sub Image36_Click()

End Sub

Private Sub Label10_Click()
Rem % finale errate
Label10.Caption = Int(TextBox2 * 100 / TextBox3)
If Int(TextBox2 * 100 / TextBox3) <= 50 Then
MsgBox ("se % <= 50 bravo, discreto, sufficiente")
Else
MsgBox ("se % > 50 conviene un ripasso con mostra foto..")
End If

End Sub

Private Sub Label15_Click()

End Sub

Private Sub Label17_Click()

End Sub

Private Sub Label20_Click()

End Sub

Private Sub Label23_Click()

End Sub

Private Sub Label25_Click()

End Sub



Private Sub CommandButton42_Click()
Rem cela spunta
Label15.Visible = "false"
Label16.Visible = "false"
Label17.Visible = "false"
Label18.Visible = "false"
Label19.Visible = "false"
Label21.Visible = "false"
Label22.Visible = "false"
Label23.Visible = "false"
Label24.Visible = "false"

Label26.Visible = "false"
Label27.Visible = "false"
Label28.Visible = "false"
Label29.Visible = "false"
Label30.Visible = "false"
Label31.Visible = "false"
Label32.Visible = "false"
Label33.Visible = "false"
Label34.Visible = "false"

End Sub

Private Sub cancellax()
Rem cancella immagini e commenti
TextBox1 = ""
Image1.Visible = "false"
Image2.Visible = "false"
Image3.Visible = "false"
Image4.Visible = "false"
Image5.Visible = "false"
Image6.Visible = "false"
Image7.Visible = "false"
Image8.Visible = "false"
Image9.Visible = "false"

Image10.Visible = "false"
Image11.Visible = "false"
Image12.Visible = "false"
Image13.Visible = "false"
Image14.Visible = "false"
Image15.Visible = "false"
Image16.Visible = "false"
Image17.Visible = "false"
Image18.Visible = "false"

Label2.Caption = ""

Label10.Caption = ""
TextBox2 = ""
TextBox3 = ""
Label40.Visible = "false"

End Sub