Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Strict On
  2. Public Class Form1
  3.     Dim Dragging As Boolean
  4.     Dim PointClicked As Point
  5.    
  6.     Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click
  7.         Dim feet As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  8.         Try
  9.             feet = CDec(TextBox20.Text)
  10.             inch = (feet) * 12
  11.             TextBox19.Text = CStr((inch))
  12.             foot = (feet) * 1
  13.             TextBox18.Text = CStr((foot))
  14.             yard = (feet) / 3
  15.             TextBox17.Text = CStr((yard))
  16.             mile = (feet) / 5280
  17.             TextBox16.Text = CStr((mile))
  18.             milli = CDec((feet) * 304.8)
  19.             TextBox15.Text = CStr((milli))
  20.             centi = CDec((feet) * 30.48)
  21.             TextBox14.Text = CStr((centi))
  22.             deci = CDec((feet) * 3.048)
  23.             TextBox13.Text = CStr((deci))
  24.             meter = CDec((feet) * 0.3048)
  25.             TextBox12.Text = CStr((meter))
  26.             kilo = CDec((feet) * 0.0003048)
  27.             TextBox11.Text = CStr((kilo))
  28.  
  29.         Catch ex As Exception
  30.             MsgBox("Enter in a valid measurement to be convered")
  31.  
  32.         End Try
  33.     End Sub
  34.  
  35.     Private Sub Button36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36.Click
  36.         Dim yards As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  37.         Try
  38.             yards = CDec(TextBox30.Text)
  39.             inch = (yards) * 36
  40.             TextBox29.Text = CStr((inch))
  41.             foot = (yards) * 3
  42.             TextBox28.Text = CStr((foot))
  43.             yard = (yards) * 1
  44.             TextBox27.Text = CStr((yard))
  45.             mile = (yards) / 1760
  46.             TextBox26.Text = CStr((mile))
  47.             milli = CDec((yards) * 914.4)
  48.             TextBox25.Text = CStr((milli))
  49.             centi = CDec((yards) * 91.44)
  50.             TextBox24.Text = CStr((centi))
  51.             deci = CDec((yards) * 9.144)
  52.             TextBox23.Text = CStr((deci))
  53.             meter = CDec((yards) * 0.9144)
  54.             TextBox22.Text = CStr((meter))
  55.             kilo = CDec((yards) * 0.0009144)
  56.             TextBox21.Text = CStr((kilo))
  57.  
  58.         Catch ex As Exception
  59.             MsgBox("Enter in a valid measurement to be convered")
  60.  
  61.         End Try
  62.     End Sub
  63.  
  64.     Private Sub Button45_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button45.Click
  65.         Dim miles As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  66.         Try
  67.             miles = CDec(TextBox40.Text)
  68.             inch = (miles) * 63360
  69.             TextBox39.Text = CStr((inch))
  70.             foot = (miles) * 5280
  71.             TextBox38.Text = CStr((foot))
  72.             yard = (miles) * 1760
  73.             TextBox37.Text = CStr((yard))
  74.             mile = (miles) * 1
  75.             TextBox36.Text = CStr((mile))
  76.             milli = (miles) * 1609344
  77.             TextBox35.Text = CStr((milli))
  78.             centi = CDec((miles) * 160934.4)
  79.             TextBox34.Text = CStr((centi))
  80.             deci = CDec((miles) * 16093.44)
  81.             TextBox33.Text = CStr((deci))
  82.             meter = CDec((miles) * 1609.344)
  83.             TextBox32.Text = CStr((meter))
  84.             kilo = CDec((miles) * 1.609344)
  85.             TextBox31.Text = CStr((kilo))
  86.  
  87.         Catch ex As Exception
  88.             MsgBox("Enter in a valid measurement to be convered")
  89.  
  90.         End Try
  91.     End Sub
  92.  
  93.     Private Sub Button54_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button54.Click
  94.         Dim millis As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  95.         Try
  96.             millis = CDec(TextBox50.Text)
  97.             inch = CDec((millis) / 25.4)
  98.             TextBox49.Text = CStr((inch))
  99.             foot = CDec((millis) / 304.8)
  100.             TextBox48.Text = CStr((foot))
  101.             yard = CDec((millis) / 914.4)
  102.             TextBox47.Text = CStr((yard))
  103.             mile = (millis) / 1609344
  104.             TextBox46.Text = CStr((mile))
  105.             milli = (millis) * 1
  106.             TextBox45.Text = CStr((milli))
  107.             centi = (millis) / 10
  108.             TextBox44.Text = CStr((centi))
  109.             deci = (millis) / 100
  110.             TextBox43.Text = CStr((deci))
  111.             meter = (millis) / 1000
  112.             TextBox42.Text = CStr((meter))
  113.             kilo = (millis) / 1000000
  114.             TextBox41.Text = CStr((kilo))
  115.  
  116.         Catch ex As Exception
  117.             MsgBox("Enter in a valid measurement to be convered")
  118.  
  119.         End Try
  120.     End Sub
  121.  
  122.     Private Sub Button63_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button63.Click
  123.         Dim centis As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  124.         Try
  125.             centis = CDec(TextBox60.Text)
  126.             inch = CDec((centis) / 2.54)
  127.             TextBox59.Text = CStr((inch))
  128.             foot = CDec((centis) / 30.48)
  129.             TextBox58.Text = CStr((foot))
  130.             yard = CDec((centis) / 91.44)
  131.             TextBox57.Text = CStr((yard))
  132.             mile = CDec((centis) / 160934.4)
  133.             TextBox56.Text = CStr((mile))
  134.             milli = CDec((centis) * 0.1)
  135.             TextBox55.Text = CStr((milli))
  136.             centi = (centis) * 1
  137.             TextBox54.Text = CStr((centi))
  138.             deci = (centis) / 10
  139.             TextBox53.Text = CStr((deci))
  140.             meter = (centis) / 100
  141.             TextBox52.Text = CStr((meter))
  142.             kilo = (centis) / 100000
  143.             TextBox51.Text = CStr((kilo))
  144.  
  145.         Catch ex As Exception
  146.             MsgBox("Enter in a valid measurement to be convered")
  147.  
  148.         End Try
  149.     End Sub
  150.  
  151.     Private Sub Button72_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button72.Click
  152.         Dim decis As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  153.         Try
  154.             decis = CDec(TextBox70.Text)
  155.             inch = CDec((decis) / 0.254)
  156.             TextBox69.Text = CStr((inch))
  157.             foot = CDec((decis) / 3.048)
  158.             TextBox68.Text = CStr((foot))
  159.             yard = CDec((decis) / 9.144)
  160.             TextBox67.Text = CStr((yard))
  161.             mile = CDec((decis) / 16093.44)
  162.             TextBox66.Text = CStr((mile))
  163.             milli = (decis) * 100
  164.             TextBox65.Text = CStr((milli))
  165.             centi = (decis) * 10
  166.             TextBox64.Text = CStr((centi))
  167.             deci = (decis) * 1
  168.             TextBox63.Text = CStr((deci))
  169.             meter = CDec((decis) * 0.1)
  170.             TextBox62.Text = CStr((meter))
  171.             kilo = CDec((decis) * 0.0001)
  172.             TextBox61.Text = CStr((kilo))
  173.  
  174.         Catch ex As Exception
  175.             MsgBox("Enter in a valid measurement to be convered")
  176.  
  177.         End Try
  178.     End Sub
  179.  
  180.     Private Sub Button81_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button81.Click
  181.         Dim meters As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  182.         Try
  183.             meters = CDec(TextBox80.Text)
  184.             inch = CDec((meters) / 0.0254)
  185.             TextBox79.Text = CStr((inch))
  186.             foot = CDec((meters) / 0.3048)
  187.             TextBox78.Text = CStr((foot))
  188.             yard = CDec((meters) / 0.9144)
  189.             TextBox77.Text = CStr((yard))
  190.             mile = CDec((meters) / 1609.344)
  191.             TextBox76.Text = CStr((mile))
  192.             milli = (meters) * 1000
  193.             TextBox75.Text = CStr((milli))
  194.             centi = (meters) * 100
  195.             TextBox74.Text = CStr((centi))
  196.             deci = (meters) * 10
  197.             TextBox73.Text = CStr((deci))
  198.             meter = (meters) * 1
  199.             TextBox72.Text = CStr((meter))
  200.             kilo = CDec((meters) * 0.001)
  201.             TextBox71.Text = CStr((kilo))
  202.  
  203.         Catch ex As Exception
  204.             MsgBox("Enter in a valid measurement to be convered")
  205.  
  206.         End Try
  207.     End Sub
  208.  
  209.     Private Sub Button90_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button90.Click
  210.         Dim kilos As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  211.         Try
  212.             kilos = CDec(TextBox90.Text)
  213.             inch = CDec((kilos) * 39370.0787)
  214.             TextBox89.Text = CStr((inch))
  215.             foot = CDec((kilos) * 3280.8399)
  216.             TextBox88.Text = CStr((foot))
  217.             yard = CDec((kilos) / 0.0009144)
  218.             TextBox87.Text = CStr((yard))
  219.             mile = CDec((kilos) / 1.609344)
  220.             TextBox86.Text = CStr((mile))
  221.             milli = (kilos) * 1000000
  222.             TextBox85.Text = CStr((milli))
  223.             centi = (kilos) * 100000
  224.             TextBox84.Text = CStr((centi))
  225.             deci = (kilos) * 10000
  226.             TextBox83.Text = CStr((deci))
  227.             meter = (kilos) * 1000
  228.             TextBox82.Text = CStr((meter))
  229.             kilo = CDec((kilos) * 1)
  230.             TextBox81.Text = CStr((kilo))
  231.  
  232.         Catch ex As Exception
  233.             MsgBox("Enter in a valid measurement to be convered")
  234.  
  235.         End Try
  236.     End Sub
  237.  
  238.     Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
  239.         Clipboard.SetDataObject(TextBox2.Text)
  240.     End Sub
  241.  
  242.     Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
  243.         Clipboard.SetDataObject(TextBox3.Text)
  244.     End Sub
  245.  
  246.     Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
  247.         Clipboard.SetDataObject(TextBox4.Text)
  248.     End Sub
  249.  
  250.     Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
  251.         Clipboard.SetDataObject(TextBox5.Text)
  252.     End Sub
  253.  
  254.     Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
  255.         Clipboard.SetDataObject(TextBox6.Text)
  256.     End Sub
  257.  
  258.     Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
  259.         Clipboard.SetDataObject(TextBox7.Text)
  260.     End Sub
  261.  
  262.     Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
  263.         Clipboard.SetDataObject(TextBox8.Text)
  264.     End Sub
  265.  
  266.     Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
  267.         Clipboard.SetDataObject(TextBox9.Text)
  268.     End Sub
  269.  
  270.     Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
  271.         Clipboard.SetDataObject(TextBox10.Text)
  272.     End Sub
  273.  
  274.     Private Sub Button91_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button91.Click
  275.         Me.Close()
  276.     End Sub
  277.  
  278.     Private Sub Button92_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button92.Click
  279.         Me.Close()
  280.     End Sub
  281.  
  282.     Private Sub Button93_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button93.Click
  283.         Me.Close()
  284.     End Sub
  285.  
  286.     Private Sub Button94_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button94.Click
  287.         Me.Close()
  288.     End Sub
  289.  
  290.     Private Sub Button95_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button95.Click
  291.         Me.Close()
  292.     End Sub
  293.  
  294.     Private Sub Button96_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button96.Click
  295.         Me.Close()
  296.     End Sub
  297.  
  298.     Private Sub Button97_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button97.Click
  299.         Me.Close()
  300.     End Sub
  301.  
  302.     Private Sub Button98_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button98.Click
  303.         Me.Close()
  304.     End Sub
  305.  
  306.     Private Sub Button99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button99.Click
  307.         Me.Close()
  308.     End Sub
  309.  
  310.     Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
  311.         If e.KeyChar = "." Then
  312.             If TextBox1.Text.IndexOf(".") > -1 Then
  313.                 e.Handled = True
  314.             End If
  315.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  316.             e.Handled = True
  317.  
  318.         End If
  319.  
  320.     End Sub
  321.  
  322.     Private Sub TextBox20_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox20.KeyPress
  323.         If e.KeyChar = "." Then
  324.             If TextBox1.Text.IndexOf(".") > -1 Then
  325.                 e.Handled = True
  326.             End If
  327.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  328.             e.Handled = True
  329.  
  330.         End If
  331.     End Sub
  332.  
  333.     Private Sub TextBox30_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox30.KeyPress
  334.         If e.KeyChar = "." Then
  335.             If TextBox1.Text.IndexOf(".") > -1 Then
  336.                 e.Handled = True
  337.             End If
  338.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  339.             e.Handled = True
  340.  
  341.         End If
  342.     End Sub
  343.  
  344.     Private Sub TextBox40_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox40.KeyPress
  345.         If e.KeyChar = "." Then
  346.             If TextBox1.Text.IndexOf(".") > -1 Then
  347.                 e.Handled = True
  348.             End If
  349.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  350.             e.Handled = True
  351.  
  352.         End If
  353.     End Sub
  354.  
  355.     Private Sub TextBox50_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox50.KeyPress
  356.         If e.KeyChar = "." Then
  357.             If TextBox1.Text.IndexOf(".") > -1 Then
  358.                 e.Handled = True
  359.             End If
  360.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  361.             e.Handled = True
  362.  
  363.         End If
  364.     End Sub
  365.  
  366.     Private Sub TextBox60_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox60.KeyPress
  367.         If e.KeyChar = "." Then
  368.             If TextBox1.Text.IndexOf(".") > -1 Then
  369.                 e.Handled = True
  370.             End If
  371.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  372.             e.Handled = True
  373.  
  374.         End If
  375.     End Sub
  376.  
  377.     Private Sub TextBox70_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox70.KeyPress
  378.         If e.KeyChar = "." Then
  379.             If TextBox1.Text.IndexOf(".") > -1 Then
  380.                 e.Handled = True
  381.             End If
  382.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  383.             e.Handled = True
  384.  
  385.         End If
  386.     End Sub
  387.  
  388.     Private Sub TextBox80_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox80.KeyPress
  389.         If e.KeyChar = "." Then
  390.             If TextBox1.Text.IndexOf(".") > -1 Then
  391.                 e.Handled = True
  392.             End If
  393.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  394.             e.Handled = True
  395.  
  396.         End If
  397.     End Sub
  398.  
  399.     Private Sub TextBox90_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox90.KeyPress
  400.         If e.KeyChar = "." Then
  401.             If TextBox1.Text.IndexOf(".") > -1 Then
  402.                 e.Handled = True
  403.             End If
  404.         ElseIf Char.IsNumber(e.KeyChar) = False AndAlso Char.IsControl(e.KeyChar) = False Then
  405.             e.Handled = True
  406.  
  407.         End If
  408.     End Sub
  409.  
  410.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  411.         Clipboard.SetDataObject(TextBox19.Text)
  412.     End Sub
  413.  
  414.     Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click
  415.         Clipboard.SetDataObject(TextBox18.Text)
  416.     End Sub
  417.  
  418.     Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button25.Click
  419.         Clipboard.SetDataObject(TextBox17.Text)
  420.     End Sub
  421.  
  422.     Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button24.Click
  423.         Clipboard.SetDataObject(TextBox16.Text)
  424.     End Sub
  425.  
  426.     Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click
  427.         Clipboard.SetDataObject(TextBox15.Text)
  428.     End Sub
  429.  
  430.     Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click
  431.         Clipboard.SetDataObject(TextBox14.Text)
  432.     End Sub
  433.  
  434.     Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
  435.         Clipboard.SetDataObject(TextBox13.Text)
  436.     End Sub
  437.  
  438.     Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
  439.         Clipboard.SetDataObject(TextBox12.Text)
  440.     End Sub
  441.  
  442.     Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click
  443.         Clipboard.SetDataObject(TextBox11.Text)
  444.     End Sub
  445.  
  446.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  447.         Clipboard.SetDataObject(TextBox29.Text)
  448.     End Sub
  449.  
  450.     Private Sub Button35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button35.Click
  451.         Clipboard.SetDataObject(TextBox28.Text)
  452.     End Sub
  453.  
  454.     Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button34.Click
  455.         Clipboard.SetDataObject(TextBox27.Text)
  456.     End Sub
  457.  
  458.     Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click
  459.         Clipboard.SetDataObject(TextBox26.Text)
  460.     End Sub
  461.  
  462.     Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button31.Click
  463.         Clipboard.SetDataObject(TextBox25.Text)
  464.     End Sub
  465.  
  466.     Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click
  467.         Clipboard.SetDataObject(TextBox24.Text)
  468.     End Sub
  469.  
  470.     Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click
  471.         Clipboard.SetDataObject(TextBox23.Text)
  472.     End Sub
  473.  
  474.     Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click
  475.         Clipboard.SetDataObject(TextBox22.Text)
  476.     End Sub
  477.  
  478.     Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click
  479.         Clipboard.SetDataObject(TextBox21.Text)
  480.     End Sub
  481.  
  482.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  483.         Clipboard.SetDataObject(TextBox39.Text)
  484.     End Sub
  485.  
  486.     Private Sub Button44_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button44.Click
  487.         Clipboard.SetDataObject(TextBox38.Text)
  488.     End Sub
  489.  
  490.     Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button43.Click
  491.         Clipboard.SetDataObject(TextBox37.Text)
  492.     End Sub
  493.  
  494.     Private Sub Button42_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button42.Click
  495.         Clipboard.SetDataObject(TextBox36.Text)
  496.     End Sub
  497.  
  498.     Private Sub Button40_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button40.Click
  499.         Clipboard.SetDataObject(TextBox35.Text)
  500.     End Sub
  501.  
  502.     Private Sub Button41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button41.Click
  503.         Clipboard.SetDataObject(TextBox34.Text)
  504.     End Sub
  505.  
  506.     Private Sub Button38_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button38.Click
  507.         Clipboard.SetDataObject(TextBox33.Text)
  508.     End Sub
  509.  
  510.     Private Sub Button39_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button39.Click
  511.         Clipboard.SetDataObject(TextBox32.Text)
  512.     End Sub
  513.  
  514.     Private Sub Button37_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button37.Click
  515.         Clipboard.SetDataObject(TextBox31.Text)
  516.     End Sub
  517.  
  518.     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  519.         Clipboard.SetDataObject(TextBox49.Text)
  520.     End Sub
  521.  
  522.     Private Sub Button53_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button53.Click
  523.         Clipboard.SetDataObject(TextBox48.Text)
  524.     End Sub
  525.  
  526.     Private Sub Button52_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button52.Click
  527.         Clipboard.SetDataObject(TextBox47.Text)
  528.     End Sub
  529.  
  530.     Private Sub Button51_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button51.Click
  531.         Clipboard.SetDataObject(TextBox46.Text)
  532.     End Sub
  533.  
  534.     Private Sub Button49_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button49.Click
  535.         Clipboard.SetDataObject(TextBox45.Text)
  536.     End Sub
  537.  
  538.     Private Sub Button50_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button50.Click
  539.         Clipboard.SetDataObject(TextBox44.Text)
  540.     End Sub
  541.  
  542.     Private Sub Button47_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button47.Click
  543.         Clipboard.SetDataObject(TextBox43.Text)
  544.     End Sub
  545.  
  546.     Private Sub Button48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button48.Click
  547.         Clipboard.SetDataObject(TextBox42.Text)
  548.     End Sub
  549.  
  550.     Private Sub Button46_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46.Click
  551.         Clipboard.SetDataObject(TextBox41.Text)
  552.     End Sub
  553.  
  554.     Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  555.         Clipboard.SetDataObject(TextBox59.Text)
  556.     End Sub
  557.  
  558.     Private Sub Button62_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button62.Click
  559.         Clipboard.SetDataObject(TextBox58.Text)
  560.     End Sub
  561.  
  562.     Private Sub Button61_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button61.Click
  563.         Clipboard.SetDataObject(TextBox57.Text)
  564.     End Sub
  565.  
  566.     Private Sub Button60_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button60.Click
  567.         Clipboard.SetDataObject(TextBox56.Text)
  568.     End Sub
  569.  
  570.     Private Sub Button58_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button58.Click
  571.         Clipboard.SetDataObject(TextBox55.Text)
  572.     End Sub
  573.  
  574.     Private Sub Button59_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button59.Click
  575.         Clipboard.SetDataObject(TextBox54.Text)
  576.     End Sub
  577.  
  578.     Private Sub Button56_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button56.Click
  579.         Clipboard.SetDataObject(TextBox53.Text)
  580.     End Sub
  581.  
  582.     Private Sub Button57_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button57.Click
  583.         Clipboard.SetDataObject(TextBox52.Text)
  584.     End Sub
  585.  
  586.     Private Sub Button55_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button55.Click
  587.         Clipboard.SetDataObject(TextBox51.Text)
  588.     End Sub
  589.  
  590.     Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  591.         Clipboard.SetDataObject(TextBox69.Text)
  592.     End Sub
  593.  
  594.     Private Sub Button71_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button71.Click
  595.         Clipboard.SetDataObject(TextBox68.Text)
  596.     End Sub
  597.  
  598.     Private Sub Button70_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button70.Click
  599.         Clipboard.SetDataObject(TextBox67.Text)
  600.     End Sub
  601.  
  602.     Private Sub Button69_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button69.Click
  603.         Clipboard.SetDataObject(TextBox66.Text)
  604.     End Sub
  605.  
  606.     Private Sub Button67_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button67.Click
  607.         Clipboard.SetDataObject(TextBox65.Text)
  608.     End Sub
  609.  
  610.     Private Sub Button68_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button68.Click
  611.         Clipboard.SetDataObject(TextBox64.Text)
  612.     End Sub
  613.  
  614.     Private Sub Button65_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button65.Click
  615.         Clipboard.SetDataObject(TextBox63.Text)
  616.     End Sub
  617.  
  618.     Private Sub Button66_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button66.Click
  619.         Clipboard.SetDataObject(TextBox62.Text)
  620.     End Sub
  621.  
  622.     Private Sub Button64_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button64.Click
  623.         Clipboard.SetDataObject(TextBox61.Text)
  624.     End Sub
  625.  
  626.     Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  627.         Clipboard.SetDataObject(TextBox79.Text)
  628.     End Sub
  629.  
  630.     Private Sub Button80_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button80.Click
  631.         Clipboard.SetDataObject(TextBox78.Text)
  632.     End Sub
  633.  
  634.     Private Sub Button79_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button79.Click
  635.         Clipboard.SetDataObject(TextBox77.Text)
  636.     End Sub
  637.  
  638.     Private Sub Button78_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button78.Click
  639.         Clipboard.SetDataObject(TextBox76.Text)
  640.     End Sub
  641.  
  642.     Private Sub Button76_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button76.Click
  643.         Clipboard.SetDataObject(TextBox75.Text)
  644.     End Sub
  645.  
  646.     Private Sub Button77_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button77.Click
  647.         Clipboard.SetDataObject(TextBox74.Text)
  648.     End Sub
  649.  
  650.     Private Sub Button74_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button74.Click
  651.         Clipboard.SetDataObject(TextBox73.Text)
  652.     End Sub
  653.  
  654.     Private Sub Button75_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button75.Click
  655.         Clipboard.SetDataObject(TextBox72.Text)
  656.     End Sub
  657.  
  658.     Private Sub Button73_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button73.Click
  659.         Clipboard.SetDataObject(TextBox71.Text)
  660.     End Sub
  661.  
  662.     Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
  663.         Clipboard.SetDataObject(TextBox89.Text)
  664.     End Sub
  665.  
  666.     Private Sub Button89_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button89.Click
  667.         Clipboard.SetDataObject(TextBox88.Text)
  668.     End Sub
  669.  
  670.     Private Sub Button88_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button88.Click
  671.         Clipboard.SetDataObject(TextBox87.Text)
  672.     End Sub
  673.  
  674.     Private Sub Button87_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button87.Click
  675.         Clipboard.SetDataObject(TextBox86.Text)
  676.     End Sub
  677.  
  678.     Private Sub Button85_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button85.Click
  679.         Clipboard.SetDataObject(TextBox85.Text)
  680.     End Sub
  681.  
  682.     Private Sub Button86_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button86.Click
  683.         Clipboard.SetDataObject(TextBox84.Text)
  684.     End Sub
  685.  
  686.     Private Sub Button83_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button83.Click
  687.         Clipboard.SetDataObject(TextBox83.Text)
  688.     End Sub
  689.  
  690.     Private Sub Button84_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button84.Click
  691.         Clipboard.SetDataObject(TextBox82.Text)
  692.     End Sub
  693.  
  694.     Private Sub Button82_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button82.Click
  695.         Clipboard.SetDataObject(TextBox81.Text)
  696.     End Sub
  697.  
  698.     Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
  699.         MsgBox("Size Unit Converter Programmed by Troy Anikienko" & Chr(10) & "" & Chr(10) & "                 The Program Will Now Close", MsgBoxStyle.OkOnly, Title:="Closing Credits")
  700.     End Sub
  701.  
  702.     Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  703.         Dim inches As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  704.         Try
  705.             inches = CDec(TextBox1.Text)
  706.             inch = (inches) * 1
  707.             TextBox2.Text = CStr((inch))
  708.             foot = (inches) / 12
  709.             TextBox3.Text = CStr((foot))
  710.             yard = (inches) / 36
  711.             TextBox4.Text = CStr((yard))
  712.             mile = (inches) / 63360
  713.             TextBox5.Text = CStr((mile))
  714.             milli = CDec((inches) * 25.4)
  715.             TextBox6.Text = CStr((milli))
  716.             centi = CDec((inches) * 2.54)
  717.             TextBox7.Text = CStr((centi))
  718.             deci = CDec((inches) * 0.254)
  719.             TextBox8.Text = CStr((deci))
  720.             meter = CDec((inches) * 0.0254)
  721.             TextBox9.Text = CStr((meter))
  722.             kilo = CDec((inches) / 39370.0787)
  723.             TextBox10.Text = CStr((kilo))
  724.  
  725.         Catch ex As Exception
  726.             MsgBox("Enter in a valid measurement to be convered")
  727.  
  728.         End Try
  729.     End Sub
  730.  
  731.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  732.         Dim inches As Decimal, inch As Decimal, foot As Decimal, yard As Decimal, mile As Decimal, milli As Decimal, centi As Decimal, deci As Decimal, meter As Decimal, kilo As Decimal
  733.         Try
  734.             inches = CDec(TextBox1.Text)
  735.             inch = (inches) * 1
  736.             TextBox2.Text = CStr((inch))
  737.             foot = (inches) / 12
  738.             TextBox3.Text = CStr((foot))
  739.             yard = (inches) / 36
  740.             TextBox4.Text = CStr((yard))
  741.             mile = (inches) / 63360
  742.             TextBox5.Text = CStr((mile))
  743.             milli = CDec((inches) * 25.4)
  744.             TextBox6.Text = CStr((milli))
  745.             centi = CDec((inches) * 2.54)
  746.             TextBox7.Text = CStr((centi))
  747.             deci = CDec((inches) * 0.254)
  748.             TextBox8.Text = CStr((deci))
  749.             meter = CDec((inches) * 0.0254)
  750.             TextBox9.Text = CStr((meter))
  751.             kilo = CDec((inches) / 39370.0787)
  752.             TextBox10.Text = CStr((kilo))
  753.  
  754.         Catch ex As Exception
  755.             MsgBox("Enter in a valid measurement to be convered")
  756.  
  757.         End Try
  758.     End Sub
  759. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement