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
Blocco - sostitutivo.frm

sostitutivo.frm

Caricato da: Antometal
Scarica il programma completo

  1. Option Explicit
  2. Public I As Integer
  3.  
  4. Private Sub DisabilitaTasti()
  5. cmdSost.Enabled = False
  6. cmdTrovaSucc.Enabled = False
  7. cmdSostAll.Enabled = False
  8. End Sub
  9.  
  10. Private Sub cddTrovaSucc_Click()
  11.     Do Until Mid(Writer, I, Len(Sost.Text)) = Sost.Text And (Len(Writer) - Len(Sost.Text) + 1)
  12.         I = I + 1
  13.             If Mid(Writer, I, Len(Sost.Text)) = Sost.Text Then Trova
  14.     Loop
  15. End Sub
  16.  
  17. Private Sub cmdFine_Click()
  18. EndSost = True
  19. Me.Hide
  20. End Sub
  21.  
  22. Private Sub cmdSostAll_Click()
  23. Dim testo1, testo2 As String
  24.     For I = 1 To Len(Writer) - Len(Sost.Text) + 1
  25.             If Mid(Writer, I, Len(Sost.Text)) = Sost.Text Then
  26.                 testo1 = Left(Writer, I - 1)
  27.                 testo2 = Right(Writer, Len(Writer) - I - Len(Sost.Text) + 1)
  28.                 Writer = testo1 & NewSost.Text & testo2
  29.                 Me.Caption = Writer
  30.                 EndSost = True
  31.             End If
  32.     Next I
  33.     If EndSost = False Then MsgBox """" & Sost & """" & " non trovato", vbOKOnly, "Blocco Note"
  34. End Sub
  35.  
  36. Private Sub Form_Load()
  37. DisabilitaTasti
  38. I = 0
  39. End Sub
  40.  
  41. Private Sub Sost_Change()
  42.     If Sost.Text = "" Then DisabilitaTasti
  43.     If Sost.Text <> "" Then
  44.         cmdSost.Enabled = True
  45.         cmdSostAll.Enabled = True
  46.         cmdTrovaSucc.Enabled = True
  47.     End If
  48. End Sub