Code/C#

.NET Compact Framework Project Sample

Hide Code 2008. 8. 13. 20:11


using System;
using System.Windows.Forms;

namespace SmartDeviceProject1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.tabControl1.Height = this.Height;
        }

        private void inputPanel1_EnabledChanged(object sender, EventArgs e)
        {
            this.SuspendLayout();

            if (this.inputPanel1.Enabled)
            {
                this.tabControl1.Height = this.Height - this.inputPanel1.Bounds.Height;
            }
            else
            {
                this.tabControl1.Height = this.Height;
            }

            this.ResumeLayout();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "Hi guys and girls!";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "Where do you want to go today?";
        }
    }
}