Click here to Skip to main content
15,896,153 members
Home / Discussions / C#
   

C#

 
AnswerRe: removing the changes done to an image Pin
Sandeep Mewara15-May-10 19:27
mveSandeep Mewara15-May-10 19:27 
Questionproblem with attaching an existing project to another project Pin
prasadbuddhika14-May-10 20:42
prasadbuddhika14-May-10 20:42 
AnswerRe: problem with attaching an existing project to another project Pin
#realJSOP14-May-10 23:21
professional#realJSOP14-May-10 23:21 
AnswerRe: problem with attaching an existing project to another project Pin
PIEBALDconsult15-May-10 5:23
mvePIEBALDconsult15-May-10 5:23 
AnswerRe: problem with attaching an existing project to another project Pin
Luc Pattyn15-May-10 7:04
sitebuilderLuc Pattyn15-May-10 7:04 
AnswerRe: problem with attaching an existing project to another project Pin
prasadbuddhika16-May-10 22:02
prasadbuddhika16-May-10 22:02 
QuestionSo I Tried Graphics Tonight For The First Time Pin
Roger Wright14-May-10 19:42
professionalRoger Wright14-May-10 19:42 
AnswerRe: So I Tried Graphics Tonight For The First Time Pin
AspDotNetDev14-May-10 20:09
protectorAspDotNetDev14-May-10 20:09 
Give this a try:
C#
namespace WindowsFormsApplication1
{

    // You need all these.
    using System;
    using System.Drawing;
    using System.Windows.Forms;


    // Code for main form.
    public partial class Form1 : Form
    {

        // Boilerplate code.
        public Form1()
        {
            InitializeComponent();
        }


        // The button was clicked.
        private void button1_Click(object sender, EventArgs e)
        {

            // Make sure you can see the circle.
            this.Width = 600;
            this.Height = 700;


            // Surface to draw on.
            Graphics g = this.CreateGraphics();


            // Color to draw with.
            Brush b = new SolidBrush(Color.Green);


            // Draw circle.
            g.FillEllipse(b, new Rectangle(0, 0, 500, 500));

        }

    }

}


Works for me. Also, I recommend WPF for graphics work. It's much nicer than Windows Forms.

AnswerRe: So I Tried Graphics Tonight For The First Time Pin
AspDotNetDev14-May-10 20:14
protectorAspDotNetDev14-May-10 20:14 
AnswerRe: So I Tried Graphics Tonight For The First Time Pin
Som Shekhar14-May-10 20:30
Som Shekhar14-May-10 20:30 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
AspDotNetDev14-May-10 21:01
protectorAspDotNetDev14-May-10 21:01 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
Pete O'Hanlon14-May-10 22:00
mvePete O'Hanlon14-May-10 22:00 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
OriginalGriff14-May-10 22:22
mveOriginalGriff14-May-10 22:22 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
Som Shekhar14-May-10 22:41
Som Shekhar14-May-10 22:41 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
OriginalGriff14-May-10 23:40
mveOriginalGriff14-May-10 23:40 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
Som Shekhar15-May-10 0:22
Som Shekhar15-May-10 0:22 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
Pete O'Hanlon15-May-10 5:55
mvePete O'Hanlon15-May-10 5:55 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
PIEBALDconsult15-May-10 5:00
mvePIEBALDconsult15-May-10 5:00 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
AspDotNetDev17-May-10 17:21
protectorAspDotNetDev17-May-10 17:21 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
OriginalGriff17-May-10 21:26
mveOriginalGriff17-May-10 21:26 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
AspDotNetDev17-May-10 21:33
protectorAspDotNetDev17-May-10 21:33 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
OriginalGriff17-May-10 21:49
mveOriginalGriff17-May-10 21:49 
AnswerRe: So I Tried Graphics Tonight For The First Time Pin
DaveyM6914-May-10 23:18
professionalDaveyM6914-May-10 23:18 
AnswerRe: So I Tried Graphics Tonight For The First Time Pin
Luc Pattyn15-May-10 2:18
sitebuilderLuc Pattyn15-May-10 2:18 
GeneralRe: So I Tried Graphics Tonight For The First Time Pin
Roger Wright15-May-10 4:46
professionalRoger Wright15-May-10 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.