Click here to Skip to main content
15,905,427 members
Home / Discussions / C#
   

C#

 
AnswerRe: passing bitmap data between managed and unmanaged code Pin
DaveyM6915-May-10 5:01
professionalDaveyM6915-May-10 5:01 
AnswerRe: passing bitmap data between managed and unmanaged code Pin
Luc Pattyn15-May-10 5:49
sitebuilderLuc Pattyn15-May-10 5:49 
AnswerRe: passing bitmap data between managed and unmanaged code Pin
Hristo-Bojilov15-May-10 7:48
Hristo-Bojilov15-May-10 7:48 
GeneralRe: passing bitmap data between managed and unmanaged code Pin
Luc Pattyn15-May-10 9:26
sitebuilderLuc Pattyn15-May-10 9:26 
Questionmodifying the bitmap image Pin
sursangeetha14-May-10 22:38
sursangeetha14-May-10 22:38 
AnswerRe: modifying the bitmap image Pin
OriginalGriff15-May-10 0:47
mveOriginalGriff15-May-10 0:47 
AnswerRe: modifying the bitmap image Pin
MafiaMoe15-May-10 22:08
MafiaMoe15-May-10 22:08 
QuestionSetting folder access rights for specific user Pin
Chesnokov Yuriy14-May-10 21:27
professionalChesnokov Yuriy14-May-10 21:27 
AnswerRe: Setting folder access rights for specific user Pin
DaveyM6914-May-10 23:24
professionalDaveyM6914-May-10 23:24 
QuestionRe: Setting folder access rights for specific user Pin
Chesnokov Yuriy15-May-10 4:27
professionalChesnokov Yuriy15-May-10 4:27 
AnswerRe: Setting folder access rights for specific user Pin
DaveyM6915-May-10 4:45
professionalDaveyM6915-May-10 4:45 
Questionremoving the changes done to an image Pin
sursangeetha14-May-10 21:16
sursangeetha14-May-10 21:16 
AnswerRe: removing the changes done to an image Pin
Richard MacCutchan14-May-10 21:34
mveRichard MacCutchan14-May-10 21:34 
AnswerRe: removing the changes done to an image Pin
riced15-May-10 0:43
riced15-May-10 0:43 
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 

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.