Minggu, 27 Januari 2013

Membuat Form Utama Aplikasi


Form utama

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data.MySqlClient;

namespace LAB_INVENTARIS
{
    public partial class Form9 : Form
    {
        public Form9()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form frm2 = new Form2();
            frm2.Show();
            this.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form frm3 = new Form3();
            frm3.Show();
            this.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Form frm4 = new Form4();
            frm4.Show();
            this.Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form frm5 = new Form5();
            frm5.Show();
            this.Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Form frm6 = new Form6();
            frm6.Show();
            this.Show();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Form frm7 = new Form7();
            frm7.Show();
            this.Show();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            Form frm8 = new Form8();
            frm8.Show();
            this.Show();
        }
 
        private void button8_Click(object sender, EventArgs e)
        {
            iventaris syah = new iventaris();
            DataTable tabel = new DataTable();
            tabel = syah.bacasemua();
            dataGridView1.DataSource = tabel;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            alat syah = new alat();
            DataTable tabel = new DataTable();
            tabel = syah.bacasemua();
            dataGridView1.DataSource = tabel;
        }

        private void button10_Click_1(object sender, EventArgs e)
        {
            peminjam syah = new peminjam();
            DataTable tabel = new DataTable();
            tabel = syah.bacasemua();
            dataGridView1.DataSource = tabel;
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void button11_Click(object sender, EventArgs e)
        {
            this.Refresh();
        }
        static string a, b, c;
        private void timer1_Tick(object sender, EventArgs e)
        {
            // Tulisan Berjalan Ke Kiri
         
            a = label8.Text;
            b = a.Substring(0, 1);
            c = a.Substring(1, a.Length - 1);
            label8.Text = c + b;
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            DateTime date = DateTime.Now;
            label10.Text = DateTime.Now.ToLongTimeString();
        }
    }
}