daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Taschenrechner by Fernandez_
  2.  
  3. <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
  4. Partial Class Form1
  5.  
  6.     Inherits System.Windows.Forms.Form
  7.  
  8.     'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
  9.     <System.Diagnostics.DebuggerNonUserCode()> _
  10.     Protected Overrides Sub Dispose(ByVal disposing As Boolean)
  11.         Try
  12.             If disposing AndAlso components IsNot Nothing Then
  13.                 components.Dispose()
  14.             End If
  15.         Finally
  16.             MyBase.Dispose(disposing)
  17.         End Try
  18.     End Sub
  19.  
  20.     'Wird vom Windows Form-Designer benötigt.
  21.     Private components As System.ComponentModel.IContainer
  22.  
  23.     'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
  24.     'Das Bearbeiten ist mit dem Windows Form-Designer möglich.  
  25.     'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
  26.     <System.Diagnostics.DebuggerStepThrough()> _
  27.     Private Sub InitializeComponent()
  28.         Me.Button1 = New System.Windows.Forms.Button()
  29.         Me.Button2 = New System.Windows.Forms.Button()
  30.         Me.Button3 = New System.Windows.Forms.Button()
  31.         Me.Button4 = New System.Windows.Forms.Button()
  32.         Me.Button5 = New System.Windows.Forms.Button()
  33.         Me.Button6 = New System.Windows.Forms.Button()
  34.         Me.Button7 = New System.Windows.Forms.Button()
  35.         Me.Button8 = New System.Windows.Forms.Button()
  36.         Me.Button9 = New System.Windows.Forms.Button()
  37.         Me.Button10 = New System.Windows.Forms.Button()
  38.         Me.Button11 = New System.Windows.Forms.Button()
  39.         Me.Button12 = New System.Windows.Forms.Button()
  40.         Me.Button13 = New System.Windows.Forms.Button()
  41.         Me.Button14 = New System.Windows.Forms.Button()
  42.         Me.Button15 = New System.Windows.Forms.Button()
  43.         Me.Button16 = New System.Windows.Forms.Button()
  44.         Me.Button17 = New System.Windows.Forms.Button()
  45.         Me.TextBox1 = New System.Windows.Forms.TextBox()
  46.         Me.SuspendLayout()
  47.         '
  48.         'Button1
  49.         '
  50.         Me.Button1.Location = New System.Drawing.Point(3, 324)
  51.         Me.Button1.Name = "Button1"
  52.         Me.Button1.Size = New System.Drawing.Size(68, 27)
  53.         Me.Button1.TabIndex = 0
  54.         Me.Button1.Text = "0"
  55.         Me.Button1.UseVisualStyleBackColor = True
  56.         '
  57.         'Button2
  58.         '
  59.         Me.Button2.Location = New System.Drawing.Point(3, 290)
  60.         Me.Button2.Name = "Button2"
  61.         Me.Button2.Size = New System.Drawing.Size(68, 27)
  62.         Me.Button2.TabIndex = 1
  63.         Me.Button2.Text = "1"
  64.         Me.Button2.UseVisualStyleBackColor = True
  65.         '
  66.         'Button3
  67.         '
  68.         Me.Button3.Location = New System.Drawing.Point(77, 290)
  69.         Me.Button3.Name = "Button3"
  70.         Me.Button3.Size = New System.Drawing.Size(68, 27)
  71.         Me.Button3.TabIndex = 2
  72.         Me.Button3.Text = "2"
  73.         Me.Button3.UseVisualStyleBackColor = True
  74.         '
  75.         'Button4
  76.         '
  77.         Me.Button4.Location = New System.Drawing.Point(152, 293)
  78.         Me.Button4.Name = "Button4"
  79.         Me.Button4.Size = New System.Drawing.Size(68, 25)
  80.         Me.Button4.TabIndex = 3
  81.         Me.Button4.Text = "3"
  82.         Me.Button4.UseVisualStyleBackColor = True
  83.         '
  84.         'Button5
  85.         '
  86.         Me.Button5.Location = New System.Drawing.Point(3, 257)
  87.         Me.Button5.Name = "Button5"
  88.         Me.Button5.Size = New System.Drawing.Size(68, 27)
  89.         Me.Button5.TabIndex = 4
  90.         Me.Button5.Text = "4"
  91.         Me.Button5.UseVisualStyleBackColor = True
  92.         '
  93.         'Button6
  94.         '
  95.         Me.Button6.Location = New System.Drawing.Point(77, 257)
  96.         Me.Button6.Name = "Button6"
  97.         Me.Button6.Size = New System.Drawing.Size(68, 27)
  98.         Me.Button6.TabIndex = 5
  99.         Me.Button6.Text = "5"
  100.         Me.Button6.UseVisualStyleBackColor = True
  101.         '
  102.         'Button7
  103.         '
  104.         Me.Button7.Location = New System.Drawing.Point(152, 257)
  105.         Me.Button7.Name = "Button7"
  106.         Me.Button7.Size = New System.Drawing.Size(68, 27)
  107.         Me.Button7.TabIndex = 6
  108.         Me.Button7.Text = "6"
  109.         Me.Button7.UseVisualStyleBackColor = True
  110.         '
  111.         'Button8
  112.         '
  113.         Me.Button8.Location = New System.Drawing.Point(3, 224)
  114.         Me.Button8.Name = "Button8"
  115.         Me.Button8.Size = New System.Drawing.Size(68, 27)
  116.         Me.Button8.TabIndex = 7
  117.         Me.Button8.Text = "7"
  118.         Me.Button8.UseVisualStyleBackColor = True
  119.         '
  120.         'Button9
  121.         '
  122.         Me.Button9.Location = New System.Drawing.Point(77, 224)
  123.         Me.Button9.Name = "Button9"
  124.         Me.Button9.Size = New System.Drawing.Size(68, 27)
  125.         Me.Button9.TabIndex = 8
  126.         Me.Button9.Text = "8"
  127.         Me.Button9.UseVisualStyleBackColor = True
  128.         '
  129.         'Button10
  130.         '
  131.         Me.Button10.Location = New System.Drawing.Point(152, 224)
  132.         Me.Button10.Name = "Button10"
  133.         Me.Button10.Size = New System.Drawing.Size(68, 27)
  134.         Me.Button10.TabIndex = 9
  135.         Me.Button10.Text = "9"
  136.         Me.Button10.UseVisualStyleBackColor = True
  137.         '
  138.         'Button11
  139.         '
  140.         Me.Button11.Location = New System.Drawing.Point(77, 323)
  141.         Me.Button11.Name = "Button11"
  142.         Me.Button11.Size = New System.Drawing.Size(68, 28)
  143.         Me.Button11.TabIndex = 10
  144.         Me.Button11.Text = "."
  145.         Me.Button11.TextAlign = System.Drawing.ContentAlignment.TopCenter
  146.         Me.Button11.UseVisualStyleBackColor = True
  147.         '
  148.         'Button12
  149.         '
  150.         Me.Button12.Location = New System.Drawing.Point(151, 324)
  151.         Me.Button12.Name = "Button12"
  152.         Me.Button12.Size = New System.Drawing.Size(68, 28)
  153.         Me.Button12.TabIndex = 11
  154.         Me.Button12.Text = "="
  155.         Me.Button12.UseVisualStyleBackColor = True
  156.         '
  157.         'Button13
  158.         '
  159.         Me.Button13.Location = New System.Drawing.Point(3, 185)
  160.         Me.Button13.Name = "Button13"
  161.         Me.Button13.Size = New System.Drawing.Size(68, 33)
  162.         Me.Button13.TabIndex = 12
  163.         Me.Button13.Text = "C"
  164.         Me.Button13.UseVisualStyleBackColor = True
  165.         '
  166.         'Button14
  167.         '
  168.         Me.Button14.Location = New System.Drawing.Point(3, 146)
  169.         Me.Button14.Name = "Button14"
  170.         Me.Button14.Size = New System.Drawing.Size(68, 33)
  171.         Me.Button14.TabIndex = 13
  172.         Me.Button14.Text = "/"
  173.         Me.Button14.UseVisualStyleBackColor = True
  174.         '
  175.         'Button15
  176.         '
  177.         Me.Button15.Location = New System.Drawing.Point(3, 107)
  178.         Me.Button15.Name = "Button15"
  179.         Me.Button15.Size = New System.Drawing.Size(68, 33)
  180.         Me.Button15.TabIndex = 14
  181.         Me.Button15.Text = "*"
  182.         Me.Button15.UseVisualStyleBackColor = True
  183.         '
  184.         'Button16
  185.         '
  186.         Me.Button16.Location = New System.Drawing.Point(3, 68)
  187.         Me.Button16.Name = "Button16"
  188.         Me.Button16.Size = New System.Drawing.Size(68, 33)
  189.         Me.Button16.TabIndex = 15
  190.         Me.Button16.Text = "-"
  191.         Me.Button16.UseVisualStyleBackColor = True
  192.         '
  193.         'Button17
  194.         '
  195.         Me.Button17.Location = New System.Drawing.Point(3, 29)
  196.         Me.Button17.Name = "Button17"
  197.         Me.Button17.Size = New System.Drawing.Size(68, 33)
  198.         Me.Button17.TabIndex = 16
  199.         Me.Button17.Text = "+"
  200.         Me.Button17.UseVisualStyleBackColor = True
  201.         '
  202.         'TextBox1
  203.         '
  204.         Me.TextBox1.Location = New System.Drawing.Point(77, 29)
  205.         Me.TextBox1.Multiline = True
  206.         Me.TextBox1.Name = "TextBox1"
  207.         Me.TextBox1.ReadOnly = True
  208.         Me.TextBox1.Size = New System.Drawing.Size(142, 189)
  209.         Me.TextBox1.TabIndex = 17
  210.         Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
  211.         '
  212.         'Form1
  213.         '
  214.         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
  215.         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
  216.         Me.BackColor = System.Drawing.SystemColors.MenuHighlight
  217.         Me.ClientSize = New System.Drawing.Size(223, 354)
  218.         Me.Controls.Add(Me.TextBox1)
  219.         Me.Controls.Add(Me.Button17)
  220.         Me.Controls.Add(Me.Button16)
  221.         Me.Controls.Add(Me.Button15)
  222.         Me.Controls.Add(Me.Button14)
  223.         Me.Controls.Add(Me.Button13)
  224.         Me.Controls.Add(Me.Button12)
  225.         Me.Controls.Add(Me.Button11)
  226.         Me.Controls.Add(Me.Button10)
  227.         Me.Controls.Add(Me.Button9)
  228.         Me.Controls.Add(Me.Button8)
  229.         Me.Controls.Add(Me.Button7)
  230.         Me.Controls.Add(Me.Button6)
  231.         Me.Controls.Add(Me.Button5)
  232.         Me.Controls.Add(Me.Button4)
  233.         Me.Controls.Add(Me.Button3)
  234.         Me.Controls.Add(Me.Button2)
  235.         Me.Controls.Add(Me.Button1)
  236.         Me.ForeColor = System.Drawing.SystemColors.HotTrack
  237.         Me.MaximizeBox = False
  238.         Me.MinimizeBox = False
  239.         Me.Name = "Form1"
  240.         Me.Text = "Rechner"
  241.         Me.ResumeLayout(False)
  242.         Me.PerformLayout()
  243.  
  244.     End Sub
  245.     Friend WithEvents Button1 As System.Windows.Forms.Button
  246.     Friend WithEvents Button2 As System.Windows.Forms.Button
  247.     Friend WithEvents Button3 As System.Windows.Forms.Button
  248.     Friend WithEvents Button4 As System.Windows.Forms.Button
  249.     Friend WithEvents Button5 As System.Windows.Forms.Button
  250.     Friend WithEvents Button6 As System.Windows.Forms.Button
  251.     Friend WithEvents Button7 As System.Windows.Forms.Button
  252.     Friend WithEvents Button8 As System.Windows.Forms.Button
  253.     Friend WithEvents Button9 As System.Windows.Forms.Button
  254.     Friend WithEvents Button10 As System.Windows.Forms.Button
  255.     Friend WithEvents Button11 As System.Windows.Forms.Button
  256.     Friend WithEvents Button12 As System.Windows.Forms.Button
  257.     Friend WithEvents Button13 As System.Windows.Forms.Button
  258.     Friend WithEvents Button14 As System.Windows.Forms.Button
  259.     Friend WithEvents Button15 As System.Windows.Forms.Button
  260.     Friend WithEvents Button16 As System.Windows.Forms.Button
  261.     Friend WithEvents Button17 As System.Windows.Forms.Button
  262.  
  263.  
  264.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  265.         TextBox1.Text += "0"
  266.     End Sub
  267.  
  268.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  269.         TextBox1.Text += "1"
  270.     End Sub
  271.  
  272.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  273.         TextBox1.Text += "2"
  274.     End Sub
  275.  
  276.     Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
  277.         TextBox1.Text += "3"
  278.     End Sub
  279.  
  280.     Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
  281.         TextBox1.Text += "4"
  282.     End Sub
  283.  
  284.     Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
  285.         TextBox1.Text += "5"
  286.     End Sub
  287.  
  288.     Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
  289.         TextBox1.Text += "6"
  290.     End Sub
  291.  
  292.     Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
  293.         TextBox1.Text += "7"
  294.     End Sub
  295.  
  296.     Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
  297.         TextBox1.Text += "8"
  298.     End Sub
  299.  
  300.     Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
  301.         TextBox1.Text += "9"
  302.     End Sub
  303.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  304.  
  305.     Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
  306.         If Not TextBox1.Text = "" Then
  307.             TextBox1.Text += "."
  308.         End If
  309.         If TextBox1.Text = "" Then
  310.             MsgBox("Du musst schon eine Zahl eingeben.")
  311.             TextBox1.Text = ""
  312.         End If
  313.     End Sub
  314.  
  315.     Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
  316.         TextBox1.Text = ""
  317.         Sign = ""
  318.     End Sub
  319.  
  320.     Dim Wert As Integer = 0
  321.     Dim Sign As String = ""
  322.  
  323.     Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
  324.         If Not TextBox1.Text = "" Then
  325.             Wert = Val(TextBox1.Text)
  326.             TextBox1.Text = ""
  327.             Sign = "+"
  328.         End If
  329.         If TextBox1.Text = "" Then
  330.             MsgBox("Du musst schon eine Zahl eingeben.")
  331.             TextBox1.Text = ""
  332.         End If
  333.     End Sub
  334.  
  335.     Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
  336.         If Not TextBox1.Text = "" Then
  337.             Wert = Val(TextBox1.Text)
  338.             TextBox1.Text = ""
  339.             Sign = "-"
  340.         End If
  341.         If TextBox1.Text = "" Then
  342.             MsgBox("Du musst schon eine Zahl eingeben.")
  343.             TextBox1.Text = ""
  344.         End If
  345.     End Sub
  346.  
  347.     Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
  348.         If Not TextBox1.Text = "" Then
  349.             Wert = Val(TextBox1.Text)
  350.             TextBox1.Text = ""
  351.             Sign = "*"
  352.         End If
  353.         If TextBox1.Text = "" Then
  354.             MsgBox("Du musst schon eine Zahl eingeben.")
  355.             TextBox1.Text = ""
  356.         End If
  357.     End Sub
  358.  
  359.     Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
  360.         If Not TextBox1.Text = "" Then
  361.             Wert = Val(TextBox1.Text)
  362.             TextBox1.Text = ""
  363.             Sign = "/"
  364.         End If
  365.         If TextBox1.Text = "" Then
  366.             MsgBox("Du musst schon eine Zahl eingeben.")
  367.             TextBox1.Text = ""
  368.         End If
  369.     End Sub
  370.  
  371.     Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
  372.         If TextBox1.Text = "" Then
  373.             MsgBox("Bitte gebe Zahlen ein.")
  374.             TextBox1.Text = ""
  375.         End If
  376.         If Sign = "" And Not TextBox1.Text = "" Then
  377.             MsgBox("Du musst schon ein Zeichen (+,-,*,/) angeben")
  378.         End If
  379.         If Not TextBox1.Text = "" And Not Sign = "" Then
  380.             If Sign = "+" Then
  381.                 TextBox1.Text = Val(TextBox1.Text) + Val(Wert)
  382.             End If
  383.             If Sign = "-" Then
  384.                 TextBox1.Text = Val(TextBox1.Text) - Val(Wert)
  385.             End If
  386.             If Sign = "*" Then
  387.                 TextBox1.Text = Val(TextBox1.Text) * Val(Wert)
  388.             End If
  389.             If Sign = "/" Then
  390.                 TextBox1.Text = Val(TextBox1.Text) / Val(Wert)
  391.             End If
  392.             Sign = ""
  393.         End If
  394.     End Sub
  395. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top