Inilah coding pada pembuatan programnya.
#pragma once
#include <time.h>
//#include <string>
#include "AboutGame.h"
#include "copyright.h"
namespace GameSuitAdic {
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 MulaiGame
/// </summary>
public ref class MulaiGame : public System::Windows::Forms::Form
{
static int pointanda=0;
static int pointcomp=0;
static int Second = 0;
static int Minute = 0;
String^ Sec;
String^ nama;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Label^ lblNilaiAnda;
private: System::Windows::Forms::Label^ lblNilaiComp;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::DateTimePicker^ dateTimePicker1;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::LinkLabel^ linkLabel1;
private: System::Windows::Forms::LinkLabel^ linkLabel2;
private: AxWMPLib::AxWindowsMediaPlayer^ axWindowsMediaPlayer1;
private: System::Windows::Forms::Timer^ timer1;
String^ Min;
public:
MulaiGame(String^ x)
{
nama=x;
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~MulaiGame()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::PictureBox^ pictureBox1;
protected:
private: System::Windows::Forms::PictureBox^ pictureBox2;
private: System::Windows::Forms::PictureBox^ pictureBox3;
private: System::Windows::Forms::PictureBox^ pictureBox4;
private: System::Windows::Forms::PictureBox^ pictureBox5;
private: System::Windows::Forms::PictureBox^ pictureBox6;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Timer^ Timer;
private: System::Windows::Forms::Label^ Time;
private: System::ComponentModel::IContainer^ components;
protected:
private:
/// <summary>
/// Required designer variable.
/// </summary>
#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->components = (gcnew System::ComponentModel::Container());
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(MulaiGame::typeid));
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox4 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox5 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox6 = (gcnew System::Windows::Forms::PictureBox());
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->button1 = (gcnew System::Windows::Forms::Button());
this->Timer = (gcnew System::Windows::Forms::Timer(this->components));
this->Time = (gcnew System::Windows::Forms::Label());
this->label5 = (gcnew System::Windows::Forms::Label());
this->lblNilaiAnda = (gcnew System::Windows::Forms::Label());
this->lblNilaiComp = (gcnew System::Windows::Forms::Label());
this->label6 = (gcnew System::Windows::Forms::Label());
this->dateTimePicker1 = (gcnew System::Windows::Forms::DateTimePicker());
this->button3 = (gcnew System::Windows::Forms::Button());
this->linkLabel1 = (gcnew System::Windows::Forms::LinkLabel());
this->linkLabel2 = (gcnew System::Windows::Forms::LinkLabel());
this->axWindowsMediaPlayer1 = (gcnew AxWMPLib::AxWindowsMediaPlayer());
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->axWindowsMediaPlayer1))->BeginInit();
this->SuspendLayout();
//
// pictureBox1
//
this->pictureBox1->BackColor = System::Drawing::Color::Transparent;
this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(28, 51);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(100, 103);
this->pictureBox1->TabIndex = 0;
this->pictureBox1->TabStop = false;
this->pictureBox1->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox1_Click);
this->pictureBox1->MouseClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MulaiGame::pictureBox1_MouseClick);
//
// pictureBox2
//
this->pictureBox2->BackColor = System::Drawing::Color::Transparent;
this->pictureBox2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox2.Image")));
this->pictureBox2->Location = System::Drawing::Point(28, 151);
this->pictureBox2->Name = L"pictureBox2";
this->pictureBox2->Size = System::Drawing::Size(100, 101);
this->pictureBox2->TabIndex = 1;
this->pictureBox2->TabStop = false;
this->pictureBox2->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox2_Click);
this->pictureBox2->MouseClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MulaiGame::pictureBox2_MouseClick);
//
// pictureBox3
//
this->pictureBox3->BackColor = System::Drawing::Color::Transparent;
this->pictureBox3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox3.Image")));
this->pictureBox3->Location = System::Drawing::Point(28, 248);
this->pictureBox3->Name = L"pictureBox3";
this->pictureBox3->Size = System::Drawing::Size(100, 97);
this->pictureBox3->TabIndex = 2;
this->pictureBox3->TabStop = false;
this->pictureBox3->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox3_Click);
//
// pictureBox4
//
this->pictureBox4->BackColor = System::Drawing::Color::Transparent;
this->pictureBox4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox4.Image")));
this->pictureBox4->Location = System::Drawing::Point(461, 51);
this->pictureBox4->Name = L"pictureBox4";
this->pictureBox4->Size = System::Drawing::Size(100, 103);
this->pictureBox4->TabIndex = 3;
this->pictureBox4->TabStop = false;
this->pictureBox4->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox4_Click);
this->pictureBox4->MouseClick += gcnew System::Windows::Forms::MouseEventHandler(this, &MulaiGame::pictureBox4_MouseClick);
//
// pictureBox5
//
this->pictureBox5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox5.Image")));
this->pictureBox5->Location = System::Drawing::Point(461, 151);
this->pictureBox5->Name = L"pictureBox5";
this->pictureBox5->Size = System::Drawing::Size(100, 101);
this->pictureBox5->TabIndex = 4;
this->pictureBox5->TabStop = false;
this->pictureBox5->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox5_Click);
//
// pictureBox6
//
this->pictureBox6->BorderStyle = System::Windows::Forms::BorderStyle::FixedSingle;
this->pictureBox6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox6.Image")));
this->pictureBox6->Location = System::Drawing::Point(461, 248);
this->pictureBox6->Name = L"pictureBox6";
this->pictureBox6->Size = System::Drawing::Size(100, 96);
this->pictureBox6->TabIndex = 5;
this->pictureBox6->TabStop = false;
this->pictureBox6->Click += gcnew System::EventHandler(this, &MulaiGame::pictureBox6_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label1->Location = System::Drawing::Point(179, 27);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(0, 22);
this->label1->TabIndex = 6;
this->label1->Text =nama;
this->label1->Click += gcnew System::EventHandler(this, &MulaiGame::label1_Click);
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label2->Location = System::Drawing::Point(273, 27);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(32, 22);
this->label2->TabIndex = 7;
this->label2->Text = L"VS";
//
// label3
//
this->label3->AutoSize = true;
this->label3->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label3->Location = System::Drawing::Point(362, 27);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(54, 22);
this->label3->TabIndex = 8;
this->label3->Text = L"COMP";
//
// label4
//
this->label4->AutoSize = true;
this->label4->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label4->Location = System::Drawing::Point(251, 286);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(65, 22);
this->label4->TabIndex = 9;
this->label4->Text = L"HASIL";
this->label4->Click += gcnew System::EventHandler(this, &MulaiGame::label4_Click);
//
// button1
//
this->button1->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->button1->Location = System::Drawing::Point(177, 310);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(97, 35);
this->button1->TabIndex = 10;
this->button1->Text = L"LANJUT";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &MulaiGame::button1_Click);
//
// Timer
//
this->Timer->Enabled = true;
this->Timer->Interval = 1000;
this->Timer->Tick += gcnew System::EventHandler(this, &MulaiGame::timer1_Tick);
//
// Time
//
this->Time->AutoSize = true;
this->Time->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->Time->Location = System::Drawing::Point(461, 13);
this->Time->Name = L"Time";
this->Time->Size = System::Drawing::Size(65, 22);
this->Time->TabIndex = 12;
this->Time->Text = L"0 : 0";
this->Time->TextAlign = System::Drawing::ContentAlignment::TopCenter;
this->Time->Click += gcnew System::EventHandler(this, &MulaiGame::Time_Click);
//
// label5
//
this->label5->AutoSize = true;
this->label5->Location = System::Drawing::Point(274, 248);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(0, 13);
this->label5->TabIndex = 13;
//
// lblNilaiAnda
//
this->lblNilaiAnda->AutoSize = true;
this->lblNilaiAnda->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->lblNilaiAnda->Location = System::Drawing::Point(189, 66);
this->lblNilaiAnda->Name = L"lblNilaiAnda";
this->lblNilaiAnda->Size = System::Drawing::Size(21, 22);
this->lblNilaiAnda->TabIndex = 14;
this->lblNilaiAnda->Text = L"0";
this->lblNilaiAnda->Click += gcnew System::EventHandler(this, &MulaiGame::lblNilaiAnda_Click);
//
// lblNilaiComp
//
this->lblNilaiComp->AutoSize = true;
this->lblNilaiComp->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->lblNilaiComp->Location = System::Drawing::Point(366, 66);
this->lblNilaiComp->Name = L"lblNilaiComp";
this->lblNilaiComp->Size = System::Drawing::Size(21, 22);
this->lblNilaiComp->TabIndex = 15;
this->lblNilaiComp->Text = L"0";
//
// label6
//
this->label6->AutoSize = true;
this->label6->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label6->Location = System::Drawing::Point(24, 5);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(76, 22);
this->label6->TabIndex = 16;
this->label6->Text = L"label6";
this->label6->Click += gcnew System::EventHandler(this, &MulaiGame::label6_Click);
//
// dateTimePicker1
//
this->dateTimePicker1->CalendarFont = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->dateTimePicker1->Location = System::Drawing::Point(225, 5);
this->dateTimePicker1->Name = L"dateTimePicker1";
this->dateTimePicker1->Size = System::Drawing::Size(200, 20);
this->dateTimePicker1->TabIndex = 17;
//
// button3
//
this->button3->Font = (gcnew System::Drawing::Font(L"Courier New", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->button3->Location = System::Drawing::Point(309, 310);
this->button3->Name = L"button3";
this->button3->Size = System::Drawing::Size(87, 34);
this->button3->TabIndex = 18;
this->button3->Text = L"EXIT";
this->button3->UseVisualStyleBackColor = true;
this->button3->Click += gcnew System::EventHandler(this, &MulaiGame::button3_Click);
//
// linkLabel1
//
this->linkLabel1->AutoSize = true;
this->linkLabel1->Location = System::Drawing::Point(522, 352);
this->linkLabel1->Name = L"linkLabel1";
this->linkLabel1->Size = System::Drawing::Size(63, 13);
this->linkLabel1->TabIndex = 19;
this->linkLabel1->TabStop = true;
this->linkLabel1->Text = L"AboutGame";
this->linkLabel1->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &MulaiGame::linkLabel1_LinkClicked);
//
// linkLabel2
//
this->linkLabel2->AutoSize = true;
this->linkLabel2->Location = System::Drawing::Point(28, 352);
this->linkLabel2->Name = L"linkLabel2";
this->linkLabel2->Size = System::Drawing::Size(151, 13);
this->linkLabel2->TabIndex = 20;
this->linkLabel2->TabStop = true;
this->linkLabel2->Text = L"©copyright by Adic Komalasari";
this->linkLabel2->LinkClicked += gcnew System::Windows::Forms::LinkLabelLinkClickedEventHandler(this, &MulaiGame::linkLabel2_LinkClicked);
//
// axWindowsMediaPlayer1
//
this->axWindowsMediaPlayer1->Enabled = true;
this->axWindowsMediaPlayer1->Location = System::Drawing::Point(402, 299);
this->axWindowsMediaPlayer1->Name = L"axWindowsMediaPlayer1";
this->axWindowsMediaPlayer1->OcxState = (cli::safe_cast<System::Windows::Forms::AxHost::State^ >(resources->GetObject(L"axWindowsMediaPlayer1.OcxState")));
this->axWindowsMediaPlayer1->Size = System::Drawing::Size(75, 66);
this->axWindowsMediaPlayer1->TabIndex = 21;
this->axWindowsMediaPlayer1->Visible = false;
this->axWindowsMediaPlayer1->Enter += gcnew System::EventHandler(this, &MulaiGame::axWindowsMediaPlayer1_Enter);
//
// timer1
//
this->timer1->Enabled = true;
this->timer1->Interval = 1000;
this->timer1->Tick += gcnew System::EventHandler(this, &MulaiGame::timer1_Tick_1);
//
// MulaiGame
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::White;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
this->ClientSize = System::Drawing::Size(602, 376);
this->Controls->Add(this->axWindowsMediaPlayer1);
this->Controls->Add(this->linkLabel2);
this->Controls->Add(this->linkLabel1);
this->Controls->Add(this->button3);
this->Controls->Add(this->dateTimePicker1);
this->Controls->Add(this->label6);
this->Controls->Add(this->lblNilaiComp);
this->Controls->Add(this->lblNilaiAnda);
this->Controls->Add(this->label5);
this->Controls->Add(this->Time);
this->Controls->Add(this->button1);
this->Controls->Add(this->label4);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->pictureBox6);
this->Controls->Add(this->pictureBox5);
this->Controls->Add(this->pictureBox4);
this->Controls->Add(this->pictureBox3);
this->Controls->Add(this->pictureBox2);
this->Controls->Add(this->pictureBox1);
this->Name = L"MulaiGame";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"MulaiGame";
this->Load += gcnew System::EventHandler(this, &MulaiGame::MulaiGame_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->axWindowsMediaPlayer1))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
// static System::Windows::Forms::timer1^ myTimer = gcnew System::Windows::Forms::timer1;
private: System::Void pictureBox6_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
this->pictureBox1->Location = System::Drawing::Point(189, 138);
int i=0;
Random^ r = gcnew Random();
i=r->Next(3);
if(i==0){
this->pictureBox4->Location = System::Drawing::Point(295, 138);
label4->Text="SERI";
}
else if (i==1){
this->pictureBox5->Location = System::Drawing::Point(295, 140);
label4->Text="MENANG";
pointanda+=10;
}
else if (i==2){
this->pictureBox6->Location = System::Drawing::Point(295, 138);
label4->Text="KALAH";
pointcomp+=10;
}
lblNilaiAnda->Text=System::Convert::ToString(pointanda);
lblNilaiComp->Text=System::Convert::ToString(pointcomp);
if(pointanda == 50){
MessageBox::Show("SELAMAT ANDA MENANG !");
}
if(pointcomp == 50){
MessageBox::Show("MAAF ANDA KALAH !");
}
}
private: System::Void MulaiGame_Load(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox2_Click(System::Object^ sender, System::EventArgs^ e) {
this->pictureBox2->Location = System::Drawing::Point(194, 141);
int i=0;
Random^ r = gcnew Random();
i=r->Next(3);
if(i==0){
this->pictureBox4->Location = System::Drawing::Point(295, 138);
label4->Text="KALAH";
pointcomp+=10;
}
else if (i==1){
this->pictureBox5->Location = System::Drawing::Point(295, 140);
label4->Text="SERI";
}
else if (i==2){
this->pictureBox6->Location = System::Drawing::Point(295, 138);
label4->Text="MENANG";
pointanda+=10;
}
lblNilaiAnda->Text=System::Convert::ToString(pointanda);
lblNilaiComp->Text=System::Convert::ToString(pointcomp);
if(pointanda == 50){
MessageBox::Show("SELAMAT, ANDA MENANG");
}
if(pointcomp == 50){
MessageBox::Show("MAAF, ANDA KALAH !");
}
}
private: System::Void pictureBox3_Click(System::Object^ sender, System::EventArgs^ e) {
this->pictureBox3->Location = System::Drawing::Point(194, 138);
int i=0;
Random^ r = gcnew Random();
i=r->Next(3);
if(i==0){
this->pictureBox4->Location = System::Drawing::Point(295, 138);
label4->Text="MENANG";
pointanda+=10;
}
else if (i==1){
this->pictureBox5->Location = System::Drawing::Point(295, 140);
label4->Text="KALAH";
pointcomp+=10;
}
else if (i==2){
this->pictureBox6->Location = System::Drawing::Point(295, 138);
label4->Text="SERI";
}
lblNilaiAnda->Text=System::Convert::ToString(pointanda);
lblNilaiComp->Text=System::Convert::ToString(pointcomp);
if(pointanda == 50){
MessageBox::Show("SELAMAT, ANDA MENANG");
}
if(pointcomp == 50){
MessageBox::Show("MAAF, ANDA KALAH !");
}
}
private: System::Void pictureBox4_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox5_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
}
private: System::Void pictureBox4_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
}
private: System::Void pictureBox2_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
this->pictureBox1->Location = System::Drawing::Point(28, 51);
this->pictureBox2->Location = System::Drawing::Point(28, 151);
this->pictureBox3->Location = System::Drawing::Point(28, 248);
this->pictureBox4->Location = System::Drawing::Point(461, 51);
this->pictureBox5->Location = System::Drawing::Point(461, 151);
this->pictureBox6->Location = System::Drawing::Point(461, 248);
label4->Text="";
}
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
time_t rawtime;
struct tm * timeinfo;
char j,m,d;
time(&rawtime);
timeinfo=localtime(&rawtime);
j=timeinfo->tm_hour;
m=timeinfo->tm_min;
d=timeinfo->tm_sec;
label6->Text=j.ToString() + " : "+m.ToString() + " : "+d.ToString();
}
private: System::Void Time_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void lblNilaiAnda_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label6_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
Application::Exit();
}
private: System::Void linkLabel1_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^ e) {
AboutGame ^ form = gcnew AboutGame;
form->Show();
}
private: System::Void linkLabel2_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^ e) {
copyright ^ form = gcnew copyright;
form->Show();
}
private: System::Void axWindowsMediaPlayer1_Enter(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void label4_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void timer1_Tick_1(System::Object^ sender, System::EventArgs^ e) {
Second++;
if(Second == 60)
{
Second = 0;
Minute++;
}
if (Second==20){
timer1->Enabled=false;
MessageBox::Show("GAME OVER.....!!!!!!!!!");
}
Sec = Convert::ToString(Second);
Min = Convert::ToString(Minute);
Time->Text = Min + ":" + Sec;
}
};
}
dan Hasil Programnya