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
Ascii Name Maker - Form1.vb

Form1.vb

Caricato da:
Scarica il programma completo

  1. Imports System
  2. Imports System.Drawing
  3. Imports System.Collections
  4. Imports System.ComponentModel
  5. Imports System.Windows.Forms
  6. Imports System.Data
  7. Imports System.IO
  8.  
  9. Namespace WindowsApplication31
  10.    '/ <summary>
  11.    '/ Descrizione di riepilogo per Form1.
  12.    '/ </summary>
  13.    
  14.    Public Class Form1
  15.       Inherits System.Windows.Forms.Form
  16.      
  17.       Private WithEvents o As System.Windows.Forms.TextBox
  18.       Private WithEvents button2 As System.Windows.Forms.Button
  19.       Private label1 As System.Windows.Forms.Label
  20.       Private label2 As System.Windows.Forms.Label
  21.       Private WithEvents button3 As System.Windows.Forms.Button
  22.       Private WithEvents button1 As System.Windows.Forms.Button
  23.       Private WithEvents i1 As System.Windows.Forms.TextBox
  24.       Private WithEvents button4 As System.Windows.Forms.Button
  25.       Private pictureBox1 As System.Windows.Forms.PictureBox
  26.       '/ <summary>
  27.       '/ Variabile di progettazione necessaria.
  28.       '/ </summary>
  29.       Private components As System.ComponentModel.Container = Nothing
  30.      
  31.      
  32.       Public Sub New()
  33.          '
  34.          ' Necessario per il supporto di Progettazione Windows Form
  35.          '
  36.          InitializeComponent()
  37.       End Sub 'New
  38.        
  39.       '
  40.       ' TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
  41.       '
  42.      
  43.       '/ <summary>
  44.       '/ Pulire le risorse in uso.
  45.       '/ </summary>
  46.       Protected Overrides Sub Dispose(disposing As Boolean)
  47.          If disposing Then
  48.             If Not (components Is Nothing) Then
  49.                components.Dispose()
  50.             End If
  51.          End If
  52.          MyBase.Dispose(disposing)
  53.       End Sub 'Dispose
  54.      
  55.       #Region "Codice generato da Progettazione Windows Form"
  56.      
  57.       '/ <summary>
  58.       '/ Metodo necessario per il supporto della finestra di progettazione. Non modificare
  59.       '/ il contenuto del metodo con l'editor di codice.
  60.       '/ </summary>
  61.       Private Sub InitializeComponent()
  62.          Dim resources As New System.Resources.ResourceManager(GetType(Form1))
  63.          Me.i1 = New System.Windows.Forms.TextBox()
  64.          Me.o = New System.Windows.Forms.TextBox()
  65.          Me.button2 = New System.Windows.Forms.Button()
  66.          Me.label1 = New System.Windows.Forms.Label()
  67.          Me.label2 = New System.Windows.Forms.Label()
  68.          Me.button3 = New System.Windows.Forms.Button()
  69.          Me.button1 = New System.Windows.Forms.Button()
  70.          Me.button4 = New System.Windows.Forms.Button()
  71.          Me.pictureBox1 = New System.Windows.Forms.PictureBox()
  72.          Me.SuspendLayout()
  73.          '
  74.          ' i1
  75.          '
  76.          Me.i1.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  77.          Me.i1.ForeColor = System.Drawing.Color.Black '
  78.          'ToDo: Error processing original source shown below
  79.          '   this.i1.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  80.          '   this.i1.ForeColor = System.Drawing.Color.Black;
  81.          '------------------------------------------------------------------^--- Numeric constant overflow
  82.          Me.i1.Location = New System.Drawing.Point(16, 56)
  83.          Me.i1.Name = "i1"
  84.          Me.i1.Size = New System.Drawing.Size(280, 23)
  85.          Me.i1.TabIndex = 0
  86.          Me.i1.Text = "SataNa"
  87.          '
  88.          ' o
  89.          '
  90.          Me.o.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  91.          Me.o.ForeColor = System.Drawing.Color.Black '
  92.          'ToDo: Error processing original source shown below
  93.          '   this.o.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  94.          '   this.o.ForeColor = System.Drawing.Color.Black;
  95.          '-----------------------------------------------------------------^--- Numeric constant overflow
  96.          Me.o.Location = New System.Drawing.Point(16, 128)
  97.          Me.o.Name = "o"
  98.          Me.o.ReadOnly = True
  99.          Me.o.Size = New System.Drawing.Size(280, 23)
  100.          Me.o.TabIndex = 1
  101.          Me.o.Text = ""
  102.          '
  103.          ' button2
  104.          '
  105.          Me.button2.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  106.          Me.button2.ForeColor = System.Drawing.Color.Lime '
  107.          'ToDo: Error processing original source shown below
  108.          '   this.button2.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  109.          '   this.button2.ForeColor = System.Drawing.Color.Lime;
  110.          '-----------------------------------------------------------------------^--- Numeric constant overflow
  111.          Me.button2.Location = New System.Drawing.Point(16, 176)
  112.          Me.button2.Name = "button2"
  113.          Me.button2.Size = New System.Drawing.Size(96, 32)
  114.          Me.button2.TabIndex = 3
  115.          Me.button2.Text = "CaNCeLLa"
  116.          '
  117.          ' label1
  118.          '
  119.          Me.label1.Font = New System.Drawing.Font("Comic Sans MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  120.          Me.label1.ForeColor = System.Drawing.Color.Lime
  121.          Me.label1.Location = New System.Drawing.Point(16, 16)
  122.          Me.label1.Name = "label1"
  123.          Me.label1.Size = New System.Drawing.Size(96, 16)
  124.          Me.label1.TabIndex = 6
  125.          Me.label1.Text = "NiCk NoRMaLe"
  126.          '
  127.          ' label2
  128.          '
  129.          Me.label2.Font = New System.Drawing.Font("Comic Sans MS", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  130.          Me.label2.ForeColor = System.Drawing.Color.Lime
  131.          Me.label2.Location = New System.Drawing.Point(16, 96)
  132.          Me.label2.Name = "label2"
  133.          Me.label2.Size = New System.Drawing.Size(96, 16)
  134.          Me.label2.TabIndex = 7
  135.          Me.label2.Text = "NiCk In ASCII"
  136.          '
  137.          ' button3
  138.          '
  139.          Me.button3.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  140.          Me.button3.ForeColor = System.Drawing.Color.Lime '
  141.          'ToDo: Error processing original source shown below
  142.          '   this.button3.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  143.          '   this.button3.ForeColor = System.Drawing.Color.Lime;
  144.          '-----------------------------------------------------------------------^--- Numeric constant overflow
  145.          Me.button3.Location = New System.Drawing.Point(344, 176)
  146.          Me.button3.Name = "button3"
  147.          Me.button3.Size = New System.Drawing.Size(96, 32)
  148.          Me.button3.TabIndex = 8
  149.          Me.button3.Text = "CoPiA"
  150.          '
  151.          ' button1
  152.          '
  153.          Me.button1.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  154.          Me.button1.ForeColor = System.Drawing.Color.Lime '
  155.          'ToDo: Error processing original source shown below
  156.          '   this.button1.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  157.          '   this.button1.ForeColor = System.Drawing.Color.Lime;
  158.          '-----------------------------------------------------------------------^--- Numeric constant overflow
  159.          Me.button1.Location = New System.Drawing.Point(16, 232)
  160.          Me.button1.Name = "button1"
  161.          Me.button1.Size = New System.Drawing.Size(128, 32)
  162.          Me.button1.TabIndex = 9
  163.          Me.button1.Text = "DeCoRaZioNi"
  164.          '
  165.          ' button4
  166.          '
  167.          Me.button4.Font = New System.Drawing.Font("Comic Sans MS", __unknown, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, System.Byte))
  168.          Me.button4.ForeColor = System.Drawing.Color.Lime '
  169.          'ToDo: Error processing original source shown below
  170.          '   this.button4.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  171.          '   this.button4.ForeColor = System.Drawing.Color.Lime;
  172.          '-----------------------------------------------------------------------^--- Numeric constant overflow
  173.          '
  174.          'ToDo: Error processing original source shown below
  175.          '   //
  176.          '   this.i1.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  177.          '-----------------------------------------------------------------^--- expression expected
  178.          '
  179.          'ToDo: Error processing original source shown below
  180.          '   //
  181.          '   this.o.Font = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  182.          '----------------------------------------------------------------^--- expression expected
  183.          '
  184.          'ToDo: Error processing original source shown below
  185.          '   //
  186.          '   this.button2.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  187.          '----------------------------------------------------------------------^--- expression expected
  188.          '
  189.          'ToDo: Error processing original source shown below
  190.          '   //
  191.          '   this.button3.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  192.          '----------------------------------------------------------------------^--- expression expected
  193.          '
  194.          'ToDo: Error processing original source shown below
  195.          '   //
  196.          '   this.button1.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  197.          '----------------------------------------------------------------------^--- expression expected
  198.          '
  199.          'ToDo: Error processing original source shown below
  200.          '   //
  201.          '   this.button4.Font = new System.Drawing.Font("Comic Sans MS", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  202.          '----------------------------------------------------------------------^--- expression expected
  203.          Me.button4.Location = New System.Drawing.Point(344, 232)
  204.          Me.button4.Name = "button4"
  205.          Me.button4.Size = New System.Drawing.Size(96, 32)
  206.          Me.button4.TabIndex = 10
  207.          Me.button4.Text = "InFo"
  208.          '
  209.          ' pictureBox1
  210.          '
  211.          Me.pictureBox1.BackColor = System.Drawing.Color.Transparent
  212.          Me.pictureBox1.Image = CType(resources.GetObject("pictureBox1.Image"), System.Drawing.Image)
  213.          Me.pictureBox1.Location = New System.Drawing.Point(312, 8)
  214.          Me.pictureBox1.Name = "pictureBox1"
  215.          Me.pictureBox1.Size = New System.Drawing.Size(136, 128)
  216.          Me.pictureBox1.TabIndex = 11
  217.          Me.pictureBox1.TabStop = False
  218.          '
  219.          ' Form1
  220.          '
  221.          Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  222.          Me.BackColor = System.Drawing.Color.Black
  223.          Me.ClientSize = New System.Drawing.Size(450, 272)
  224.          Me.Controls.Add(pictureBox1)
  225.          Me.Controls.Add(button4)
  226.          Me.Controls.Add(button1)
  227.          Me.Controls.Add(button3)
  228.          Me.Controls.Add(label2)
  229.          Me.Controls.Add(label1)
  230.          Me.Controls.Add(button2)
  231.          Me.Controls.Add(o)
  232.          Me.Controls.Add(i1)
  233.          Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
  234.          Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
  235.          Me.MaximizeBox = False
  236.          Me.MinimizeBox = False
  237.          Me.Name = "Form1"
  238.          Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  239.          Me.Text = "  M|<R 1.2"
  240.          Me.ResumeLayout(False)
  241.       End Sub 'InitializeComponent
  242.       #End Region
  243.      
  244.      
  245.       '/ <summary>
  246.       '/ Il punto di ingresso principale dell'applicazione.
  247.       '/ </summary>
  248.       <STAThread()>  _
  249.       Shared Sub Main()
  250.          Application.Run(New SplashScreen())
  251.          Application.Run(New Form1())
  252.       End Sub 'Main
  253.      
  254.      
  255.       Private Sub button1_Click(sender As Object, e As System.EventArgs)
  256.       End Sub 'button1_Click
  257.      
  258.      
  259.      
  260.      
  261.       Private Sub button2_Click(sender As Object, e As System.EventArgs) Handles button2.Click
  262.          i1.Text = ""
  263.          o.Text = ""
  264.       End Sub 'button2_Click
  265.      
  266.      
  267.       Private Sub button3_Click(sender As Object, e As System.EventArgs)
  268.          Clipboard.SetDataObject(o.Text)
  269.       End Sub 'button3_Click
  270.      
  271.      
  272.       Private Sub o_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles o.KeyPress
  273.          If e.KeyChar = Convert.ToChar(Keys.Clear) OrElse e.KeyChar = Convert.ToChar(Keys.Cancel) OrElse e.KeyChar = Convert.ToChar(Keys.Delete) OrElse e.KeyChar = Convert.ToChar(Keys.Back) OrElse e.KeyChar = Convert.ToChar(Keys.BrowserBack) Then
  274.             Return
  275.          End If
  276.          Select Case e.KeyChar
  277.             Case "a"c
  278.                o.Text += ""
  279.             Case "b"c
  280.                o.Text += ""
  281.             Case "c"c
  282.                o.Text += ""
  283.             Case "e"c
  284.                o.Text += ""
  285.             Case "f"c
  286.                o.Text += ""
  287.             Case "h"c
  288.                o.Text += "h"
  289.             Case "H"c
  290.                o.Text += "][=]["
  291.             Case "n"c
  292.                o.Text += ""
  293.             Case "N"c
  294.                o.Text += ""
  295.             Case "o"c
  296.                o.Text += ""
  297.             Case "r"c
  298.                o.Text += ""
  299.             Case "s"c
  300.                o.Text += "$"
  301.             Case "t"c
  302.                o.Text += ""
  303.             Case "T"c
  304.                o.Text += "']['"
  305.             Case "A"c
  306.                o.Text += ""
  307.             Case "B"c
  308.                o.Text += "|8"
  309.             Case "C"c
  310.                o.Text += ""
  311.             Case "D"c
  312.                o.Text += ""
  313.             Case "E"c
  314.                o.Text += ""
  315.             Case "F"c
  316.                o.Text += ""
  317.             Case "I"c
  318.                o.Text += "]["
  319.             Case "L"c
  320.                o.Text += "]_"
  321.             Case "M"c
  322.                o.Text += "][V]["
  323.             Case "O"c
  324.                o.Text += ""
  325.             Case "S"c
  326.                o.Text += ""
  327.             Case "U"c
  328.                o.Text += ""
  329.             Case "y"c
  330.                o.Text += ""
  331.             Case "Y"c
  332.                o.Text += ""
  333.             Case "K"c
  334.                o.Text += "|<"
  335.             Case "W"c
  336.                o.Text += "\X//"
  337.            
  338.             Case Else
  339.                o.Text += e.KeyChar.ToString()
  340.          End Select
  341.       End Sub 'o_KeyPress
  342.      
  343.      
  344.       Private Sub i_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles i1.KeyPress
  345.       End Sub 'i_KeyPress
  346.      
  347.      
  348.       Private Sub button4_Click(sender As Object, e As System.EventArgs)
  349.       End Sub 'button4_Click
  350.      
  351.      
  352.      
  353.       Private Sub o_TextChanged(sender As Object, e As System.EventArgs) Handles o.TextChanged
  354.       End Sub 'o_TextChanged
  355.      
  356.      
  357.      
  358.       Private Sub button1_Click_1(sender As Object, e As System.EventArgs) Handles button1.Click
  359.          Dim f As New Form2()
  360.          f.ShowDialog()
  361.       End Sub 'button1_Click_1
  362.        
  363.      
  364.       Private Sub i_TextChanged(sender As Object, e As System.EventArgs) Handles i1.TextChanged
  365.          
  366.          
  367.          o.Text = ""
  368.          Dim i As Integer
  369.          For i = 0 To i1.Text.Length - 1
  370.             Dim c As Char = i1.Text(i)
  371.             Select Case c
  372.                Case "a"c
  373.                   o.Text += ""
  374.                Case "b"c
  375.                   o.Text += ""
  376.                Case "c"c
  377.                   o.Text += ""
  378.                Case "e"c
  379.                   o.Text += ""
  380.                Case "f"c
  381.                   o.Text += ""
  382.                Case "h"c
  383.                   o.Text += "h"
  384.                Case "H"c
  385.                   o.Text += "][=]["
  386.                Case "n"c
  387.                   o.Text += ""
  388.                Case "N"c
  389.                   o.Text += ""
  390.                Case "o"c
  391.                   o.Text += ""
  392.                Case "r"c
  393.                   o.Text += ""
  394.                Case "s"c
  395.                   o.Text += "$"
  396.                Case "t"c
  397.                   o.Text += ""
  398.                Case "T"c
  399.                   o.Text += "']['"
  400.                Case "A"c
  401.                   o.Text += ""
  402.                Case "B"c
  403.                   o.Text += "|8"
  404.                Case "C"c
  405.                   o.Text += ""
  406.                Case "D"c
  407.                   o.Text += ""
  408.                Case "E"c
  409.                   o.Text += ""
  410.                Case "F"c
  411.                   o.Text += ""
  412.                Case "I"c
  413.                   o.Text += "]["
  414.                Case "L"c
  415.                   o.Text += "]_"
  416.                Case "M"c
  417.                   o.Text += "][V]["
  418.                Case "O"c
  419.                   o.Text += ""
  420.                Case "S"c
  421.                   o.Text += ""
  422.                Case "U"c
  423.                   o.Text += ""
  424.                Case "y"c
  425.                   o.Text += ""
  426.                Case "Y"c
  427.                   o.Text += ""
  428.                Case "K"c
  429.                   o.Text += "|<"
  430.                Case "W"c
  431.                   o.Text += "\X//"
  432.                Case Else
  433.                   o.Text += c.ToString()
  434.             End Select
  435.          Next i
  436.       End Sub 'i_TextChanged
  437.      
  438.      
  439.       Private Sub button4_Click_1(sender As Object, e As System.EventArgs) Handles button4.Click
  440.          Dim p As New Form3()
  441.          p.ShowDialog()
  442.       End Sub 'button4_Click_1
  443.      
  444.      
  445.       Private Sub button3_Click_1(sender As Object, e As System.EventArgs) Handles button3.Click
  446.          Clipboard.SetDataObject(o.Text)
  447.       End Sub 'button3_Click_1
  448.      
  449.      
  450.       Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
  451.       End Sub 'Form1_Load
  452.    End Class 'Form1
  453. End Namespace 'WindowsApplication31