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
GiusEditorHTML - frmEditor.frm

frmEditor.frm

Caricato da:
Scarica il programma completo

  1. Private Sub cmdSalva_Click()
  2.         If Len(Trim(txtNome.Text)) = 0 Then
  3.         MsgBox "Inserire il nome del file", vbCritical, "Errore"
  4.         txtNome.SetFocus
  5.         Exit Sub
  6.     End If
  7.         If Len(Trim(cmbTipo.Text)) = 0 Then
  8.         MsgBox "Inserire l'estensione del file", vbCritical, "Errore"
  9.         cmbTipo.SetFocus
  10.         Exit Sub
  11.     End If
  12.         Dim nome_file As String
  13.     nome_file = txtNome.Text & cmbTipo.Text
  14.     On Error Resume Next
  15.     Kill "C:\" & nome_file
  16.     Open "C:\" & nome_file For Append As #1
  17.         Print #1, txtCodice
  18.     Close #1
  19.     MsgBox "File " & nome_file & " creato con successo", vbOKOnly, "Conferma"
  20. End Sub
  21.  
  22. Private Sub Form_Load()
  23.    txtCodice = ""
  24.     txtCodice = txtCodice & "<html>" & vbCrLf
  25.     txtCodice = txtCodice & "<head>" & vbCrLf
  26.     txtCodice = txtCodice & "<title>HTML Editor</title>" & vbCrLf
  27.     txtCodice = txtCodice & "<head>" & vbCrLf
  28.     txtCodice = txtCodice & "<body>" & vbCrLf & vbCrLf & vbCrLf & vbCrLf
  29.     txtCodice = txtCodice & "</body>" & vbCrLf
  30.     txtCodice = txtCodice & "</html>" & vbCrLf
  31.     cmbTipo.AddItem (".htm")
  32.     cmbTipo.AddItem (".html")
  33.     cmbTipo.AddItem (".css")
  34.     cmbTipo.AddItem (".js")
  35.     cmbTipo.AddItem (".xml")
  36.     cmbTipo.AddItem (".xsl")
  37.     cmbTipo.AddItem (".asp")
  38.     cmbTipo.AddItem (".aspx")
  39.     cmbTipo.AddItem (".php")
  40.     cmbTipo.AddItem (".inc")
  41.     cmbTipo.AddItem (".txt")
  42. End Sub