Kalkulator klawisz backspace - help me

0

Piszę kalkulator na zaliczenie i nie potrafię zaprogramować klawisza backspace, który usuwał by jeden znak z textBoxa. Może mi ktoś pomóc?

0

Podaj kod, który masz :> I swoje próby też pokaż.

0

#pragma once

namespace Kalkulator {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

bool dodawanie = false;
bool odejmowanie = false;
bool mnozenie = false;
bool dzielenie = false;
bool rowny = false;
bool procent = false;
bool potega = false;
bool reszta = false;

/// <summary>
/// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
///          'Resource File Name' property for the managed resource compiler tool
///          associated with all .resx files this class depends on.  Otherwise,
///          the designers will not be able to interact properly with localized
///          resources associated with this form.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:

	Form1(void)
	{
		InitializeComponent();
		//
		//TODO: Add the constructor code here
		//
	}

protected:
	/// <summary>
	/// Clean up any resources being used.
	/// </summary>
	~Form1()
	{
		if (components)
		{
			delete components;
		}
	}
private: System::Windows::Forms::MenuStrip^  menuStrip1;
protected: 

private: System::Windows::Forms::Button^  button1;
private: System::Windows::Forms::Button^  button2;
private: System::Windows::Forms::Button^  button3;
private: System::Windows::Forms::Button^  button4;
private: System::Windows::Forms::Button^  button5;
private: System::Windows::Forms::Button^  button6;
private: System::Windows::Forms::Button^  button7;
private: System::Windows::Forms::Button^  button8;
private: System::Windows::Forms::Button^  button9;
private: System::Windows::Forms::Button^  button10;
private: System::Windows::Forms::Button^  button11;
private: System::Windows::Forms::Button^  button12;
private: System::Windows::Forms::Button^  button13;
private: System::Windows::Forms::Button^  button14;
private: System::Windows::Forms::Button^  button15;
private: System::Windows::Forms::Button^  button16;
private: System::Windows::Forms::Button^  button17;
private: System::Windows::Forms::Button^  button18;
private: System::Windows::Forms::Button^  button19;
private: System::Windows::Forms::Button^  button20;
private: System::Windows::Forms::Button^  button21;
private: System::Windows::Forms::Button^  button22;
private: System::Windows::Forms::Button^  button23;
private: System::Windows::Forms::Button^  button24;
private: System::Windows::Forms::Button^  button25;
private: System::Windows::Forms::Button^  button26;
private: System::Windows::Forms::Button^  button27;
private: System::Windows::Forms::Button^  button28;
private: System::Windows::Forms::Button^  button29;
private: System::Windows::Forms::Button^  button30;
private: System::Windows::Forms::Button^  button31;
private: System::Windows::Forms::Button^  button32;
private: System::Windows::Forms::Button^  button33;
private: System::Windows::Forms::Button^  button34;
private: System::Windows::Forms::Button^  button35;
private: System::Windows::Forms::Button^  button36;
private: System::Windows::Forms::Button^  button37;
private: System::Windows::Forms::Button^  button38;
private: System::Windows::Forms::Button^  button39;
private: System::Windows::Forms::Button^  button40;
private: System::Windows::Forms::ToolStripMenuItem^  plikToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  zakończToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  edycjaToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  kopiujToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  wklejToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  zaToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  doTysiecyToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  doSetekToolStripMenuItem;

private: System::Windows::Forms::Button^  button41;
private: System::Windows::Forms::ToolStripMenuItem^  doDziesiątekToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  doJednościToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  do1MiejscaToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  do2MiejscToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  do3MiejscToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  do4MiejscToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  do5MiejscToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  widokToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  standartowyToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  programistyToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  naukowyToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  pomocToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^  oProgramieToolStripMenuItem;
private: System::Windows::Forms::RadioButton^  radioButton1;
private: System::Windows::Forms::RadioButton^  radioButton2;
private: System::Windows::Forms::RadioButton^  radioButton3;
private: System::Windows::Forms::RadioButton^  radioButton4;
private: System::Windows::Forms::Button^  button42;
private: System::Windows::Forms::TextBox^  textBox1;



private:
	/// <summary>
	/// Required designer variable.
	/// </summary>
	System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->menuStrip1 = (gcnew System::MenuStrip());
this->plikToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->zakończToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->edycjaToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->kopiujToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->wklejToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->zaToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->doTysiecyToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->doSetekToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->doDziesiątekToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->doJednościToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->do1MiejscaToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->do2MiejscToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->do3MiejscToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->do4MiejscToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->do5MiejscToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->widokToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->standartowyToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->programistyToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->naukowyToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->pomocToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->oProgramieToolStripMenuItem = (gcnew System::ToolStripMenuItem());
this->button1 = (gcnew System::Button());
this->button2 = (gcnew System::Button());
this->button3 = (gcnew System::Button());
this->button4 = (gcnew System::Button());
this->button5 = (gcnew System::Button());
this->button6 = (gcnew System::Button());
this->button7 = (gcnew System::Button());
this->button8 = (gcnew System::Button());
this->button9 = (gcnew System::Button());
this->button10 = (gcnew System::Button());
this->button11 = (gcnew System::Button());
this->button12 = (gcnew System::Button());
this->button13 = (gcnew System::Button());
this->button14 = (gcnew System::Button());
this->button15 = (gcnew System::Button());
this->button16 = (gcnew System::Button());
this->button17 = (gcnew System::Button());
this->button18 = (gcnew System::Button());
this->button19 = (gcnew System::Button());
this->button20 = (gcnew System::Button());
this->button21 = (gcnew System::Button());
this->button22 = (gcnew System::Button());
this->button23 = (gcnew System::Button());
this->button24 = (gcnew System::Button());
this->button25 = (gcnew System::Button());
this->button26 = (gcnew System::Button());
this->button27 = (gcnew System::Button());
this->button28 = (gcnew System::Button());
this->button29 = (gcnew System::Button());
this->button30 = (gcnew System::Button());
this->button31 = (gcnew System::Button());
this->button32 = (gcnew System::Button());
this->button33 = (gcnew System::Button());
this->button34 = (gcnew System::Button());
this->button35 = (gcnew System::Button());
this->button36 = (gcnew System::Button());
this->button37 = (gcnew System::Button());
this->button38 = (gcnew System::Button());
this->button39 = (gcnew System::Button());
this->button40 = (gcnew System::Button());
this->button41 = (gcnew System::Button());
this->radioButton1 = (gcnew System::RadioButton());
this->radioButton2 = (gcnew System::RadioButton());
this->radioButton3 = (gcnew System::RadioButton());
this->radioButton4 = (gcnew System::RadioButton());
this->button42 = (gcnew System::Button());
this->textBox1 = (gcnew System::TextBox());
this->menuStrip1->SuspendLayout();
this->SuspendLayout();
//
// menuStrip1
//
this->menuStrip1->Items->AddRange(gcnew cli::array< System::ToolStripItem^ >(4) {this->plikToolStripMenuItem,
this->edycjaToolStripMenuItem, this->widokToolStripMenuItem, this->pomocToolStripMenuItem});
this->menuStrip1->Location = System::Point(0, 0);
this->menuStrip1->Name = L"menuStrip1";
this->menuStrip1->Size = System::Size(466, 24);
this->menuStrip1->TabIndex = 0;
this->menuStrip1->Text = L"menuStrip1";
//
// plikToolStripMenuItem
//
this->plikToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::ToolStripItem^ >(1) {this->zakończToolStripMenuItem});
this->plikToolStripMenuItem->Name = L"plikToolStripMenuItem";
this->plikToolStripMenuItem->Size = System::Size(38, 20);
this->plikToolStripMenuItem->Text = L"Plik";
//
// zakończToolStripMenuItem
//
this->zakończToolStripMenuItem->Name = L"zakończToolStripMenuItem";
this->zakończToolStripMenuItem->Size = System::Size(118, 22);
this->zakończToolStripMenuItem->Text = L"Zakończ";
this->zakończToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::zakończToolStripMenuItem_Click);
//
// edycjaToolStripMenuItem
//
this->edycjaToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::ToolStripItem^ >(3) {this->kopiujToolStripMenuItem,
this->wklejToolStripMenuItem, this->zaToolStripMenuItem});
this->edycjaToolStripMenuItem->Name = L"edycjaToolStripMenuItem";
this->edycjaToolStripMenuItem->Size = System::Size(53, 20);
this->edycjaToolStripMenuItem->Text = L"Edycja";
//
// kopiujToolStripMenuItem
//
this->kopiujToolStripMenuItem->Name = L"kopiujToolStripMenuItem";
this->kopiujToolStripMenuItem->Size = System::Size(152, 22);
this->kopiujToolStripMenuItem->Text = L"Kopiuj";
this->kopiujToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::kopiujToolStripMenuItem_Click);
//
// wklejToolStripMenuItem
//
this->wklejToolStripMenuItem->Name = L"wklejToolStripMenuItem";
this->wklejToolStripMenuItem->Size = System::Size(152, 22);
this->wklejToolStripMenuItem->Text = L"Wklej";
this->wklejToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::wklejToolStripMenuItem_Click);
//
// zaToolStripMenuItem
//
this->zaToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::ToolStripItem^ >(9) {this->doTysiecyToolStripMenuItem,
this->doSetekToolStripMenuItem, this->doDziesiątekToolStripMenuItem, this->doJednościToolStripMenuItem, this->do1MiejscaToolStripMenuItem,
this->do2MiejscToolStripMenuItem, this->do3MiejscToolStripMenuItem, this->do4MiejscToolStripMenuItem, this->do5MiejscToolStripMenuItem});
this->zaToolStripMenuItem->Name = L"zaToolStripMenuItem";
this->zaToolStripMenuItem->Size = System::Size(152, 22);
this->zaToolStripMenuItem->Text = L"Zaokrąglenie";
//
// doTysiecyToolStripMenuItem
//
this->doTysiecyToolStripMenuItem->Name = L"doTysiecyToolStripMenuItem";
this->doTysiecyToolStripMenuItem->Size = System::Size(143, 22);
this->doTysiecyToolStripMenuItem->Text = L"Do tysięcy";
//
// doSetekToolStripMenuItem
//
this->doSetekToolStripMenuItem->Name = L"doSetekToolStripMenuItem";
this->doSetekToolStripMenuItem->Size = System::Size(143, 22);
this->doSetekToolStripMenuItem->Text = L"Do setek";
//
// doDziesiątekToolStripMenuItem
//
this->doDziesiątekToolStripMenuItem->Name = L"doDziesiątekToolStripMenuItem";
this->doDziesiątekToolStripMenuItem->Size = System::Size(143, 22);
this->doDziesiątekToolStripMenuItem->Text = L"Do dziesiątek";
//
// doJednościToolStripMenuItem
//
this->doJednościToolStripMenuItem->Name = L"doJednościToolStripMenuItem";
this->doJednościToolStripMenuItem->Size = System::Size(143, 22);
this->doJednościToolStripMenuItem->Text = L"Do jedności";
//
// do1MiejscaToolStripMenuItem
//
this->do1MiejscaToolStripMenuItem->Name = L"do1MiejscaToolStripMenuItem";
this->do1MiejscaToolStripMenuItem->Size = System::Size(143, 22);
this->do1MiejscaToolStripMenuItem->Text = L"Do 1 miejsca";
//
// do2MiejscToolStripMenuItem
//
this->do2MiejscToolStripMenuItem->Name = L"do2MiejscToolStripMenuItem";
this->do2MiejscToolStripMenuItem->Size = System::Size(143, 22);
this->do2MiejscToolStripMenuItem->Text = L"Do 2 miejsc";
//
// do3MiejscToolStripMenuItem
//
this->do3MiejscToolStripMenuItem->Name = L"do3MiejscToolStripMenuItem";
this->do3MiejscToolStripMenuItem->Size = System::Size(143, 22);
this->do3MiejscToolStripMenuItem->Text = L"Do 3 miejsc";
//
// do4MiejscToolStripMenuItem
//
this->do4MiejscToolStripMenuItem->Name = L"do4MiejscToolStripMenuItem";
this->do4MiejscToolStripMenuItem->Size = System::Size(143, 22);
this->do4MiejscToolStripMenuItem->Text = L"Do 4 miejsc";
//
// do5MiejscToolStripMenuItem
//
this->do5MiejscToolStripMenuItem->Name = L"do5MiejscToolStripMenuItem";
this->do5MiejscToolStripMenuItem->Size = System::Size(143, 22);
this->do5MiejscToolStripMenuItem->Text = L"Do 5 miejsc";
//
// widokToolStripMenuItem
//
this->widokToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::ToolStripItem^ >(3) {this->standartowyToolStripMenuItem,
this->programistyToolStripMenuItem, this->naukowyToolStripMenuItem});
this->widokToolStripMenuItem->Name = L"widokToolStripMenuItem";
this->widokToolStripMenuItem->Size = System::Size(53, 20);
this->widokToolStripMenuItem->Text = L"Widok";
//
// standartowyToolStripMenuItem
//
this->standartowyToolStripMenuItem->Name = L"standartowyToolStripMenuItem";
this->standartowyToolStripMenuItem->Size = System::Size(143, 22);
this->standartowyToolStripMenuItem->Text = L"Standardowy";
this->standartowyToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::standartowyToolStripMenuItem_Click);
//
// programistyToolStripMenuItem
//
this->programistyToolStripMenuItem->Name = L"programistyToolStripMenuItem";
this->programistyToolStripMenuItem->Size = System::Size(143, 22);
this->programistyToolStripMenuItem->Text = L"Programisty";
this->programistyToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::programistyToolStripMenuItem_Click);
//
// naukowyToolStripMenuItem
//
this->naukowyToolStripMenuItem->Name = L"naukowyToolStripMenuItem";
this->naukowyToolStripMenuItem->Size = System::Size(143, 22);
this->naukowyToolStripMenuItem->Text = L"Naukowy";
this->naukowyToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::naukowyToolStripMenuItem_Click);
//
// pomocToolStripMenuItem
//
this->pomocToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::ToolStripItem^ >(1) {this->oProgramieToolStripMenuItem});
this->pomocToolStripMenuItem->Name = L"pomocToolStripMenuItem";
this->pomocToolStripMenuItem->Size = System::Size(57, 20);
this->pomocToolStripMenuItem->Text = L"Pomoc";
//
// oProgramieToolStripMenuItem
//
this->oProgramieToolStripMenuItem->Name = L"oProgramieToolStripMenuItem";
this->oProgramieToolStripMenuItem->Size = System::Size(141, 22);
this->oProgramieToolStripMenuItem->Text = L"O programie";
this->oProgramieToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::oProgramieToolStripMenuItem_Click);
//
// button1
//
this->button1->Enabled = false;
this->button1->Location = System::Point(404, 71);
this->button1->Name = L"button1";
this->button1->Size = System::Size(50, 50);
this->button1->TabIndex = 2;
this->button1->Text = L"A";
this->button1->UseVisualStyleBackColor = true;
this->button1->Visible = false;
//
// button2
//
this->button2->Enabled = false;
this->button2->Location = System::Point(404, 127);
this->button2->Name = L"button2";
this->button2->Size = System::Size(50, 50);
this->button2->TabIndex = 2;
this->button2->Text = L"B";
this->button2->UseVisualStyleBackColor = true;
this->button2->Visible = false;
//
// button3
//
this->button3->Enabled = false;
this->button3->Location = System::Point(404, 183);
this->button3->Name = L"button3";
this->button3->Size = System::Size(50, 50);
this->button3->TabIndex = 2;
this->button3->Text = L"C";
this->button3->UseVisualStyleBackColor = true;
this->button3->Visible = false;
//
// button4
//
this->button4->Enabled = false;
this->button4->Location = System::Point(404, 239);
this->button4->Name = L"button4";
this->button4->Size = System::Size(50, 50);
this->button4->TabIndex = 2;
this->button4->Text = L"D";
this->button4->UseVisualStyleBackColor = true;
this->button4->Visible = false;
//
// button5
//
this->button5->Enabled = false;
this->button5->Location = System::Point(404, 295);
this->button5->Name = L"button5";
this->button5->Size = System::Size(50, 50);
this->button5->TabIndex = 2;
this->button5->Text = L"E";
this->button5->UseVisualStyleBackColor = true;
this->button5->Visible = false;
//
// button6
//
this->button6->Enabled = false;
this->button6->Location = System::Point(404, 351);
this->button6->Name = L"button6";
this->button6->Size = System::Size(50, 50);
this->button6->TabIndex = 2;
this->button6->Text = L"F";
this->button6->UseVisualStyleBackColor = true;
this->button6->Visible = false;
//
// button7
//
this->button7->Location = System::Point(348, 71);
this->button7->Name = L"button7";
this->button7->Size = System::Size(50, 50);
this->button7->TabIndex = 2;
this->button7->Text = L"sqrt";
this->button7->UseVisualStyleBackColor = true;
//
// button8
//
this->button8->Location = System::Point(348, 127);
this->button8->Name = L"button8";
this->button8->Size = System::Size(50, 50);
this->button8->TabIndex = 2;
this->button8->Text = L"/";
this->button8->UseVisualStyleBackColor = true;
this->button8->Click += gcnew System::EventHandler(this, &Form1::button8_Click);
//
// button9
//
this->button9->Location = System::Point(348, 183);
this->button9->Name = L"button9";
this->button9->Size = System::Size(50, 50);
this->button9->TabIndex = 2;
this->button9->Text = L"*";
this->button9->UseVisualStyleBackColor = true;
this->button9->Click += gcnew System::EventHandler(this, &Form1::button9_Click);
//
// button10
//
this->button10->Location = System::Point(348, 239);
this->button10->Name = L"button10";
this->button10->Size = System::Size(50, 50);
this->button10->TabIndex = 2;
this->button10->Text = L"-";
this->button10->UseVisualStyleBackColor = true;
this->button10->Click += gcnew System::EventHandler(this, &Form1::button10_Click);
//
// button11
//
this->button11->Location = System::Point(348, 295);
this->button11->Name = L"button11";
this->button11->Size = System::Size(50, 50);
this->button11->TabIndex = 2;
this->button11->Text = L"+";
this->button11->UseVisualStyleBackColor = true;
this->button11->Click += gcnew System::EventHandler(this, &Form1::button11_Click);
//
// button12
//
this->button12->Location = System::Point(277, 71);
this->button12->Name = L"button12";
this->button12->Size = System::Size(50, 50);
this->button12->TabIndex = 2;
this->button12->Text = L"%";
this->button12->UseVisualStyleBackColor = true;
this->button12->Click += gcnew System::EventHandler(this, &Form1::button12_Click);
//
// button13
//
this->button13->Location = System::Point(221, 71);
this->button13->Name = L"button13";
this->button13->Size = System::Size(50, 50);
this->button13->TabIndex = 2;
this->button13->Text = L"1/X";
this->button13->UseVisualStyleBackColor = true;
this->button13->Click += gcnew System::EventHandler(this, &Form1::button13_Click);
//
// button14
//
this->button14->Location = System::Point(277, 127);
this->button14->Name = L"button14";
this->button14->Size = System::Size(50, 50);
this->button14->TabIndex = 2;
this->button14->Text = L"9";
this->button14->UseVisualStyleBackColor = true;
this->button14->Click += gcnew System::EventHandler(this, &Form1::button14_Click);
//
// button15
//
this->button15->Location = System::Point(221, 127);
this->button15->Name = L"button15";
this->button15->Size = System::Size(50, 50);
this->button15->TabIndex = 2;
this->button15->Text = L"8";
this->button15->UseVisualStyleBackColor = true;
this->button15->Click += gcnew System::EventHandler(this, &Form1::button15_Click);
//
// button16
//
this->button16->Location = System::Point(277, 183);
this->button16->Name = L"button16";
this->button16->Size = System::Size(50, 50);
this->button16->TabIndex = 2;
this->button16->Text = L"6";
this->button16->UseVisualStyleBackColor = true;
this->button16->Click += gcnew System::EventHandler(this, &Form1::button16_Click);
//
// button17
//
this->button17->Location = System::Point(221, 183);
this->button17->Name = L"button17";
this->button17->Size = System::Size(50, 50);
this->button17->TabIndex = 2;
this->button17->Text = L"5";
this->button17->UseVisualStyleBackColor = true;
this->button17->Click += gcnew System::EventHandler(this, &Form1::button17_Click);
//
// button18
//
this->button18->Location = System::Point(277, 239);
this->button18->Name = L"button18";
this->button18->Size = System::Size(50, 50);
this->button18->TabIndex = 2;
this->button18->Text = L"3";
this->button18->UseVisualStyleBackColor = true;
this->button18->Click += gcnew System::EventHandler(this, &Form1::button18_Click);
//
// button19
//
this->button19->Location = System::Point(221, 239);
this->button19->Name = L"button19";
this->button19->Size = System::Size(50, 50);
this->button19->TabIndex = 2;
this->button19->Text = L"2";
this->button19->UseVisualStyleBackColor = true;
this->button19->Click += gcnew System::EventHandler(this, &Form1::button19_Click);
//
// button20
//
this->button20->Location = System::Point(277, 295);
this->button20->Name = L"button20";
this->button20->Size = System::Size(50, 50);
this->button20->TabIndex = 2;
this->button20->Text = L",";
this->button20->UseVisualStyleBackColor = true;
this->button20->Click += gcnew System::EventHandler(this, &Form1::button20_Click);
//
// button21
//
this->button21->Location = System::Point(221, 295);
this->button21->Name = L"button21";
this->button21->Size = System::Size(50, 50);
this->button21->TabIndex = 2;
this->button21->Text = L"0";
this->button21->UseVisualStyleBackColor = true;
this->button21->Click += gcnew System::EventHandler(this, &Form1::button21_Click);
//
// button22
//
this->button22->Location = System::Point(165, 71);
this->button22->Name = L"button22";
this->button22->Size = System::Size(50, 50);
this->button22->TabIndex = 2;
this->button22->Text = L"+/-";
this->button22->UseVisualStyleBackColor = true;
this->button22->Click += gcnew System::EventHandler(this, &Form1::button22_Click);
//
// button23
//
this->button23->Location = System::Point(165, 127);
this->button23->Name = L"button23";
this->button23->Size = System::Size(50, 50);
this->button23->TabIndex = 2;
this->button23->Text = L"7";
this->button23->UseVisualStyleBackColor = true;
this->button23->Click += gcnew System::EventHandler(this, &Form1::button23_Click);
//
// button24
//
this->button24->Location = System::Point(165, 183);
this->button24->Name = L"button24";
this->button24->Size = System::Size(50, 50);
this->button24->TabIndex = 2;
this->button24->Text = L"4";
this->button24->UseVisualStyleBackColor = true;
this->button24->Click += gcnew System::EventHandler(this, &Form1::button24_Click);
//
// button25
//
this->button25->Location = System::Point(165, 239);
this->button25->Name = L"button25";
this->button25->Size = System::Size(50, 50);
this->button25->TabIndex = 2;
this->button25->Text = L"1";
this->button25->UseVisualStyleBackColor = true;
this->button25->Click += gcnew System::EventHandler(this, &Form1::button25_Click);
//
// button26
//
this->button26->Location = System::Point(165, 295);
this->button26->Name = L"button26";
this->button26->Size = System::Size(50, 50);
this->button26->TabIndex = 2;
this->button26->Text = L"C";
this->button26->UseVisualStyleBackColor = true;
this->button26->Click += gcnew System::EventHandler(this, &Form1::button26_Click);
//
// button27
//
this->button27->Location = System::Point(221, 351);
this->button27->Name = L"button27";
this->button27->Size = System::Size(50, 50);
this->button27->TabIndex = 2;
this->button27->Text = L")";
this->button27->UseVisualStyleBackColor = true;
this->button27->Visible = false;
//
// button28
//
this->button28->Location = System::Point(165, 351);
this->button28->Name = L"button28";
this->button28->Size = System::Size(50, 50);
this->button28->TabIndex = 2;
this->button28->Text = L"(";
this->button28->UseVisualStyleBackColor = true;
this->button28->Visible = false;
//
// button29
//
this->button29->Location = System::Point(81, 71);
this->button29->Name = L"button29";
this->button29->Size = System::Size(50, 50);
this->button29->TabIndex = 2;
this->button29->Text = L"cos";
this->button29->UseVisualStyleBackColor = true;
this->button29->Visible = false;
this->button29->Click += gcnew System::EventHandler(this, &Form1::button29_Click);
//
// button30
//
this->button30->Location = System::Point(25, 71);
this->button30->Name = L"button30";
this->button30->Size = System::Size(50, 50);
this->button30->TabIndex = 2;
this->button30->Text = L"sin";
this->button30->UseVisualStyleBackColor = true;
this->button30->Visible = false;
this->button30->Click += gcnew System::EventHandler(this, &Form1::button30_Click);
//
// button31
//
this->button31->Location = System::Point(81, 127);
this->button31->Name = L"button31";
this->button31->Size = System::Size(50, 50);
this->button31->TabIndex = 2;
this->button31->Text = L"ln";
this->button31->UseVisualStyleBackColor = true;
this->button31->Visible = false;
this->button31->Click += gcnew System::EventHandler(this, &Form1::button31_Click);
//
// button32
//
this->button32->Location = System::Point(25, 127);
this->button32->Name = L"button32";
this->button32->Size = System::Size(50, 50);
this->button32->TabIndex = 2;
this->button32->Text = L"tan";
this->button32->UseVisualStyleBackColor = true;
this->button32->Visible = false;
this->button32->Click += gcnew System::EventHandler(this, &Form1::button32_Click);
//
// button33
//
this->button33->Location = System::Point(81, 183);
this->button33->Name = L"button33";
this->button33->Size = System::Size(50, 50);
this->button33->TabIndex = 2;
this->button33->Text = L"log10";
this->button33->UseVisualStyleBackColor = true;
this->button33->Visible = false;
this->button33->Click += gcnew System::EventHandler(this, &Form1::button33_Click);
//
// button34
//
this->button34->Location = System::Point(25, 183);
this->button34->Name = L"button34";
this->button34->Size = System::Size(50, 50);
this->button34->TabIndex = 2;
this->button34->Text = L"a^x";
this->button34->UseVisualStyleBackColor = true;
this->button34->Visible = false;
this->button34->Click += gcnew System::EventHandler(this, &Form1::button34_Click);
//
// button35
//
this->button35->Location = System::Point(81, 239);
this->button35->Name = L"button35";
this->button35->Size = System::Size(50, 50);
this->button35->TabIndex = 2;
this->button35->Text = L"a^3";
this->button35->UseVisualStyleBackColor = true;
this->button35->Visible = false;
this->button35->Click += gcnew System::EventHandler(this, &Form1::button35_Click);
//
// button36
//
this->button36->Location = System::Point(25, 239);
this->button36->Name = L"button36";
this->button36->Size = System::Size(50, 50);
this->button36->TabIndex = 2;
this->button36->Text = L"a^2";
this->button36->UseVisualStyleBackColor = true;
this->button36->Visible = false;
this->button36->Click += gcnew System::EventHandler(this, &Form1::button36_Click);
//
// button37
//
this->button37->Location = System::Point(81, 295);
this->button37->Name = L"button37";
this->button37->Size = System::Size(50, 50);
this->button37->TabIndex = 2;
this->button37->Text = L"PI";
this->button37->UseVisualStyleBackColor = true;
this->button37->Visible = false;
this->button37->Click += gcnew System::EventHandler(this, &Form1::button37_Click);
//
// button38
//
this->button38->Location = System::Point(25, 295);
this->button38->Name = L"button38";
this->button38->Size = System::Size(50, 50);
this->button38->TabIndex = 2;
this->button38->Text = L"E";
this->button38->UseVisualStyleBackColor = true;
this->button38->Visible = false;
this->button38->Click += gcnew System::EventHandler(this, &Form1::button38_Click);
//
// button39
//
this->button39->Location = System::Point(81, 351);
this->button39->Name = L"button39";
this->button39->Size = System::Size(50, 50);
this->button39->TabIndex = 2;
this->button39->Text = L"n!";
this->button39->UseVisualStyleBackColor = true;
this->button39->Visible = false;
this->button39->Click += gcnew System::EventHandler(this, &Form1::button39_Click);
//
// button40
//
this->button40->Location = System::Point(25, 351);
this->button40->Name = L"button40";
this->button40->Size = System::Size(50, 50);
this->button40->TabIndex = 2;
this->button40->Text = L"MOD";
this->button40->UseVisualStyleBackColor = true;
this->button40->Visible = false;
this->button40->Click += gcnew System::EventHandler(this, &Form1::button40_Click);
//
// button41
//
this->button41->Location = System::Point(69, 36);
this->button41->Name = L"button41";
this->button41->Size = System::Size(86, 29);
this->button41->TabIndex = 3;
this->button41->Text = L"Backspace";
this->button41->UseVisualStyleBackColor = true;
this->button41->Click += gcnew System::EventHandler(this, &Form1::button41_Click);
//
// radioButton1
//
this->radioButton1->AutoSize = true;
this->radioButton1->Location = System::Point(25, 407);
this->radioButton1->Name = L"radioButton1";
this->radioButton1->Size = System::Size(47, 17);
this->radioButton1->TabIndex = 4;
this->radioButton1->TabStop = true;
this->radioButton1->Text = L"DEC";
this->radioButton1->UseVisualStyleBackColor = true;
this->radioButton1->Visible = false;
this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);
//
// radioButton2
//
this->radioButton2->AutoSize = true;
this->radioButton2->Location = System::Point(81, 407);
this->radioButton2->Name = L"radioButton2";
this->radioButton2->Size = System::Size(43, 17);
this->radioButton2->TabIndex = 4;
this->radioButton2->TabStop = true;
this->radioButton2->Text = L"BIN";
this->radioButton2->UseVisualStyleBackColor = true;
this->radioButton2->Visible = false;
this->radioButton2->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton2_CheckedChanged);
//
// radioButton3
//
this->radioButton3->AutoSize = true;
this->radioButton3->Location = System::Point(25, 430);
this->radioButton3->Name = L"radioButton3";
this->radioButton3->Size = System::Size(47, 17);
this->radioButton3->TabIndex = 4;
this->radioButton3->TabStop = true;
this->radioButton3->Text = L"OCT";
this->radioButton3->UseVisualStyleBackColor = true;
this->radioButton3->Visible = false;
this->radioButton3->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton3_CheckedChanged);
//
// radioButton4
//
this->radioButton4->AutoSize = true;
this->radioButton4->Location = System::Point(81, 430);
this->radioButton4->Name = L"radioButton4";
this->radioButton4->Size = System::Size(47, 17);
this->radioButton4->TabIndex = 4;
this->radioButton4->TabStop = true;
this->radioButton4->Text = L"HEX";
this->radioButton4->UseVisualStyleBackColor = true;
this->radioButton4->Visible = false;
this->radioButton4->CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton4_CheckedChanged);
//
// button42
//
this->button42->Location = System::Point(348, 351);
this->button42->Name = L"button42";
this->button42->Size = System::Size(50, 50);
this->button42->TabIndex = 2;
this->button42->Text = L"=";
this->button42->UseVisualStyleBackColor = true;
this->button42->Click += gcnew System::EventHandler(this, &Form1::button42_Click);
//
// textBox1
//
this->textBox1->Font = (gcnew System::Font(L"Microsoft Sans Serif", 14, System::Regular, System::Point,
static_castSystem::Byte(238)));
this->textBox1->Location = System::Point(161, 36);
this->textBox1->Name = L"textBox1";
this->textBox1->Size = System::Size(293, 29);
this->textBox1->TabIndex = 1;
this->textBox1->Text = L"0";
this->textBox1->TextAlign = System::Right;
//
// Form1
//
this->AutoScaleDimensions = System::SizeF(6, 13);
this->AutoScaleMode = System::Font;
this->ClientSize = System::Size(466, 453);
this->Controls->Add(this->radioButton4);
this->Controls->Add(this->radioButton3);
this->Controls->Add(this->radioButton2);
this->Controls->Add(this->radioButton1);
this->Controls->Add(this->button41);
this->Controls->Add(this->button6);
this->Controls->Add(this->button40);
this->Controls->Add(this->button28);
this->Controls->Add(this->button39);
this->Controls->Add(this->button27);
this->Controls->Add(this->button38);
this->Controls->Add(this->button26);
this->Controls->Add(this->button37);
this->Controls->Add(this->button21);
this->Controls->Add(this->button42);
this->Controls->Add(this->button11);
this->Controls->Add(this->button20);
this->Controls->Add(this->button5);
this->Controls->Add(this->button36);
this->Controls->Add(this->button25);
this->Controls->Add(this->button35);
this->Controls->Add(this->button19);
this->Controls->Add(this->button10);
this->Controls->Add(this->button18);
this->Controls->Add(this->button4);
this->Controls->Add(this->button34);
this->Controls->Add(this->button24);
this->Controls->Add(this->button33);
this->Controls->Add(this->button17);
this->Controls->Add(this->button9);
this->Controls->Add(this->button16);
this->Controls->Add(this->button3);
this->Controls->Add(this->button32);
this->Controls->Add(this->button23);
this->Controls->Add(this->button31);
this->Controls->Add(this->button15);
this->Controls->Add(this->button8);
this->Controls->Add(this->button14);
this->Controls->Add(this->button2);
this->Controls->Add(this->button30);
this->Controls->Add(this->button29);
this->Controls->Add(this->button22);
this->Controls->Add(this->button13);
this->Controls->Add(this->button12);
this->Controls->Add(this->button7);
this->Controls->Add(this->button1);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->menuStrip1);
this->FormBorderStyle = System::Fixed3D;
this->MainMenuStrip = this->menuStrip1;
this->Name = L"Form1";
this->Text = L"Kalkulator";
this->menuStrip1->ResumeLayout(false);
this->menuStrip1->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();

	}

#pragma endregion

private: double silnia (double n) {
if (n<0)
return 0;
if (n==0 || n==1)
return 1;
return silnia(n-1)*n;
};

private: System::Void button21_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Text="0";
}
else
{
textBox1->Text+="0";
}
}
private: System::Void button25_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="1";
}
private: System::Void button26_Click(System::Object sender, System::EventArgs e) {
textBox1->Text="0";
textBox1->Tag="";
dodawanie = false;
odejmowanie = false;
mnozenie = false;
dzielenie = false;
rowny = false;
}
private: System::Void button19_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="2";
}
private: System::Void button18_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="3";
}
private: System::Void button24_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="4";
}
private: System::Void button17_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="5";
}
private: System::Void button16_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="6";
}
private: System::Void button23_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="7";
}
private: System::Void button15_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="8";
}
private: System::Void button14_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="0")
{
textBox1->Clear();
}
textBox1->Text+="9";
}
private: System::Void button20_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text->Contains(","))
{
return;
}
else
{
textBox1->Text+=",";
}
}
private: System::Void button11_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="")
{
return;
}
else
{
dodawanie = true;
textBox1->Tag = textBox1->Text;
textBox1->Text = "";
}

	 }	

private: System::Void button10_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="")
{
return;
}
else
{
odejmowanie = true;
textBox1->Tag = textBox1->Text;
textBox1->Text = "";
}
}
private: System::Void button9_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="")
{
return;
}
else
{
mnozenie = true;
textBox1->Tag = textBox1->Text;
textBox1->Text = "";
}
}
private: System::Void button8_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text=="")
{
return;
}
else
{
dzielenie = true;
textBox1->Tag = textBox1->Text;
textBox1->Text = "";
}
}
private: System::Void naukowyToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
button30->Visible=true;
button29->Visible=true;
button32->Visible=true;
button31->Visible=true;
button34->Visible=true;
button33->Visible=true;
button36->Visible=true;
button35->Visible=true;
button38->Visible=true;
button37->Visible=true;
button40->Visible=true;
button39->Visible=true;
button28->Visible=true;
button27->Visible=true;
}
private: System::Void zakończToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
Close();
}
private: System::Void standartowyToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
button30->Visible=false;
button29->Visible=false;
button32->Visible=false;
button31->Visible=false;
button34->Visible=false;
button33->Visible=false;
button36->Visible=false;
button35->Visible=false;
button38->Visible=false;
button37->Visible=false;
button40->Visible=false;
button39->Visible=false;
button28->Visible=false;
button27->Visible=false;

		 radioButton1->Visible=false;
		 radioButton2->Visible=false;
		 radioButton3->Visible=false;
		 radioButton4->Visible=false;
		 button1->Visible=false;
		 button2->Visible=false;
		 button3->Visible=false;
		 button4->Visible=false;
		 button5->Visible=false;
		 button6->Visible=false;
	 }

private: System::Void programistyToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
radioButton1->Visible=true;
radioButton2->Visible=true;
radioButton3->Visible=true;
radioButton4->Visible=true;
button1->Visible=true;
button2->Visible=true;
button3->Visible=true;
button4->Visible=true;
button5->Visible=true;
button6->Visible=true;

		 button30->Visible=false;
		 button29->Visible=false;
		 button32->Visible=false;
		 button31->Visible=false;
		 button34->Visible=false;
		 button33->Visible=false;
		 button36->Visible=false;
		 button35->Visible=false;
		 button38->Visible=false;
		 button37->Visible=false;
		 button40->Visible=false;
		 button39->Visible=false;
		 button28->Visible=false;
		 button27->Visible=false;
	 }

private: System::Void radioButton2_CheckedChanged(System::Object sender, System::EventArgs e) {
button1->Enabled=false;
button2->Enabled=false;
button3->Enabled=false;
button4->Enabled=false;
button5->Enabled=false;
button6->Enabled=false;

		 button19->Enabled=false;
		 button18->Enabled=false;
		 button24->Enabled=false;
		 button17->Enabled=false;
		 button16->Enabled=false;
		 button23->Enabled=false;
		 button15->Enabled=false;
		 button14->Enabled=false;

	 }

private: System::Void radioButton1_CheckedChanged(System::Object sender, System::EventArgs e) {
button1->Enabled=false;
button2->Enabled=false;
button3->Enabled=false;
button4->Enabled=false;
button5->Enabled=false;
button6->Enabled=false;

		 button19->Enabled=true;
		 button18->Enabled=true;
		 button24->Enabled=true;
		 button17->Enabled=true;
		 button16->Enabled=true;
		 button23->Enabled=true;
		 button15->Enabled=true;
		 button14->Enabled=true;
	 }

private: System::Void radioButton4_CheckedChanged(System::Object sender, System::EventArgs e) {
button1->Enabled=true;
button2->Enabled=true;
button3->Enabled=true;
button4->Enabled=true;
button5->Enabled=true;
button6->Enabled=true;

		 button19->Enabled=true;
		 button18->Enabled=true;
		 button24->Enabled=true;
		 button17->Enabled=true;
		 button16->Enabled=true;
		 button23->Enabled=true;
		 button15->Enabled=true;
		 button14->Enabled=true;
	
	 }

private: System::Void radioButton3_CheckedChanged(System::Object sender, System::EventArgs e) {
button1->Enabled=false;
button2->Enabled=false;
button3->Enabled=false;
button4->Enabled=false;
button5->Enabled=false;
button6->Enabled=false;

		 button19->Enabled=true;
		 button18->Enabled=true;
		 button24->Enabled=true;
		 button17->Enabled=true;
		 button16->Enabled=true;
		 button23->Enabled=true;
		 button15->Enabled=false;
		 button14->Enabled=false;
	 }

private: System::Void oProgramieToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
MessageBox::Show("Kalkulator 1.0 Copyright © Konrad Kurkowski 2011 Wszelkie prawa zastrzeżone", "O programie Kalkulator 1.0");
}
private: System::Void button22_Click(System::Object sender, System::EventArgs e) {
if(textBox1->Text->Contains("-"))
{
textBox1->Text = textBox1->Text ->Remove(0, 1);
}
else
{
textBox1->Text= "-" + textBox1->Text;
}
}
private: System::Void button42_Click(System::Object sender, System::EventArgs e) {
if (dodawanie)
{
double wynik = Convert::ToDouble(textBox1->Tag) + Convert::ToDouble(textBox1->Text);
textBox1 ->Text = Convert::ToString(wynik);
dodawanie = false;
}

		if (odejmowanie)
		{
			double wynik = Convert::ToDouble(textBox1->Tag) - Convert::ToDouble(textBox1->Text);
			textBox1 ->Text = Convert::ToString(wynik);
			odejmowanie = false;
		}

		if (mnozenie)
		{
			double wynik = Convert::ToDouble(textBox1->Tag) * Convert::ToDouble(textBox1->Text);
			textBox1 ->Text = Convert::ToString(wynik);
			mnozenie = false;
		}

		if (dzielenie)
		{
			if (textBox1->Text == "0")
			{
				textBox1->Text = "nie wykonalne";
			}
			else
			{
			double wynik = Convert::ToDouble(textBox1->Tag) / Convert::ToDouble(textBox1->Text);
			textBox1 ->Text = Convert::ToString(wynik);
			dzielenie = false;
			}
		}

		if (procent)
		{
			double wynik = Convert::ToDouble(textBox1->Tag) * ( Convert::ToDouble(textBox1->Text) /100);
			textBox1 ->Text = Convert::ToString(wynik);
			procent = false;
		}

		if(potega)
		{
			double wynik = System::Math::Pow(Convert::ToDouble(textBox1->Tag), Convert::ToDouble(textBox1->Text));
			textBox1 ->Text = Convert::ToString(wynik);
			potega = false;
		} 

		if(reszta)
		{
			int wynik = Convert::ToInt32(textBox1->Tag) % Convert::ToInt32(textBox1->Text);
		}
	 }

private: System::Void button13_Click(System::Object sender, System::EventArgs e) {

		double wynik = 1 / Convert::ToDouble(textBox1->Text);
		textBox1 ->Text = Convert::ToString(wynik);
	 }

private: System::Void button12_Click(System::Object sender, System::EventArgs e) {

		if(textBox1->Text=="")
		{
			return;
		}
		else
		{
			procent = true;
			textBox1->Tag = textBox1->Text;
			textBox1->Text = "";
		}

	 }

private: System::Void button41_Click(System::Object sender, System::EventArgs e) { //przycisk backspace

		int nowa;                       // tutaj próbowałem coś  zrobić 
		int dlugosc = textBox1->TextLength;
		nowa=dlugosc-1;
		textBox1-> = nowa;

	 }

private: System::Void button30_Click(System::Object sender, System::EventArgs e) {
double wynik = System::Sin(Convert::ToDouble(textBox1->Text));
textBox1 ->Text = Convert::ToString(wynik);
}
private: System::Void button29_Click(System::Object sender, System::EventArgs e) {
double wynik = System::Cos(Convert::ToDouble(textBox1->Text));
textBox1 ->Text = Convert::ToString(wynik);
}
private: System::Void button32_Click(System::Object sender, System::EventArgs e) {
double wynik = System::Tan(Convert::ToDouble(textBox1->Text));
textBox1 ->Text = Convert::ToString(wynik);
}
private: System::Void button31_Click(System::Object sender, System::EventArgs e) {
double wynik = System::Log(Convert::ToDouble(textBox1->Text));
textBox1 ->Text = Convert::ToString(wynik);
}
private: System::Void button33_Click(System::Object sender, System::EventArgs e) {
double wynik = System::Log10(Convert::ToDouble(textBox1->Text));
textBox1 ->Text = Convert::ToString(wynik);
}
private: System::Void button34_Click(System::Object sender, System::EventArgs e) {

		 if(textBox1->Text=="")
		{
			return;
		}
		else
		{
			potega = true;
			textBox1->Tag = textBox1->Text;
			textBox1->Text = "";
		}

	 }

private: System::Void button36_Click(System::Object sender, System::EventArgs e) {

		double wynik = Convert::ToDouble(textBox1->Text) * Convert::ToDouble(textBox1->Text);
		textBox1->Text = Convert::ToString(wynik);

	 }

private: System::Void button35_Click(System::Object sender, System::EventArgs e) {

		double wynik = Convert::ToDouble(textBox1->Text) * Convert::ToDouble(textBox1->Text) * Convert::ToDouble(textBox1->Text);
		textBox1->Text = Convert::ToString(wynik);

	 }

private: System::Void button38_Click(System::Object sender, System::EventArgs e) {

		double wynik = 2.71828183;
		textBox1->Text = Convert::ToString(wynik);

	 }

private: System::Void button37_Click(System::Object sender, System::EventArgs e) {

		double wynik = 3.14159265;
		textBox1->Text = Convert::ToString(wynik);

	 }

private: System::Void button40_Click(System::Object sender, System::EventArgs e) {

		 if(textBox1->Text=="")
		{
			return;
		}
		else
		{
			reszta = true;
			textBox1->Tag = textBox1->Text;
			textBox1->Text = "";
		}

	 }

private: System::Void button39_Click(System::Object sender, System::EventArgs e) {

			double wynik = silnia(Convert::ToDouble(textBox1->Text));
			textBox1->Text = Convert::ToString(wynik);
	 }

private: System::Void kopiujToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
textBox1->Copy();
}
private: System::Void wklejToolStripMenuItem_Click(System::Object sender, System::EventArgs e) {
textBox1->Paste();
}
};
}

0

kompilator wyrzuca błąd:

Error 1 error C2039: 'set' : is not a member of 'System::TextLength' c:\users\admin\documents\visual studio 2008\projects\kalkulator\kalkulator\Form1.h 1315

1

Na fix do tego kodu nadaje się tylko jedna kombinacja: ctrl+a, del.
Lekcja na dziś: tablice i pętle.

0

Boże ty widzisz, a nie grzmisz! Kod zamieszczaj w odpowiednich znacznikach, a "takie coś" co zamieściłeś najlepiej walnij na jakąś "wklejkę" i zamieść tylko linka. Żeby przeczytać co tutaj naskrobałeś muszę przeleć kilkadziesiąt śmiesznych deklaracji i kilkadziesiąt niemalże identycznych linii pisanych za pewne przy pomocy copy/paste. Nie litujesz się nad sobą to zlituj się przynajmniej nad osobami chętnymi do pomocy :] Wybacz ale to jest po prostu nieczytelne.

0

sorry :)

1 użytkowników online, w tym zalogowanych: 0, gości: 1