Will it work? [C# Test Xhair]

Posts 1–3 of 3 · Page 1 of 1
Will it work? [C# Test Xhair]
Code:
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

public class Form1 : System.Windows.Forms.Form
{
    public Form1()
    {
        InitializeComponent();
    }
    private void InitializeComponent()
    {
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
        this.ClientSize = new System.Drawing.Size(292, 273);
        this.Text = "";
        this.Resize += new System.EventHandler(this.Form1_Resize);
        this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint);

    }
    static void Main()
    {
        Application.Run(new Form1());
    }

    private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
    {
        Graphics g = e.Graphics;
        g.FillRectangle(Brushes.White, this.ClientRectangle);

        Pen p = new Pen(Color.Red);
        g.DrawLine(p, 0, 0, 100, 100);
        p.Dispose();

    }

    private void Form1_Resize(object sender, System.EventArgs e)
    {
        Invalidate();
    }
}
Will it work? if not why? Im just now learning the prog lang, and hacking...
It is my TEST version of my Xhair, it only make 1 line, but it is TEST version...
Dont work omg, whats wrong wqith this?
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us