Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Sparole - Sparole.frm

Sparole.frm

Caricato da: Roberto VB
Scarica il programma completo

  1. Option Explicit
  2. Dim iConta As Integer
  3. Dim lPunteggio As Integer
  4. Dim iConta1 As Integer
  5. Dim X As Integer
  6. Dim X1 As Integer
  7. Dim X2 As Integer
  8. Dim iConta2 As Integer
  9.  
  10.  
  11. Private Sub Form_Load()
  12.     Randomize
  13. End Sub
  14.  
  15.  
  16.  
  17.  
  18. Private Sub lblSend_Click()
  19.     Dim Nick As String
  20.     Dim X As Long
  21.     Nick = InputBox("Inserisci un nickname:", "NICK")
  22.         If Nick = "" Then Exit Sub
  23.     X = ShellExecute(hWnd, "Open", "http://otrebor6.altervista.org/punti.php?punti=" & "Punteggio: " & lblPunti.Caption & " Nickname: " & Nick, vbNullString, vbNullString, SW_NORMAL)
  24. End Sub
  25.  
  26. Private Sub mnuFileEsci_Click()
  27.     'Termino il programma
  28.     End
  29. End Sub
  30. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  31.     End
  32. End Sub
  33.  
  34. Private Sub Image1_Click()
  35.     MsgBox "http://www.forrestwalter.com/"
  36. End Sub
  37.  
  38. Private Sub lblRiprendi_Click()
  39.     PlaySound App.Path & "\Allarme.wav", 0, SND_FILENAME Or SND_SYNC
  40.     lblL1.Top = 120
  41.     lblL2.Top = 120
  42.     lblL3.Top = 120
  43.     txtTesto.Text = ""
  44.     txtTesto2.Text = ""
  45.     txtTesto3.Text = ""
  46.     Timer1.Enabled = True
  47.     Timer2.Enabled = True
  48.     Timer3.Enabled = True
  49.     Timer4.Enabled = True
  50.     lblRiprendi.Visible = False
  51.     lblSupporto.Visible = False
  52.     lblSupportoAereo.Visible = False
  53. End Sub
  54.  
  55. Private Sub lblSupporto_Click()
  56.     PlaySound App.Path & "\Mitra.wav", 0, SND_FILENAME Or SND_SYNC
  57.     X = X - 3
  58.     X1 = X - 3
  59.     X2 = X2 - 3
  60.     lblLivello.Caption = "Aiuto eseguito, velocità diminuita"
  61.     ProgressBar1.Value = ProgressBar1.Value - 15
  62.     lPunteggio = lPunteggio - 150
  63.     lblSupporto.Visible = False
  64. End Sub
  65.  
  66.  
  67. Private Sub lblSupportoAereo_Click()
  68.     PlaySound App.Path & "\Aereo che passa.wav", 0, SND_FILENAME Or SND_SYNC
  69.     X = X - 4
  70.     X1 = X - 4
  71.     X2 = X2 - 4
  72.     lblLivello.Caption = "Aiuto eseguito, velocità diminuita"
  73.     ProgressBar1.Value = ProgressBar1.Value - 20
  74.     lPunteggio = lPunteggio - 300
  75.     lblSupportoAereo.Visible = False
  76. End Sub
  77.  
  78. Private Sub mnuFileGo_Click()
  79.     iConta2 = 0
  80.     X = 0
  81.     X2 = 0
  82.     X1 = 0
  83.     lPunteggio = 0
  84.     iConta = 0
  85.     lblLivello.Caption = "By Roberto VB"
  86.     lblL1.Top = 120
  87.     lblL2.Top = 120
  88.     lblL3.Top = 120
  89.     ProgressBar1.Value = 0
  90.     txtTesto.Text = ""
  91.     txtTesto2.Text = ""
  92.     txtTesto3.Text = ""
  93.     lblSend.Visible = False
  94.     chkSupporto.Value = 0
  95.     ' Mette in ordine casuale le parole
  96.     Dim parole
  97.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  98.     Randomize
  99.     lblL1.Caption = parole(Rnd() * 40)
  100.  
  101.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  102.     Randomize
  103.     lblL2.Caption = parole(Rnd() * 40)
  104.  
  105.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  106.     Randomize
  107.     lblL3.Caption = parole(Rnd() * 40)
  108.  
  109.     Timer1.Enabled = True
  110.     Timer2.Enabled = True
  111.     Timer3.Enabled = True
  112.     Timer4.Enabled = True
  113.     txtTesto.Visible = True
  114.     txtTesto2.Visible = True
  115.     txtTesto3.Visible = True
  116.     lblLivello.Visible = True
  117.     txtTesto.SetFocus
  118.     mnuFileGo.Enabled = False
  119.  
  120.  
  121.  
  122. End Sub
  123.  
  124. Private Sub mnuHelpAbout_Click()
  125.     frmAbout.Show 1
  126. End Sub
  127.  
  128. Private Sub mnuHelpHowplay_Click()
  129.     frmhelp.Show 1
  130. End Sub
  131.  
  132. Private Sub mnuWebSegnalabug_Click()
  133.     Dim X As Long
  134.     X = ShellExecute(hWnd, "Open", "http://otrebor6.altervista.org/bugsparole.html", vbNullString, vbNullString, SW_NORMAL)
  135. End Sub
  136.  
  137. Private Sub Timer1_Timer()
  138.     If lblL1.Top >= 5775 Then
  139.     Timer1.Enabled = False
  140.     End If
  141.     lblL1.Top = lblL1.Top + X
  142.     imgAereo1.Top = lblL1.Top + 300
  143.     If InStr(1, txtTesto.Text, lblL1.Caption) Then
  144.     lblL1.Top = 120
  145.     txtTesto.Text = ""
  146.     NuovoLivello
  147.     txtTesto2.SetFocus
  148.     End If
  149.  
  150. End Sub
  151.  
  152.  
  153. Public Sub NuovoLivello()
  154. 'Randomizzo nuovamente tutte le parole
  155.     Dim parole
  156.     lPunteggio = lPunteggio + 50
  157.     lblPunti.Caption = lPunteggio
  158.     PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
  159.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "topo", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "Dott.Rossi", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  160.     Randomize
  161.     lblL1.Caption = parole(Rnd() * 40)
  162.     X = X + 1
  163.     iConta2 = iConta2 + 1
  164.     lblLivello.Caption = "Livello " & Str(iConta2)
  165.     ProgressBar1.Value = ProgressBar1.Value + 1
  166.     lblProgressbar.Caption = ProgressBar1.Value & "/100"
  167. End Sub
  168. Sub Pausa()
  169.     Timer1.Enabled = False
  170.     Timer2.Enabled = False
  171.     Timer3.Enabled = False
  172.     Timer4.Enabled = False
  173.     lblRiprendi.Visible = True
  174.     If ProgressBar1.Value <= 20 Then
  175.         lblSupporto.Visible = False
  176.     Else
  177.         lblSupporto.Visible = True
  178.     End If
  179.     If ProgressBar1.Value >= 30 Then
  180.         lblSupportoAereo.Visible = True
  181.     Else
  182.         lblSupportoAereo.Visible = False
  183.     End If
  184. End Sub
  185. Public Sub NuovoLivello2()
  186.     Dim parole
  187.     lPunteggio = lPunteggio + 50
  188.     lblPunti.Caption = lPunteggio
  189.     PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
  190.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  191.     Randomize
  192.     lblL2.Caption = parole(Rnd() * 40)
  193.     lblL2.Top = lblL2.Top + X1
  194.     X1 = X1 + 1
  195.     ProgressBar1.Value = ProgressBar1.Value + 1
  196.     lblProgressbar.Caption = ProgressBar1.Value & "/100"
  197. End Sub
  198. Public Sub NuovoLivello3()
  199.     Dim parole
  200.     lPunteggio = lPunteggio + 50
  201.     lblPunti.Caption = lPunteggio
  202.     PlaySound App.Path & "\Distrutto.wav", 0, SND_FILENAME Or SND_SYNC
  203.     parole = Array("gioco", "cane", "gatto", "Rossano", "gorilla", "yes", "no", "re", "Roberto", "Luca", "Alessandro", "Cosenza", "casa", "torre", "mare", "cielo", "inerme", "braccio", "USA", "Iran", "acquaio", "acquapark", "italiota", "mobile", "mnemotecnica", "eMule", "wagon-lit", "wafer", "vulcano", "violino", "vetro", "1234509876", "oscillografo", "oro", "orzo", "amico", "amichevole", "amorale", "ancella", "anatra", "Gigi")
  204.     Randomize
  205.     lblL3.Caption = parole(Rnd() * 40)
  206.     lblL3.Top = lblL3.Top + X2
  207.     X2 = X2 + 1
  208.     ProgressBar1.Value = ProgressBar1.Value + 1
  209.     lblProgressbar.Caption = ProgressBar1.Value & "/100"
  210.         Select Case iConta2
  211.         Case Is = 4
  212.             Pausa
  213.         Case Is = 8
  214.             Pausa
  215.         Case Is = 12
  216.             Pausa
  217.         Case Is = 15
  218.             Pausa
  219.         Case Is = 21
  220.             Pausa
  221.         Case Is = 28
  222.             Pausa
  223.         Case Is = 33
  224.             Pausa
  225.         Case Is = 40
  226.             Pausa
  227.         Case Is = 48
  228.             Pausa
  229.     End Select
  230. End Sub
  231. Private Sub Timer2_Timer()
  232.     If lblL2.Top >= 5775 Then
  233.     Timer2.Enabled = False
  234.     End If
  235.     lblL2.Top = lblL2.Top + X1
  236.     imgAereo2.Top = lblL2.Top + 300
  237.     If InStr(1, txtTesto2.Text, lblL2.Caption) Then
  238.     lblL2.Top = 120
  239.     txtTesto2.Text = ""
  240.     NuovoLivello2
  241.     txtTesto3.SetFocus
  242.     End If
  243. End Sub
  244.  
  245. Private Sub Timer3_Timer()
  246.     If lblL3.Top >= 5775 Then
  247.     Timer3.Enabled = False
  248.     End If
  249.     lblL3.Top = lblL3.Top + X2
  250.     imgAereo3.Top = lblL3.Top + 300
  251.     If InStr(1, txtTesto3.Text, lblL3.Caption) Then
  252.     lblL3.Top = 120
  253.     txtTesto3.Text = ""
  254.     NuovoLivello3
  255.     txtTesto.SetFocus
  256.     End If
  257. End Sub
  258.  
  259. Private Sub Timer4_Timer()
  260.     If Timer1.Enabled = False And Timer2.Enabled = False And Timer3.Enabled = False Then
  261.     lblLivello.Caption = "Hai Totalizzato " & Str(lPunteggio) & " punti" & " in " & Str(iConta) & " secondi"
  262.     Timer4.Enabled = False
  263.     mnuFileGo.Enabled = True
  264.     lblSupporto.Visible = False
  265.     lblSend.Visible = True
  266.     End If
  267.     lblTime.Caption = Timer1.Interval / 1000
  268.     iConta = iConta + 1
  269.     lblTime.Caption = Str(iConta)
  270.     'Controllo la progressbar
  271.     Select Case ProgressBar1.Value
  272.         Case Is >= 20
  273.             If chkSupporto.Value = Checked Then lblSupporto_Click
  274.         Case Is <= 0
  275.             lblLivello.Caption = "Impossibile effettuare il supporto"
  276.         Case Is >= 100
  277.             lblLivello.Caption = "Allarme, è necessario il supporto"
  278.         Case Else
  279.             lblSupporto.Visible = False
  280.     End Select
  281.  
  282.        
  283. End Sub
  284.  
  285.  
  286.  
  287.  
  288.  
  289. Private Sub txtTesto_GotFocus()
  290.     lblL1.ForeColor = vbRed
  291. End Sub
  292.  
  293. Private Sub txtTesto_LostFocus()
  294.     lblL1.ForeColor = vbYellow
  295. End Sub
  296.  
  297. Private Sub txtTesto2_GotFocus()
  298.     lblL2.ForeColor = vbRed
  299. End Sub
  300.  
  301. Private Sub txtTesto2_LostFocus()
  302.     lblL2.ForeColor = vbYellow
  303. End Sub
  304.  
  305. Private Sub txtTesto3_GotFocus()
  306.     lblL3.ForeColor = vbRed
  307. End Sub
  308.  
  309. Private Sub txtTesto3_LostFocus()
  310.     lblL3.ForeColor = vbYellow
  311. End Sub