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
Codici - aiken.vb

aiken.vb

Caricato da:
Scarica il programma completo

  1. Public Class aiken
  2.     Inherits System.Windows.Forms.Form
  3.  
  4. #Region " Codice generato da Progettazione Windows Form "
  5.  
  6.     Public Sub New()
  7.         MyBase.New()
  8.  
  9.         'Chiamata richiesta da Progettazione Windows Form.
  10.         InitializeComponent()
  11.  
  12.         'Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent()
  13.  
  14.     End Sub
  15.  
  16.     'Form esegue l'override del metodo Dispose per pulire l'elenco dei componenti.
  17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  18.         If disposing Then
  19.             If Not (components Is Nothing) Then
  20.                 components.Dispose()
  21.             End If
  22.         End If
  23.         MyBase.Dispose(disposing)
  24.     End Sub
  25.  
  26.     'Richiesto da Progettazione Windows Form
  27.     Private components As System.ComponentModel.IContainer
  28.  
  29.     'NOTA: la procedura che segue è richiesta da Progettazione Windows Form.
  30.     'Può essere modificata in Progettazione Windows Form.  
  31.     'Non modificarla nell'editor del codice.
  32.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  33.     Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
  34.     Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
  35.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  36.         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(aiken))
  37.         Me.TextBox1 = New System.Windows.Forms.TextBox
  38.         Me.TextBox2 = New System.Windows.Forms.TextBox
  39.         Me.TextBox3 = New System.Windows.Forms.TextBox
  40.         Me.SuspendLayout()
  41.         '
  42.         'TextBox1
  43.         '
  44.         Me.TextBox1.BackColor = System.Drawing.Color.White
  45.         Me.TextBox1.Location = New System.Drawing.Point(8, 8)
  46.         Me.TextBox1.MaxLength = 1
  47.         Me.TextBox1.Name = "TextBox1"
  48.         Me.TextBox1.Size = New System.Drawing.Size(24, 20)
  49.         Me.TextBox1.TabIndex = 0
  50.         Me.TextBox1.Text = ""
  51.         Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
  52.         '
  53.         'TextBox2
  54.         '
  55.         Me.TextBox2.BackColor = System.Drawing.Color.White
  56.         Me.TextBox2.Location = New System.Drawing.Point(40, 8)
  57.         Me.TextBox2.MaxLength = 1
  58.         Me.TextBox2.Name = "TextBox2"
  59.         Me.TextBox2.ReadOnly = True
  60.         Me.TextBox2.Size = New System.Drawing.Size(320, 20)
  61.         Me.TextBox2.TabIndex = 1
  62.         Me.TextBox2.Text = ""
  63.         '
  64.         'TextBox3
  65.         '
  66.         Me.TextBox3.BackColor = System.Drawing.Color.White
  67.         Me.TextBox3.Location = New System.Drawing.Point(8, 32)
  68.         Me.TextBox3.MaxLength = 1
  69.         Me.TextBox3.Multiline = True
  70.         Me.TextBox3.Name = "TextBox3"
  71.         Me.TextBox3.ReadOnly = True
  72.         Me.TextBox3.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
  73.         Me.TextBox3.Size = New System.Drawing.Size(352, 64)
  74.         Me.TextBox3.TabIndex = 2
  75.         Me.TextBox3.Text = ""
  76.         '
  77.         'aiken
  78.         '
  79.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  80.         Me.ClientSize = New System.Drawing.Size(366, 100)
  81.         Me.Controls.Add(Me.TextBox3)
  82.         Me.Controls.Add(Me.TextBox2)
  83.         Me.Controls.Add(Me.TextBox1)
  84.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
  85.         Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
  86.         Me.MaximizeBox = False
  87.         Me.Name = "aiken"
  88.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  89.         Me.Text = "Aiken"
  90.         Me.ResumeLayout(False)
  91.  
  92.     End Sub
  93.  
  94. #End Region
  95.  
  96.     Private Sub Form2_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
  97.         Dim iniz As New iniz
  98.         iniz.Show()
  99.     End Sub
  100.  
  101.     Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  102.         Select Case TextBox1.Text
  103.             Case "0"
  104.                 TextBox2.Text = TextBox2.Text & "0"
  105.                 TextBox3.Text = TextBox3.Text & "0000"
  106.                 TextBox1.SelectAll()
  107.             Case "1"
  108.                 TextBox2.Text = TextBox2.Text & "1"
  109.                 TextBox3.Text = TextBox3.Text & "0001"
  110.                 TextBox1.SelectAll()
  111.             Case "2"
  112.                 TextBox2.Text = TextBox2.Text & "2"
  113.                 TextBox3.Text = TextBox3.Text & "0010"
  114.                 TextBox1.SelectAll()
  115.             Case "3"
  116.                 TextBox2.Text = TextBox2.Text & "3"
  117.                 TextBox3.Text = TextBox3.Text & "0011"
  118.                 TextBox1.SelectAll()
  119.             Case "4"
  120.                 TextBox2.Text = TextBox2.Text & "4"
  121.                 TextBox3.Text = TextBox3.Text & "0100"
  122.                 TextBox1.SelectAll()
  123.             Case "5"
  124.                 TextBox2.Text = TextBox2.Text & "5"
  125.                 TextBox3.Text = TextBox3.Text & "1011"
  126.                 TextBox1.SelectAll()
  127.             Case "6"
  128.                 TextBox2.Text = TextBox2.Text & "6"
  129.                 TextBox3.Text = TextBox3.Text & "1100"
  130.                 TextBox1.SelectAll()
  131.             Case "7"
  132.                 TextBox2.Text = TextBox2.Text & "7"
  133.                 TextBox3.Text = TextBox3.Text & "1101"
  134.                 TextBox1.SelectAll()
  135.             Case "8"
  136.                 TextBox2.Text = TextBox2.Text & "8"
  137.                 TextBox3.Text = TextBox3.Text & "1110"
  138.                 TextBox1.SelectAll()
  139.             Case "9"
  140.                 TextBox2.Text = TextBox2.Text & "9"
  141.                 TextBox3.Text = TextBox3.Text & "1111"
  142.                 TextBox1.SelectAll()
  143.             Case Else
  144.                 MsgBox("Immettere solo valori numerici", MsgBoxStyle.Critical, Me.Text)
  145.         End Select
  146.     End Sub
  147.  
  148.     Private Sub Form2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
  149.         If e.KeyChar = Microsoft.VisualBasic.ChrW(27) = True Then MsgBox("")
  150.     End Sub
  151.  
  152.     Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
  153.         If e.KeyChar = Microsoft.VisualBasic.ChrW(27) = True Then Me.Close()
  154.     End Sub
  155.  
  156.     Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
  157.         If e.KeyChar = Microsoft.VisualBasic.ChrW(27) = True Then Me.Close()
  158.     End Sub
  159.  
  160.     Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
  161.         If e.KeyChar = Microsoft.VisualBasic.ChrW(27) = True Then Me.Close()
  162.     End Sub
  163. End Class