Rabu, 05 September 2012

Kegiatan Magang di SMK TRIDAYA Cibinong-BOGOR.

Pada kesempatan kali ini, saya akan menceritakan kegiatan magang saya di SMK TRIDAYA Cibinong-BOGOR,, di sekolahan ini saya mengajar anak kelas TKJ 11 B,  tentang dasar-dasar komputer baik di ruang kelas maupun di lab komputer SMK..Dan juga saya mengajak murid-murid SMK TRIDAYA untuk menonton film Understanding CyberWorld, kemudian saya berikan beberapa soal kepada murid-murid setelah menonton film tersebut.
 Ini adalah foto-foto saya mengajar di lab komputer SMK TRIDAYA..





Ini adalah foto Gedung Sekolah SMK TRIDAYA Cibinong-BOGOR.


Minggu, 17 Juni 2012

ABAPer

Salah satu yang saya pelajari dan praktekkan di dalam dunia SAP-INTERFACES adalah Bahasa Pemrograman ABAP.
Bahasa pemrograman ini merupakan salah satu bahasa pemrograman yang banyak dipakai oleh perusahaan-perusahaan di dunia.
Untuk mendapatkan software ABAP ini bisa di download di www.sap-interfaces.com dengan IDES 47.200 sebagai virtual PC sebagai koneksinya dan SAP GUI 710 untuk install aplikasinya, dengan catatan RAM laptop minimal 4GB karena software nya agak lumayan berat..
Baiklah saya akan memperlihatkan contoh sederhana pembuatan report ABAP berdasarkan Material Number /matnr.
Inilah tampilan awal ABAP.




Kemudian di execute,, dan pilih matnr nya, seperti di bawah ini..


dan execute lagi atau tekan F8. dan akan timbul report database nya seperti di bawah ini.


Print Out dan Selesai..

All about SAP-INTERFACES..

PENGENALAN SAP.



SAP merupakan software yang banyak dipakai di perusahaan besar untuk mendukung integrasi proses bisnis. Lima tahun terakhir, di perusahaan negara-negara Asia, termasuk Indonesia, sedang gencar-gencarnya mengimplementasikannya. Software buatan Jerman ini telah lama dipakai di perusahaan besar Eropa dan Amerika. 
Seperti diberitakan Detik.com beberapa hari lalu, tahun ini, SAP juga menyiapkan paket khusus untuk perusahaan level menengah ke bawah (baca UKM). Dengan penambahan area supporting SAP, akan menambah pangsa pasar SAP dan juga membuka peluang tenaga kerja bagi dunia IT. 


Di Indonesia, banyak perusahaan besar yang telah mengimplementasikan SAP, misalnya Astra International, Toyota Astra Motor, Toyota Motor Manufacturing Indonesia, Bentoel Prima, United Tractor, Daihatsu Motor, Pertamina, Aqua, Telkomsel, Auto 2000, Blue Bird dan masih banyak perusahaan lagi yang tidak mungkin disebutkan satu persatu. Modul yang diimplementasikan tiap perusahaan pun beragam. Ada yang hanya memakai untuk keperluan area tertentu seperti Financial Accounting saja atau Sales and Distributon saja, namun banyak pula yang mengintegrasikan beberapa modul. 



Scope integrasi, harga license tiap user SAP yang relative mahal, biaya consultan yang lumayan dan tingginya ‘kutu loncat’ SDM SAP, menyebabkan tidak semua perusahaan ‘berani’ memakai solusi SAP. 

Bagi Anda yang baru di dunia IT, tentu belum banyak mengenalnya. Kami sajikan sekilas pengenalan SAP untuk menambah informasi Anda. Diharapkan setelah membaca materi berikut, Anda dapat mengetahui apa itu SAP, Modul-Modul dalam SAP, Integrasi SAP dan proses bisnis yang bisa dilakukan oleh SAP.


APA ITU SAP...?



SAP (System Application and Product in data processing ) adalah suatu software yang dikembangkan untuk mendukung suatu organisasi dalam menjalankan kegiatan operasionalnya secara lebih efisien dan efektif. SAP merupakan software Enterprise Resources Planning (ERP), yaitu suatu tools IT dan manajemen untuk membantu perusahaan merencanakan dan melakukan berbagai aktivitas sehari-hari. 

SAP terdiri dari sejumlah modul aplikasi yang mempunyai kemampuan mendukung semua transaksi yang perlu dilakukan suatu perusahaan dan tiap aplikasi bekerja secara berkaitan satu dengan yang lainnya. Semua modul aplikasi di SAP dapat bekerja secara terintegrasi/terhubung yang satu dengan lainnya.



Keilmuan SAP menjadi 2 : SAP Technical dan SAP Funtional

Di SAP ada 2 sisi Technical, yaitu SAP Basis dan ABAPER.

SAP Basis (Administrator)
Basis menangani sizing server, instalasi, security, database management, monitoring dan system performance.
Bisa dibayangkan, pengetahuan apa yang diperlukan dan mendukung. 
Pengetahuan teknis terhadap server, baik UNIX, Windows, AS400 atau pun Linux akan sangat membantu.
Apalagi ditambah pendalaman database baik SQL Server, Oracle atau pun DB2. 
Seberapa besar bisnis perusahaan yang akan dimasukkan dalam scope SAP Project, seberapa strict system dan berapa durasi sistem akan on line menentukan Server, jumlah-kecepatan processor, memory, kapasitas disk dan Operating System yang dipakai. 
Penentuan kapasitas ini dinamai dengan SIZING. Bagi pemula, scope UNIX, AS400 server atau Oracle dan DB2 sangat ‘mahal’ dan langka. Namun dengan berbekal pengetahuan SQL server dan Windows Server akan sangat berguna, karena banyak juga perusahaan yang menggunakan Windows sebagai Server dan SQL Server sebagai database. 
Kebanyakan perusahaan akan memakai Server kelas menengah, baik secara harga mau pun performance seperti UNIX. AS400 dan DB2 400 sangat kuat performancenya, namun harganya sangat mahal. 
DI Indonesia hanya ada 2 perusahaan yang memakai AS400 yaitu TMMIN (Toyota Motor Manufacturing Indonesia) dan Indofood.

ABAPer (programer)
ABAPer menangani enhancement system terhadap kebutuhan bisnis proses user. Secara mudah adalah kebutuhan report. Tidak semua report yang dibutuhkan oleh user bisa dipenuhi SAP, sehingga diperlukan program kecil dengan bahasa ABAP (standar SAP) untuk membuatnya. Sebelum SAP diimplementasikan, di suatu perusahaan bisa saja sudah terdapat system aplikasi dan ada kebutuhan untuk menghubungkan (interface) kedua system ini. Interface ini juga memerlukan kehandalan seorang ABAPer.

SAP Functional
Setiap perusahaan memiliki keunikan tersendiri berdasarkan core businessnya. Sebagai contoh, perusahaan automotive Toyota dan Daihatsu. Kedua perusahaan ini sama-sama memproduksi mobil. 
Keduanya membutuhkan komponen yang hampir sama, namun bisa jadi proses order komponen dan penerimaan barang bisa memiliki proses yang berbeda.

Coba bayangkan bisnis produksi rokok dan pendistribusiannya. Apakah sistem produksi rokok Marlboro, Bentoel atau Sampoerna sama? 
Bagaimana dengan sistem warehouse dan distribusinya. 
Jika semua lini bisnis ini menggunakan SAP, apakah kustomisasi sistemnya akan sama? 
Jika bisnis prosesnya berbeda, maka sistem yang dikustom pun, akan berbeda.

Kemampuan analisa bisnis (business analyst) dan teknis IT mutlak diperlukan untuk menjadi tim Functional. Bisa saja orang yang berbasis bisnis menekuni IT atau sebaliknya orang IT yang mendalami bisnis proses. 
Berbicara mengenai functional, dimana di SAP dibagi bermacam-macam module seperti : Financial, Contolling, Material Management, Plant Maintenance, Sales, Quality, HR atau lainnya.


Untuk mengetahui dunia sap-interfaces lebih dalam lagi, Silahkan masuk ke link di bawah ini

Dalam proses penerbangan, di garuda Indonesia juga sudah menggunakan sap-interfaces, dan bahasa pemrograman ABAP. Di bawah ini adalah spalsh screen halaman awal pemrograman ABAP pada Garuda Indonesia..

Jumat, 01 Juni 2012

Program Android

Ini adalah program-program yang biasanya di gunakan di hape Android.

Sourcecode Programnya

package com.contoh.haloAndroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HaloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView (this);
        tv.setText("Halo, Android");
        setContentView(tv);
       setContentView(R.layout.main);
    }
}

Keluarannya Program Helo Androidseperti ini ne..



Program Blok Warna

Sourcecode Program Blok Warna kayak gini ne..

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:layout_weight="1">
   
    <TextView
        android:text="Merah"
        android:gravity="center_horizontal"
        android:background="#aa0000"
        android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_weight="1"/>
    <TextView
        android:text="Hijau"
        android:gravity="center_horizontal"
        android:background="#00aa00"
        android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_weight="1"/>
     <TextView
        android:text="Biru"
        android:gravity="center_horizontal"
        android:background="#0000aa"
        android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_weight="1"/>
      <TextView
        android:text="Kuning"
        android:gravity="center_horizontal"
        android:background="#aaaa00"
        android:layout_width="wrap_content"
       android:layout_height="fill_parent"
       android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>



Rabu, 30 Mei 2012

Membuat Kalkulator sederhana dengan java


Ni dia kode programnya..
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * kalku.java
 *
 * Created on May 23, 2012, 8:16:01 AM
 */
package kalkulator_mini;

/**
 *
 * @author adic
 */
public class kalku extends javax.swing.JFrame {
String angka;
Double total,angka1,angka2;
int pilih;
    /** Creates new form kalku */
    public kalku() {
        initComponents();
        angka= "";
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        cmdclear = new javax.swing.JButton();
        cmdminplus = new javax.swing.JButton();
        cmdkurang = new javax.swing.JButton();
        cmdtambah = new javax.swing.JButton();
        cmdsamadengan = new javax.swing.JButton();
        cmd9 = new javax.swing.JButton();
        cmd8 = new javax.swing.JButton();
        cmd7 = new javax.swing.JButton();
        cmd6 = new javax.swing.JButton();
        cmdpersen = new javax.swing.JButton();
        cmd0 = new javax.swing.JButton();
        cmdtampil = new javax.swing.JTextField();
        cmdkali = new javax.swing.JButton();
        cmd2 = new javax.swing.JButton();
        cmd3 = new javax.swing.JButton();
        cmdbagi = new javax.swing.JButton();
        cmd4 = new javax.swing.JButton();
        cmdkoma = new javax.swing.JButton();
        cmd5 = new javax.swing.JButton();
        cmd1 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("KALKULATOR MINI");
        setBackground(new java.awt.Color(0, 255, 0));
        setForeground(new java.awt.Color(204, 0, 255));

        jPanel1.setBackground(new java.awt.Color(51, 255, 0));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 5));

        cmdclear.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdclear.setText("C");
        cmdclear.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdclearActionPerformed(evt);
            }
        });

        cmdminplus.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdminplus.setText("+/-");
        cmdminplus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdminplusActionPerformed(evt);
            }
        });

        cmdkurang.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdkurang.setText("-");
        cmdkurang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdkurangActionPerformed(evt);
            }
        });

        cmdtambah.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdtambah.setText("+");
        cmdtambah.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdtambahActionPerformed(evt);
            }
        });

        cmdsamadengan.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdsamadengan.setText("=");
        cmdsamadengan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdsamadenganActionPerformed(evt);
            }
        });

        cmd9.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd9.setText("9");
        cmd9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd9ActionPerformed(evt);
            }
        });

        cmd8.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd8.setText("8");
        cmd8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd8ActionPerformed(evt);
            }
        });

        cmd7.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd7.setText("7");
        cmd7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd7ActionPerformed(evt);
            }
        });

        cmd6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        cmd6.setText("6");
        cmd6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd6ActionPerformed(evt);
            }
        });

        cmdpersen.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdpersen.setText("%");
        cmdpersen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdpersenActionPerformed(evt);
            }
        });

        cmd0.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd0.setText("0");
        cmd0.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd0ActionPerformed(evt);
            }
        });

        cmdtampil.setBackground(new java.awt.Color(255, 255, 0));
        cmdtampil.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        cmdtampil.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3));
        cmdtampil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdtampilActionPerformed(evt);
            }
        });

        cmdkali.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdkali.setText("*");
        cmdkali.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdkaliActionPerformed(evt);
            }
        });

        cmd2.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd2.setText("2");
        cmd2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd2ActionPerformed(evt);
            }
        });

        cmd3.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd3.setText("3");
        cmd3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd3ActionPerformed(evt);
            }
        });

        cmdbagi.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdbagi.setText("/");
        cmdbagi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdbagiActionPerformed(evt);
            }
        });

        cmd4.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd4.setText("4");
        cmd4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd4ActionPerformed(evt);
            }
        });

        cmdkoma.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmdkoma.setText(".");
        cmdkoma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdkomaActionPerformed(evt);
            }
        });

        cmd5.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd5.setText("5");
        cmd5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd5ActionPerformed(evt);
            }
        });

        cmd1.setFont(new java.awt.Font("Tahoma", 1, 11));
        cmd1.setText("1");
        cmd1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmd1ActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel1.setText("KALKULATOR MINI ADIC KOMALASARI");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                    .addComponent(cmdtampil, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(cmd4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE)
                            .addComponent(cmdpersen, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE)
                            .addComponent(cmd1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE)
                            .addComponent(cmd7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cmd2, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(cmd8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(cmd5, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))
                            .addComponent(cmd0, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cmd6, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                    .addComponent(cmd9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cmdkurang, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cmdminplus, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cmdclear, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cmdkali, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 6, Short.MAX_VALUE)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(cmdkoma, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(cmd3, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(cmdtambah, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(cmdbagi, javax.swing.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE))
                                    .addComponent(cmdsamadengan, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE))))))
                .addGap(20, 20, 20))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cmdtampil, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmd7)
                    .addComponent(cmd8)
                    .addComponent(cmd9)
                    .addComponent(cmdminplus)
                    .addComponent(cmdclear))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cmdkurang)
                        .addComponent(cmdkali))
                    .addComponent(cmd4)
                    .addComponent(cmd6)
                    .addComponent(cmd5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cmdtambah)
                        .addComponent(cmdbagi))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cmd1)
                        .addComponent(cmd2)
                        .addComponent(cmd3)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cmdpersen)
                    .addComponent(cmdsamadengan)
                    .addComponent(cmd0)
                    .addComponent(cmdkoma))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>                      

private void cmdtampilActionPerformed(java.awt.event.ActionEvent evt) {                                        
// TODO add your handling code here:
}                                        

private void cmd0ActionPerformed(java.awt.event.ActionEvent evt) {                                    
// TODO add your handling code here:
    //angka+="0";
    //cmdtampil.setText("0");
    cmdtampil.setText(angka +="0");
}                                  

private void cmdpersenActionPerformed(java.awt.event.ActionEvent evt) {                                        
    angka2 = Double.parseDouble(angka);
    total = angka2 / 100;
    angka = Double.toString(total);
    cmdtampil.setText(angka);
}                                        

private void cmd8ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="8");
}                                  

private void cmd1ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="1");
}                                  

private void cmd2ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="2");  
}                                  

private void cmd3ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="3");
}                                  

private void cmd4ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="4");
}                                  

private void cmd5ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="5");
}                                  

private void cmd6ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="6");
}                                  

private void cmd7ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="7");
}                                  

private void cmd9ActionPerformed(java.awt.event.ActionEvent evt) {                                    
cmdtampil.setText(angka +="9");
}                                  

private void cmdtambahActionPerformed(java.awt.event.ActionEvent evt) {                                        
    angka1=Double.parseDouble(angka);
    cmdtampil.setText("+");
    angka="";
    pilih=1;
}                                        

private void cmdsamadenganActionPerformed(java.awt.event.ActionEvent evt) {                                            
    switch(pilih)
    {case 1:
        angka2=Double.parseDouble(angka);
        total = angka1 + angka2;
        angka = Double.toString(total);
        cmdtampil.setText(angka);
        break;
    case 2:
        angka2=Double.parseDouble(angka);
        total = angka1 - angka2;
        angka= Double.toString(total);
        cmdtampil.setText(angka);
        break;
    case 3:
        angka2=Double.parseDouble(angka);
        total = angka1 * angka2;
        angka= Double.toString(total);
        cmdtampil.setText(angka);
        break;
    case 4:
        angka2=Double.parseDouble(angka);
        total = angka1 / angka2;
        angka= Double.toString(total);
        cmdtampil.setText(angka);
        break;
    default:
        break;
    }
}                                            

private void cmdclearActionPerformed(java.awt.event.ActionEvent evt) {                                        
    angka1 = 0.0;
    angka2 = 0.0;
    total = 0.0;
    angka ="";
    cmdtampil.setText("");
}                                      

private void cmdkurangActionPerformed(java.awt.event.ActionEvent evt) {                                        
    angka1=Double.parseDouble(angka);
    cmdtampil.setText("-");
    angka="";
    pilih=2;
}                                        

private void cmdkaliActionPerformed(java.awt.event.ActionEvent evt) {                                      
    angka1=Double.parseDouble(angka);
    cmdtampil.setText("*");
    angka="";
    pilih=3;
   
}                                      

private void cmdbagiActionPerformed(java.awt.event.ActionEvent evt) {                                      
    angka1=Double.parseDouble(angka);
    cmdtampil.setText("/");
    angka="";
    pilih=4;
}                                      

private void cmdminplusActionPerformed(java.awt.event.ActionEvent evt) {                                          
    angka2 = Double.parseDouble(angka);
    total = 0 - angka2;
    angka = Double.toString(total);
    cmdtampil.setText(angka);  
}                                        

private void cmdkomaActionPerformed(java.awt.event.ActionEvent evt) {                                      
cmdtampil.setText(angka +=".");
}                                      

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(kalku.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(kalku.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(kalku.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(kalku.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new kalku().setVisible(true);
            }
        });
    }
    private double temp;
    // Variables declaration - do not modify                    
    private javax.swing.JButton cmd0;
    private javax.swing.JButton cmd1;
    private javax.swing.JButton cmd2;
    private javax.swing.JButton cmd3;
    private javax.swing.JButton cmd4;
    private javax.swing.JButton cmd5;
    private javax.swing.JButton cmd6;
    private javax.swing.JButton cmd7;
    private javax.swing.JButton cmd8;
    private javax.swing.JButton cmd9;
    private javax.swing.JButton cmdbagi;
    private javax.swing.JButton cmdclear;
    private javax.swing.JButton cmdkali;
    private javax.swing.JButton cmdkoma;
    private javax.swing.JButton cmdkurang;
    private javax.swing.JButton cmdminplus;
    private javax.swing.JButton cmdpersen;
    private javax.swing.JButton cmdsamadengan;
    private javax.swing.JButton cmdtambah;
    private javax.swing.JTextField cmdtampil;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration                  
}

Minggu, 29 April 2012

Program C++ dengan GUI

Pada kesempatan kali ini, saya akan menampilkan program yang saya buat yaitu Permainan Game Suit dengan Menggunakan Microsoft Visual Studio C++ 2010 berbasis GUI (Graphical User Interface).
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