калькулятор в студио

This commit is contained in:
RayskayaA 2025-12-07 16:59:51 +00:00
parent fdc794b2d3
commit f9cb9fed82
3 changed files with 108 additions and 0 deletions

34
Application.Designer.vb generated Normal file
View File

@ -0,0 +1,34 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()>
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = False
Me.EnableVisualStyles = True
Me.SaveMySettingsOnExit = True
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()>
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Form1
End Sub
End Class
End Namespace

10
Application.myapp Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

64
Form1.vb Normal file
View File

@ -0,0 +1,64 @@
Public Class Form1
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.Text = ""
Label2.Text = ""
End Sub
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
TextBox1.Text = TextBox1.Text + "1"
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
TextBox1.Text = TextBox1.Text + "2"
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
TextBox1.Text = TextBox1.Text + "3"
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
TextBox1.Text = TextBox1.Text + "4"
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
TextBox1.Text = TextBox1.Text + "5"
End Sub
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
TextBox1.Text = TextBox1.Text + "6"
End Sub
Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
TextBox1.Text = TextBox1.Text + "7"
End Sub
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
TextBox1.Text = TextBox1.Text + "8"
End Sub
Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
TextBox1.Text = TextBox1.Text + "9"
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
TextBox1.Text = ""
Label2.Text = ""
Label1.Text = ""
End Sub
Private Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
If Label2.Text = "+" Then
TextBox1.Text = Val(Label1.Text) + Val(TextBox1.Text)
Label1.Text = ""
Label2.Text = "+"
End If
End Sub
End Class