2010年10月1日 星期五

listbox 99

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;
namespace WindowsFormsApplication1
{                       
    public partial class Form1 : Form
    {
        Form2 newform;
        public Form1()
        {
            InitializeComponent();
        }
        private void textBox4_TextChanged(object sender, EventArgs e)
        {
        }
        private void button1_Click(object sender, EventArgs e)
        {
           
           int a1,d,n,an ;
           a1=int.Parse(textBox1.Text);
           d=int.Parse(textBox2.Text);
           n=int.Parse(textBox3.Text);
           an=a1+(n-1)*d;
           textBox4.Text = "" + an;
          
           


        }
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
        }
        private void button2_Click(object sender, EventArgs e)
        {
            newform = new Form2();
            newform.Show();
           
          
        }
    }
}

沒有留言:

張貼留言