Monday, 7 May 2012

2. First form - Trader

I did my homework and I read two C#4.0 related books. Still, this knowledge is far from my programing needs. This is first form with code.


Field name is urlHistroy. Its function is to be address field to get history data from Internet.

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 Stocker
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }
        private void Form1_DoubleClick(object sender, EventArgs e)
        {
            Environment.Exit(0);        // double click on form to end application
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Text = "Stocker2012";  // put title on form bar
            this.Width = 1000;          // set form width
            this.Height = 500;          // set form height
            this.Top = 0;               // set position of form
            this.Left = 0;
        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
           
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Environment.Exit(0);        // end application
        }
       
    }
}

No comments:

Post a Comment