Tutorial Aplikasi Penghitung Dasar Kelistrikan Berbasis Windows

TUGAS AKHIR C++

Nama : Haidi

No.Reg : 49031064

Judul : Aplikasi Penghitung Dasar Kelistrikan Berbasis Windows

Tampilan

ta1

ta2

Source Code

//NAMA : HAIDI
//NIM : 49013064
//Jurusan : TKJMD
#pragma once

namespace Aplikasidasarlistrik {

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

/// <summary>
/// Summary for Form1
/// </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::GroupBox^  groupBox1;
protected:
private: System::Windows::Forms::GroupBox^  groupBox4;
private: System::Windows::Forms::Button^  button3;
private: System::Windows::Forms::TextBox^  textBox9;
private: System::Windows::Forms::TextBox^  textBox8;
private: System::Windows::Forms::TextBox^  textBox7;
private: System::Windows::Forms::Label^  label7;
private: System::Windows::Forms::Label^  label6;
private: System::Windows::Forms::GroupBox^  groupBox3;
private: System::Windows::Forms::Button^  button2;
private: System::Windows::Forms::TextBox^  textBox6;
private: System::Windows::Forms::TextBox^  textBox5;
private: System::Windows::Forms::TextBox^  textBox4;
private: System::Windows::Forms::Label^  label5;
private: System::Windows::Forms::Label^  label4;
private: System::Windows::Forms::GroupBox^  groupBox2;
private: System::Windows::Forms::TextBox^  textBox3;
private: System::Windows::Forms::Button^  button1;
private: System::Windows::Forms::TextBox^  textBox2;
private: System::Windows::Forms::TextBox^  textBox1;
private: System::Windows::Forms::Label^  label3;
private: System::Windows::Forms::Label^  label2;
private: System::Windows::Forms::Label^  label1;
private: System::Windows::Forms::GroupBox^  groupBox5;
private: System::Windows::Forms::GroupBox^  groupBox8;
private: System::Windows::Forms::TextBox^  textBox18;
private: System::Windows::Forms::TextBox^  textBox17;
private: System::Windows::Forms::TextBox^  textBox16;
private: System::Windows::Forms::Button^  button6;
private: System::Windows::Forms::Label^  label13;
private: System::Windows::Forms::Label^  label12;
private: System::Windows::Forms::GroupBox^  groupBox7;
private: System::Windows::Forms::Button^  button5;
private: System::Windows::Forms::TextBox^  textBox15;
private: System::Windows::Forms::TextBox^  textBox14;
private: System::Windows::Forms::TextBox^  textBox13;
private: System::Windows::Forms::Label^  label11;
private: System::Windows::Forms::Label^  label10;
private: System::Windows::Forms::GroupBox^  groupBox6;
private: System::Windows::Forms::Button^  button4;
private: System::Windows::Forms::TextBox^  textBox12;
private: System::Windows::Forms::TextBox^  textBox11;
private: System::Windows::Forms::TextBox^  textBox10;
private: System::Windows::Forms::Label^  label9;
private: System::Windows::Forms::Label^  label8;
private: System::Windows::Forms::Button^  button7;

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)
{
System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
this->groupBox4 = (gcnew System::Windows::Forms::GroupBox());
this->button3 = (gcnew System::Windows::Forms::Button());
this->textBox9 = (gcnew System::Windows::Forms::TextBox());
this->textBox8 = (gcnew System::Windows::Forms::TextBox());
this->textBox7 = (gcnew System::Windows::Forms::TextBox());
this->label7 = (gcnew System::Windows::Forms::Label());
this->label6 = (gcnew System::Windows::Forms::Label());
this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
this->button2 = (gcnew System::Windows::Forms::Button());
this->textBox6 = (gcnew System::Windows::Forms::TextBox());
this->textBox5 = (gcnew System::Windows::Forms::TextBox());
this->textBox4 = (gcnew System::Windows::Forms::TextBox());
this->label5 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
this->textBox3 = (gcnew System::Windows::Forms::TextBox());
this->button1 = (gcnew System::Windows::Forms::Button());
this->textBox2 = (gcnew System::Windows::Forms::TextBox());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label1 = (gcnew System::Windows::Forms::Label());
this->groupBox5 = (gcnew System::Windows::Forms::GroupBox());
this->groupBox8 = (gcnew System::Windows::Forms::GroupBox());
this->textBox18 = (gcnew System::Windows::Forms::TextBox());
this->textBox17 = (gcnew System::Windows::Forms::TextBox());
this->textBox16 = (gcnew System::Windows::Forms::TextBox());
this->button6 = (gcnew System::Windows::Forms::Button());
this->label13 = (gcnew System::Windows::Forms::Label());
this->label12 = (gcnew System::Windows::Forms::Label());
this->groupBox7 = (gcnew System::Windows::Forms::GroupBox());
this->button5 = (gcnew System::Windows::Forms::Button());
this->textBox15 = (gcnew System::Windows::Forms::TextBox());
this->textBox14 = (gcnew System::Windows::Forms::TextBox());
this->textBox13 = (gcnew System::Windows::Forms::TextBox());
this->label11 = (gcnew System::Windows::Forms::Label());
this->label10 = (gcnew System::Windows::Forms::Label());
this->groupBox6 = (gcnew System::Windows::Forms::GroupBox());
this->button4 = (gcnew System::Windows::Forms::Button());
this->textBox12 = (gcnew System::Windows::Forms::TextBox());
this->textBox11 = (gcnew System::Windows::Forms::TextBox());
this->textBox10 = (gcnew System::Windows::Forms::TextBox());
this->label9 = (gcnew System::Windows::Forms::Label());
this->label8 = (gcnew System::Windows::Forms::Label());
this->button7 = (gcnew System::Windows::Forms::Button());
this->groupBox1->SuspendLayout();
this->groupBox4->SuspendLayout();
this->groupBox3->SuspendLayout();
this->groupBox2->SuspendLayout();
this->groupBox5->SuspendLayout();
this->groupBox8->SuspendLayout();
this->groupBox7->SuspendLayout();
this->groupBox6->SuspendLayout();
this->SuspendLayout();
//
// groupBox1
//
this->groupBox1->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(224)),
static_cast<System::Int32>(static_cast<System::Byte>(192)));
this->groupBox1->Controls->Add(this->groupBox4);
this->groupBox1->Controls->Add(this->groupBox3);
this->groupBox1->Controls->Add(this->groupBox2);
this->groupBox1->Location = System::Drawing::Point(12, 61);
this->groupBox1->Name = L”groupBox1″;
this->groupBox1->Size = System::Drawing::Size(818, 208);
this->groupBox1->TabIndex = 0;
this->groupBox1->TabStop = false;
this->groupBox1->Text = L”1. PERHITUNGAN TEGANGAN, ARUS, RESISTANSI (TAHANAN)”;
//
// groupBox4
//
this->groupBox4->BackColor = System::Drawing::Color::Lime;
this->groupBox4->Controls->Add(this->button3);
this->groupBox4->Controls->Add(this->textBox9);
this->groupBox4->Controls->Add(this->textBox8);
this->groupBox4->Controls->Add(this->textBox7);
this->groupBox4->Controls->Add(this->label7);
this->groupBox4->Controls->Add(this->label6);
this->groupBox4->Location = System::Drawing::Point(552, 29);
this->groupBox4->Name = L”groupBox4″;
this->groupBox4->Size = System::Drawing::Size(237, 160);
this->groupBox4->TabIndex = 3;
this->groupBox4->TabStop = false;
this->groupBox4->Text = L”Menghitung RESISTANSI”;
//
// button3
//
this->button3->Location = System::Drawing::Point(23, 104);
this->button3->Name = L”button3″;
this->button3->Size = System::Drawing::Size(75, 23);
this->button3->TabIndex = 7;
this->button3->Text = L”Hasil”;
this->button3->UseVisualStyleBackColor = true;
this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
//
// textBox9
//
this->textBox9->Location = System::Drawing::Point(150, 106);
this->textBox9->Name = L”textBox9″;
this->textBox9->Size = System::Drawing::Size(65, 20);
this->textBox9->TabIndex = 6;
//
// textBox8
//
this->textBox8->Location = System::Drawing::Point(150, 73);
this->textBox8->Name = L”textBox8″;
this->textBox8->Size = System::Drawing::Size(65, 20);
this->textBox8->TabIndex = 5;
//
// textBox7
//
this->textBox7->Location = System::Drawing::Point(150, 35);
this->textBox7->Name = L”textBox7″;
this->textBox7->Size = System::Drawing::Size(65, 20);
this->textBox7->TabIndex = 4;
//
// label7
//
this->label7->AutoSize = true;
this->label7->Location = System::Drawing::Point(23, 75);
this->label7->Name = L”label7″;
this->label7->Size = System::Drawing::Size(60, 13);
this->label7->TabIndex = 3;
this->label7->Text = L”Nilai ARUS”;
//
// label6
//
this->label6->AutoSize = true;
this->label6->Location = System::Drawing::Point(20, 35);
this->label6->Name = L”label6″;
this->label6->Size = System::Drawing::Size(93, 13);
this->label6->TabIndex = 2;
this->label6->Text = L”Nilai  TEGANGAN”;
//
// groupBox3
//
this->groupBox3->BackColor = System::Drawing::Color::Yellow;
this->groupBox3->Controls->Add(this->button2);
this->groupBox3->Controls->Add(this->textBox6);
this->groupBox3->Controls->Add(this->textBox5);
this->groupBox3->Controls->Add(this->textBox4);
this->groupBox3->Controls->Add(this->label5);
this->groupBox3->Controls->Add(this->label4);
this->groupBox3->Location = System::Drawing::Point(275, 29);
this->groupBox3->Name = L”groupBox3″;
this->groupBox3->Size = System::Drawing::Size(239, 160);
this->groupBox3->TabIndex = 1;
this->groupBox3->TabStop = false;
this->groupBox3->Text = L”Menghitung ARUS”;
//
// button2
//
this->button2->Location = System::Drawing::Point(27, 103);
this->button2->Name = L”button2″;
this->button2->Size = System::Drawing::Size(75, 23);
this->button2->TabIndex = 5;
this->button2->Text = L”Hasil”;
this->button2->UseVisualStyleBackColor = true;
this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
//
// textBox6
//
this->textBox6->Location = System::Drawing::Point(154, 107);
this->textBox6->Name = L”textBox6″;
this->textBox6->Size = System::Drawing::Size(69, 20);
this->textBox6->TabIndex = 4;
//
// textBox5
//
this->textBox5->Location = System::Drawing::Point(154, 69);
this->textBox5->Name = L”textBox5″;
this->textBox5->Size = System::Drawing::Size(69, 20);
this->textBox5->TabIndex = 3;
//
// textBox4
//
this->textBox4->Location = System::Drawing::Point(154, 34);
this->textBox4->Name = L”textBox4″;
this->textBox4->Size = System::Drawing::Size(69, 20);
this->textBox4->TabIndex = 2;
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(24, 77);
this->label5->Name = L”label5″;
this->label5->Size = System::Drawing::Size(94, 13);
this->label5->TabIndex = 1;
this->label5->Text = L”Nilai RESISTANSI”;
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(21, 34);
this->label4->Name = L”label4″;
this->label4->Size = System::Drawing::Size(90, 13);
this->label4->TabIndex = 0;
this->label4->Text = L”Nilai TEGANGAN”;
//
// groupBox2
//
this->groupBox2->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(128)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->groupBox2->Controls->Add(this->textBox3);
this->groupBox2->Controls->Add(this->button1);
this->groupBox2->Controls->Add(this->textBox2);
this->groupBox2->Controls->Add(this->textBox1);
this->groupBox2->Controls->Add(this->label3);
this->groupBox2->Controls->Add(this->label2);
this->groupBox2->Location = System::Drawing::Point(16, 29);
this->groupBox2->Name = L”groupBox2″;
this->groupBox2->Size = System::Drawing::Size(229, 160);
this->groupBox2->TabIndex = 0;
this->groupBox2->TabStop = false;
this->groupBox2->Text = L”Menghitung TEGANGAN”;
//
// textBox3
//
this->textBox3->Location = System::Drawing::Point(137, 107);
this->textBox3->Name = L”textBox3″;
this->textBox3->Size = System::Drawing::Size(71, 20);
this->textBox3->TabIndex = 5;
//
// button1
//
this->button1->Location = System::Drawing::Point(16, 105);
this->button1->Name = L”button1″;
this->button1->Size = System::Drawing::Size(75, 23);
this->button1->TabIndex = 4;
this->button1->Text = L”Hasil”;
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// textBox2
//
this->textBox2->Location = System::Drawing::Point(137, 71);
this->textBox2->Name = L”textBox2″;
this->textBox2->Size = System::Drawing::Size(71, 20);
this->textBox2->TabIndex = 3;
//
// textBox1
//
this->textBox1->Location = System::Drawing::Point(137, 34);
this->textBox1->Name = L”textBox1″;
this->textBox1->Size = System::Drawing::Size(71, 20);
this->textBox1->TabIndex = 2;
//
// label3
//
this->label3->AutoSize = true;
this->label3->Location = System::Drawing::Point(13, 71);
this->label3->Name = L”label3″;
this->label3->Size = System::Drawing::Size(78, 13);
this->label3->TabIndex = 1;
this->label3->Text = L”Nilai Resistansi”;
//
// label2
//
this->label2->AutoSize = true;
this->label2->Location = System::Drawing::Point(13, 34);
this->label2->Name = L”label2″;
this->label2->Size = System::Drawing::Size(51, 13);
this->label2->TabIndex = 0;
this->label2->Text = L”Nilai Arus”;
//
// label1
//
this->label1->AutoSize = true;
this->label1->Location = System::Drawing::Point(284, 23);
this->label1->Name = L”label1″;
this->label1->Size = System::Drawing::Size(249, 13);
this->label1->TabIndex = 1;
this->label1->Text = L”APLIKASI PERHITUNGAN DASAR KELISTRIKAN”;
//
// groupBox5
//
this->groupBox5->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(224)),
static_cast<System::Int32>(static_cast<System::Byte>(192)));
this->groupBox5->Controls->Add(this->groupBox8);
this->groupBox5->Controls->Add(this->groupBox7);
this->groupBox5->Controls->Add(this->groupBox6);
this->groupBox5->Location = System::Drawing::Point(12, 288);
this->groupBox5->Name = L”groupBox5″;
this->groupBox5->Size = System::Drawing::Size(818, 204);
this->groupBox5->TabIndex = 2;
this->groupBox5->TabStop = false;
this->groupBox5->Text = L”2. PERHITUNGAN MUATAN, ARUS DAN WAKTU”;
//
// groupBox8
//
this->groupBox8->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->groupBox8->Controls->Add(this->textBox18);
this->groupBox8->Controls->Add(this->textBox17);
this->groupBox8->Controls->Add(this->textBox16);
this->groupBox8->Controls->Add(this->button6);
this->groupBox8->Controls->Add(this->label13);
this->groupBox8->Controls->Add(this->label12);
this->groupBox8->Location = System::Drawing::Point(552, 30);
this->groupBox8->Name = L”groupBox8″;
this->groupBox8->Size = System::Drawing::Size(237, 153);
this->groupBox8->TabIndex = 2;
this->groupBox8->TabStop = false;
this->groupBox8->Text = L”Menghitung WAKTU”;
//
// textBox18
//
this->textBox18->Location = System::Drawing::Point(150, 104);
this->textBox18->Name = L”textBox18″;
this->textBox18->Size = System::Drawing::Size(65, 20);
this->textBox18->TabIndex = 5;
//
// textBox17
//
this->textBox17->Location = System::Drawing::Point(150, 64);
this->textBox17->Name = L”textBox17″;
this->textBox17->Size = System::Drawing::Size(65, 20);
this->textBox17->TabIndex = 4;
//
// textBox16
//
this->textBox16->Location = System::Drawing::Point(150, 22);
this->textBox16->Name = L”textBox16″;
this->textBox16->Size = System::Drawing::Size(65, 20);
this->textBox16->TabIndex = 3;
//
// button6
//
this->button6->Location = System::Drawing::Point(23, 101);
this->button6->Name = L”button6″;
this->button6->Size = System::Drawing::Size(75, 23);
this->button6->TabIndex = 2;
this->button6->Text = L”Hasil”;
this->button6->UseVisualStyleBackColor = true;
this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);
//
// label13
//
this->label13->AutoSize = true;
this->label13->Location = System::Drawing::Point(24, 66);
this->label13->Name = L”label13″;
this->label13->Size = System::Drawing::Size(60, 13);
this->label13->TabIndex = 1;
this->label13->Text = L”Nilai ARUS”;
//
// label12
//
this->label12->AutoSize = true;
this->label12->Location = System::Drawing::Point(23, 28);
this->label12->Name = L”label12″;
this->label12->Size = System::Drawing::Size(76, 13);
this->label12->TabIndex = 0;
this->label12->Text = L”Nilai MUATAN”;
//
// groupBox7
//
this->groupBox7->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(255)),
static_cast<System::Int32>(static_cast<System::Byte>(128)));
this->groupBox7->Controls->Add(this->button5);
this->groupBox7->Controls->Add(this->textBox15);
this->groupBox7->Controls->Add(this->textBox14);
this->groupBox7->Controls->Add(this->textBox13);
this->groupBox7->Controls->Add(this->label11);
this->groupBox7->Controls->Add(this->label10);
this->groupBox7->Location = System::Drawing::Point(275, 30);
this->groupBox7->Name = L”groupBox7″;
this->groupBox7->Size = System::Drawing::Size(239, 153);
this->groupBox7->TabIndex = 1;
this->groupBox7->TabStop = false;
this->groupBox7->Text = L”Menghitung ARUS”;
//
// button5
//
this->button5->Location = System::Drawing::Point(29, 100);
this->button5->Name = L”button5″;
this->button5->Size = System::Drawing::Size(75, 23);
this->button5->TabIndex = 5;
this->button5->Text = L”Hasil”;
this->button5->UseVisualStyleBackColor = true;
this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
//
// textBox15
//
this->textBox15->Location = System::Drawing::Point(155, 103);
this->textBox15->Name = L”textBox15″;
this->textBox15->Size = System::Drawing::Size(68, 20);
this->textBox15->TabIndex = 4;
//
// textBox14
//
this->textBox14->Location = System::Drawing::Point(154, 64);
this->textBox14->Name = L”textBox14″;
this->textBox14->Size = System::Drawing::Size(69, 20);
this->textBox14->TabIndex = 3;
//
// textBox13
//
this->textBox13->Location = System::Drawing::Point(154, 22);
this->textBox13->Name = L”textBox13″;
this->textBox13->Size = System::Drawing::Size(69, 20);
this->textBox13->TabIndex = 2;
//
// label11
//
this->label11->AutoSize = true;
this->label11->Location = System::Drawing::Point(26, 69);
this->label11->Name = L”label11″;
this->label11->Size = System::Drawing::Size(70, 13);
this->label11->TabIndex = 1;
this->label11->Text = L”Nilai WAKTU”;
//
// label10
//
this->label10->AutoSize = true;
this->label10->Location = System::Drawing::Point(24, 30);
this->label10->Name = L”label10″;
this->label10->Size = System::Drawing::Size(76, 13);
this->label10->TabIndex = 0;
this->label10->Text = L”Nilai MUATAN”;
//
// groupBox6
//
this->groupBox6->BackColor = System::Drawing::Color::Aqua;
this->groupBox6->Controls->Add(this->button4);
this->groupBox6->Controls->Add(this->textBox12);
this->groupBox6->Controls->Add(this->textBox11);
this->groupBox6->Controls->Add(this->textBox10);
this->groupBox6->Controls->Add(this->label9);
this->groupBox6->Controls->Add(this->label8);
this->groupBox6->Location = System::Drawing::Point(16, 30);
this->groupBox6->Name = L”groupBox6″;
this->groupBox6->Size = System::Drawing::Size(229, 153);
this->groupBox6->TabIndex = 0;
this->groupBox6->TabStop = false;
this->groupBox6->Text = L”Menghitung MUATAN”;
//
// button4
//
this->button4->Location = System::Drawing::Point(19, 101);
this->button4->Name = L”button4″;
this->button4->Size = System::Drawing::Size(75, 23);
this->button4->TabIndex = 5;
this->button4->Text = L”Hasil”;
this->button4->UseVisualStyleBackColor = true;
this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
//
// textBox12
//
this->textBox12->Location = System::Drawing::Point(137, 104);
this->textBox12->Name = L”textBox12″;
this->textBox12->Size = System::Drawing::Size(71, 20);
this->textBox12->TabIndex = 4;
//
// textBox11
//
this->textBox11->Location = System::Drawing::Point(137, 67);
this->textBox11->Name = L”textBox11″;
this->textBox11->Size = System::Drawing::Size(71, 20);
this->textBox11->TabIndex = 3;
//
// textBox10
//
this->textBox10->Location = System::Drawing::Point(137, 30);
this->textBox10->Name = L”textBox10″;
this->textBox10->Size = System::Drawing::Size(71, 20);
this->textBox10->TabIndex = 2;
//
// label9
//
this->label9->AutoSize = true;
this->label9->Location = System::Drawing::Point(17, 67);
this->label9->Name = L”label9″;
this->label9->Size = System::Drawing::Size(62, 13);
this->label9->TabIndex = 1;
this->label9->Text = L”Nilai Waktu”;
//
// label8
//
this->label8->AutoSize = true;
this->label8->Location = System::Drawing::Point(16, 30);
this->label8->Name = L”label8″;
this->label8->Size = System::Drawing::Size(60, 13);
this->label8->TabIndex = 0;
this->label8->Text = L”Nilai ARUS”;
//
// button7
//
this->button7->Location = System::Drawing::Point(744, 23);
this->button7->Name = L”button7″;
this->button7->Size = System::Drawing::Size(75, 23);
this->button7->TabIndex = 3;
this->button7->Text = L”Selesai”;
this->button7->UseVisualStyleBackColor = true;
this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L”$this.BackgroundImage”)));
this->ClientSize = System::Drawing::Size(839, 527);
this->Controls->Add(this->button7);
this->Controls->Add(this->groupBox5);
this->Controls->Add(this->label1);
this->Controls->Add(this->groupBox1);
this->Name = L”Form1″;
this->Text = L”Form1″;
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->groupBox1->ResumeLayout(false);
this->groupBox4->ResumeLayout(false);
this->groupBox4->PerformLayout();
this->groupBox3->ResumeLayout(false);
this->groupBox3->PerformLayout();
this->groupBox2->ResumeLayout(false);
this->groupBox2->PerformLayout();
this->groupBox5->ResumeLayout(false);
this->groupBox8->ResumeLayout(false);
this->groupBox8->PerformLayout();
this->groupBox7->ResumeLayout(false);
this->groupBox7->PerformLayout();
this->groupBox6->ResumeLayout(false);
this->groupBox6->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();

}
#pragma endregion
private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
}
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
double I,R;//deklarasi variabel I, R bertipe double
double hasil;//deklarasi variabel hasil bertipe double

I = double::Parse(textBox1->Text);//nilai I akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox1
R = double::Parse(textBox2->Text);//nilai R akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox2

hasil = (I*R);//perintah penugasan rumus (perkalian);

textBox3->Text = hasil.ToString();//pada taxtbox3 akan menampilkan hasil

}
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
double V,R;//deklarasi variabel V, R bertipe double
double hasil;//deklarasi variabel hasil bertipe double

V = double::Parse(textBox4->Text);//nilai V akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox4
R = double::Parse(textBox5->Text);//nilai R akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox5

hasil = (V/R);//perintah penugasan rumus (Pembagian);

textBox6->Text = hasil.ToString();//pada taxtbox6 akan menampilkan hasil
}
private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
double V,I;//deklarasi variabel V, I bertipe double
double hasil;//deklarasi variabel hasil bertipe double

V = double::Parse(textBox7->Text);//nilai V akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox7
I = double::Parse(textBox8->Text);//nilai I akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox8

hasil = (V/I);//perintah penugasan rumus (Pembagian);

textBox9->Text = hasil.ToString();//pada taxtbox9 akan menampilkan hasil
}
private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
double I,t;//deklarasi variabel I, t bertipe double
double hasil;//deklarasi variabel hasil bertipe double

I = double::Parse(textBox10->Text);//nilai I akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox10
t = double::Parse(textBox11->Text);//nilai t akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox11

hasil = (I*t);//perintah penugasan rumus (Perkalian);

textBox12->Text = hasil.ToString();//pada taxtbox12 akan menampilkan hasil
}
private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
double Q,t;//deklarasi variabel Q, t bertipe double
double hasil;//deklarasi variabel hasil bertipe double

Q = double::Parse(textBox13->Text);//nilai Q akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox13
t = double::Parse(textBox14->Text);//nilai t akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox14

hasil = (Q/t);//perintah penugasan rumus (Pembagian);

textBox15->Text = hasil.ToString();//pada taxtbox15 akan menampilkan hasil
}
private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
double Q,I;//deklarasi variabel Q, I bertipe double
double hasil;//deklarasi variabel hasil bertipe double

Q = double::Parse(textBox16->Text);//nilai Q akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox16
I = double::Parse(textBox17->Text);//nilai I akan diconvert ke double yang nilainya merupakan teks yang didapat dari texbox17

hasil = (Q/I);//perintah penugasan rumus (Pembagian);

textBox18->Text = hasil.ToString();//pada taxtbox18 akan menampilkan hasil
}
private: System::Void button7_Click(System::Object^  sender, System::EventArgs^  e) {
this->Close();
}
};
}

Video Tutorial :
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s