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
QHTML 2.0 - frmLink.vb

frmLink.vb

Caricato da: Totem
Scarica il programma completo

  1. Imports QHTML.frmQHTML
  2. Public Class frmLink
  3.     Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click
  4.         Dim Result As String = "<a href="
  5.  
  6.         If txtURL.Text.Length = 0 Then
  7.             MsgBox("Il percorso del link è necessario!", MsgBoxStyle.Exclamation)
  8.             Exit Sub
  9.         End If
  10.         If txtText.Text = Nothing Then
  11.             txtText.Text = txtURL.Text
  12.         End If
  13.  
  14.         If cmbLinkType.SelectedIndex = 0 Then
  15.             Result += Quote + txtURL.Text + Quote
  16.         End If
  17.         If cmbLinkType.SelectedIndex = 1 Then
  18.             Result += Quote + "mailto:" + txtURL.Text + Quote
  19.         End If
  20.  
  21.         Result += " title=" + Quote + txtTip.Text + Quote
  22.         Result += " target=" + Quote + cmbTarget.SelectedItem + Quote
  23.         If txtKey.Text.Length > 0 Then
  24.             Result += " accesskey=" + Quote + txtKey.Text.Chars(0) + Quote
  25.         End If
  26.         Result += ">" + txtText.Text + "</a>"
  27.  
  28.         InsertTAG(Result)
  29.  
  30.         Me.Close()
  31.     End Sub
  32.     Private Sub frmLink_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  33.         cmbTarget.SelectedIndex = 0
  34.     End Sub
  35. End Class