Advertisement
Aminpro

Visual Basic Frame 1 ver 2

Aug 10th, 2011
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.  
  3.  
  4.  
  5.     Private Property IsNullOrEmpty As String
  6.  
  7.     Private Property DateAndTime As String
  8.  
  9.  
  10.  
  11.     'Created by Aminpro
  12.  
  13.     'Written by Aminpro
  14.    'LoL
  15.    'Do not steal!
  16.    'Seriously?
  17.  
  18.     'The main subject is the textbox input
  19.    'Textbox input name is defcon1
  20.    'Output is directly changed in defcon1
  21.    'Secondary subject is the picturebox's result
  22.    'picturebox's result is named defcon2
  23.  
  24.     'defcon1 is textbox
  25.    'defcon2 is picturebox
  26.  
  27.  
  28.     Private Sub cancelbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cancelbutton.Click
  29.         defcon1.Clear()
  30.         defcon2.Image = Nothing
  31.         arialchoose.Checked = False
  32.         calibrichoose.Checked = False
  33.         papyruschoose.Checked = False
  34.         timeschoose.Checked = False
  35.         boldcheck.CheckState = CheckState.Unchecked
  36.         italiccheck.CheckState = CheckState.Unchecked
  37.         underlinecheck.CheckState = CheckState.Unchecked'Created by Aminpro
  38.        normalchoose.Checked = False'Created by Aminpro
  39.        strechimagechoose.Checked = False
  40.         autosizechoose.Checked = False'Created by Aminpro
  41.        centerimagechoose.Checked = False
  42.         zoomchoose.Checked = False
  43.         textoptionlabel.Text = "Text Font"'Created by Aminpro
  44.        textpropertieslabel.Text = "Text Properties"
  45.         pictureoptionlabel.Text = "PictureBox Option"
  46.         picturelabel.Text = "Selected Picture"
  47.         picturelist.SelectedItem = IsNullOrEmpty'Created by Aminpro
  48.        listboxlabel.Text = "Select an item"
  49.         MsgBox("All fields have been reset")
  50.         actionlabel.Text = "Text and Picture cleared"'Created by Aminpro
  51.        'Created by Aminpro
  52.  
  53.  
  54.     End Sub
  55.  
  56.     Private Sub yeahbutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles yeahbutton.Click
  57.         defcon1.Copy()
  58.         actionlabel.Text = "Text copied"
  59.         'Created by Aminpro
  60.    End Sub
  61.  
  62.     Private Sub nobutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nobutton.Click
  63.         defcon1.Paste()
  64.         actionlabel.Text = "Text pasted from clipboard"
  65.         'Created by Aminpro
  66.    End Sub
  67.  
  68.     Private Sub arialchoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arialchoose.CheckedChanged
  69.         defcon1.Font = New Font("Arial", 12, defcon1.Font.Style)'Created by Aminpro
  70.    End Sub
  71.  
  72.     Private Sub calibrichoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calibrichoose.CheckedChanged
  73.         defcon1.Font = New Font("calibri", 12, defcon1.Font.Style)'Created by Aminpro
  74.        textoptionlabel.Text = "Calibri font selected"
  75.     End Sub
  76.  
  77.     Private Sub papyruschoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles papyruschoose.CheckedChanged
  78.         defcon1.Font = New Font("papyrus", 12, defcon1.Font.Style)
  79.         textoptionlabel.Text = "Papyrus font selected"'Created by Aminpro
  80.    End Sub
  81. 'Created by Aminpro
  82.    Private Sub timeschoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timeschoose.CheckedChanged
  83.         defcon1.Font = New Font("Times New Roman", 12, defcon1.Font.Style)
  84.         textoptionlabel.Text = "Times New Roman font selected"'Created by Aminpro
  85.    End Sub
  86. 'Created by Aminpro
  87.    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles defcon1.TextChanged, underlinecheck.CheckedChanged, italiccheck.CheckedChanged, boldcheck.CheckedChanged
  88.         'Displays the text typed into the input box realtime
  89.        If defcon1.Text = IsNullOrEmpty Then
  90.             originaltextlabel.Text = "Enter your text"'Created by Aminpro
  91.        Else
  92.             originaltextlabel.Text = defcon1.Text
  93.         End If
  94.         'Created by Aminpro
  95.        'Created by Aminpro
  96.    End Sub
  97.  
  98.     Private Sub boldcheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles boldcheck.CheckedChanged
  99.         If boldcheck.Checked Then
  100.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style + FontStyle.Bold)
  101.         Else
  102.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style - FontStyle.Bold)
  103.         End If
  104.         textpropertieslabel.Text = defcon1.Font.Style.ToString'Created by Aminpro
  105.    End Sub
  106.  
  107.     Private Sub italiccheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles italiccheck.CheckedChanged
  108.         If italiccheck.Checked Then
  109.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style + FontStyle.Italic)
  110.         Else
  111.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style - FontStyle.Italic)
  112.         End If
  113.         textpropertieslabel.Text = defcon1.Font.Style.ToString'Created by Aminpro
  114.    End Sub
  115.  
  116.     Private Sub underlinecheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles underlinecheck.CheckedChanged
  117.         If underlinecheck.Checked Then
  118.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style + FontStyle.Underline)
  119.         Else
  120.             defcon1.Font = New Font(defcon1.Font, defcon1.Font.Style - FontStyle.Underline)
  121.         End If'Created by Aminpro
  122.        textpropertieslabel.Text = defcon1.Font.Style.ToString
  123.     End Sub
  124.  
  125.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  126.         textpropertieslabel.Text = defcon1.Font.Style.ToString
  127.     End Sub'Created by Aminpro
  128.    'Created by Aminpro
  129.    Private Sub normalchoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles normalchoose.CheckedChanged
  130.         defcon2.SizeMode = PictureBoxSizeMode.Normal
  131.         pictureoptionlabel.Text = "Normal picture"
  132.  
  133.     End Sub
  134.  
  135.     Private Sub strechimagechoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles strechimagechoose.CheckedChanged
  136.         defcon2.SizeMode = PictureBoxSizeMode.StretchImage
  137.         pictureoptionlabel.Text = "Picture streched"'Created by Aminpro
  138.    End Sub
  139.  
  140.     Private Sub autosizechoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles autosizechoose.CheckedChanged
  141.         defcon2.SizeMode = PictureBoxSizeMode.AutoSize
  142.         pictureoptionlabel.Text = "Picture size is auto"
  143.     End Sub'Created by Aminpro
  144.  
  145.     Private Sub centerimagechoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles centerimagechoose.CheckedChanged
  146.         defcon2.SizeMode = PictureBoxSizeMode.CenterImage
  147.         pictureoptionlabel.Text = "Picture is centered"
  148.     End Sub'Created by Aminpro
  149.  
  150.     Private Sub zoomchoose_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles zoomchoose.CheckedChanged
  151.         defcon2.SizeMode = PictureBoxSizeMode.Zoom
  152.         pictureoptionlabel.Text = "Picture is zoomed"'Created by Aminpro
  153.    End Sub
  154.  
  155.     'images avalaible
  156.    'ipod = 0
  157.    'hybrid = 1
  158.    'bike = 2'Created by Aminpro
  159.    'hack = 3
  160.    'repair = 4
  161.  
  162.     Private Sub defcon2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picturelist.SelectedValueChanged
  163.         If picturelist.SelectedItem = "iPod" Then
  164.             defcon2.Image = ImageList1.Images(0)'Created by Aminpro
  165.            picturelabel.Text = picturelist.SelectedItem()
  166.         End If
  167.         If picturelist.SelectedItem = "Hybrid" Then
  168.             defcon2.Image = ImageList1.Images(1)'Created by Aminpro
  169.            picturelabel.Text = picturelist.SelectedItem()
  170.         End If
  171.         If picturelist.SelectedItem = "Bike" Then
  172.             defcon2.Image = ImageList1.Images(2)'Created by Aminpro
  173.            picturelabel.Text = picturelist.SelectedItem()
  174.         End If
  175.         If picturelist.SelectedItem = "Hack n Dev" Then
  176.             defcon2.Image = ImageList1.Images(3)'Created by Aminpro
  177.            picturelabel.Text = picturelist.SelectedItem()
  178.         End If
  179.         If picturelist.SelectedItem = "Repair" Then
  180.             defcon2.Image = ImageList1.Images(4)'Created by Aminpro
  181.            picturelabel.Text = picturelist.SelectedItem()
  182.         End If
  183.         If picturelist.SelectedItem = "o_0" Then
  184.             defcon2.Image = ImageList1.Images(5)'Created by Aminpro
  185.            picturelabel.Text = picturelist.SelectedItem()
  186.         End If
  187.     End Sub
  188.  
  189.     Private Sub infobutton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles infobutton.Click
  190.         Dim aboutbox1 As AboutBox1'Created by Aminpro
  191.        aboutbox1 = New AboutBox1()
  192.         aboutbox1.Show()'Created by Aminpro
  193.        aboutbox1 = Nothing
  194.     End Sub'Created by Aminpro
  195.  
  196.     Private Sub listboxlabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChanged
  197.         listboxlabel.Text = ListBox1.SelectedItem
  198.     End Sub
  199. 'Created by Aminpro
  200.    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  201.         Dim form3 As Form3
  202.         form3 = New Form3()
  203.         form3.Show()'Created by Aminpro
  204.        form3 = Nothing
  205.     End Sub'Created by Aminpro
  206. End Class
  207. 'Created by Aminpro
  208. ' End LOL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement