Click here to Skip to main content
15,906,624 members
Home / Discussions / C#
   

C#

 
Questionan update problem Pin
Seraph_summer24-Oct-07 3:14
Seraph_summer24-Oct-07 3:14 
AnswerRe: an update problem Pin
Anthony Mushrow24-Oct-07 3:50
professionalAnthony Mushrow24-Oct-07 3:50 
GeneralRe: an update problem Pin
Seraph_summer24-Oct-07 3:58
Seraph_summer24-Oct-07 3:58 
AnswerRe: an update problem Pin
c0ax_lx24-Oct-07 4:10
c0ax_lx24-Oct-07 4:10 
GeneralRe: an update problem Pin
Seraph_summer24-Oct-07 4:19
Seraph_summer24-Oct-07 4:19 
GeneralRe: an update problem Pin
Seraph_summer24-Oct-07 4:34
Seraph_summer24-Oct-07 4:34 
GeneralRe: an update problem Pin
c0ax_lx24-Oct-07 4:37
c0ax_lx24-Oct-07 4:37 
GeneralRe: an update problem Pin
Seraph_summer24-Oct-07 4:44
Seraph_summer24-Oct-07 4:44 
sorry, I mean if I plot in a form, it does work, but if I plot in a panel (I use splitcontainer) how to make it work.

///////////////////////////////////////////////////////////////////////////////////
for example: plot in a form: (it works)

using System.Drawing;
using System.Drawing.Drawing2D;

namespace GDI__Test
{
public class Form1 : Form
{
private GraphicsPath _oShape;
private Pen _oPen;
private SolidBrush _oBrush;

public Form1()
{
base.SetStyle(ControlStyles.DoubleBuffer, true);
base.SetStyle(ControlStyles.UserPaint, true);
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);

_oShape = new GraphicsPath();
_oPen = new Pen(Color.Black, 2.0F);
_oBrush = new SolidBrush(Color.Yellow);
}

private void Form1_MouseMove(object sender, MouseEventArgs e)
{
_oShape.Dispose();
_oShape = new GraphicsPath();
_oShape.AddEllipse(e.X, e.Y, 100, 150);
_oShape.CloseFigure();

this.Invalidate();
}

private void Form1_Paint(object sender, PaintEventArgs e)
{

Graphics loGraphics = e.Graphics;

loGraphics.SmoothingMode = SmoothingMode.AntiAlias;
loGraphics.FillPath(_oBrush, _oShape);
loGraphics.DrawPath(_oPen, _oShape);
}

}
}

////////////////////////////////////////////////////////////////////
//plot in the panel: (it does not work!)

...

private void splitContainer1_Panel2_Paint(object sender, PaintEventArgs e) {

Graphics loGraphics = e.Graphics;

loGraphics.SmoothingMode = SmoothingMode.AntiAlias;
loGraphics.FillPath(_oBrush, _oShape);
loGraphics.DrawPath(_oPen, _oShape);
}

GeneralRe: an update problem Pin
c0ax_lx24-Oct-07 8:23
c0ax_lx24-Oct-07 8:23 
GeneralRe: an update problem Pin
Seraph_summer24-Oct-07 21:37
Seraph_summer24-Oct-07 21:37 
QuestionHow to enable/disable(install/uninstall) serial port in C#? [modified] Pin
nasif400324-Oct-07 3:07
nasif400324-Oct-07 3:07 
AnswerRe: How to enable/disable(install/uninstall) serial port in C#? Pin
ScottM124-Oct-07 4:12
ScottM124-Oct-07 4:12 
QuestionWhat is the proper way to send emails? Pin
Tomz_KV24-Oct-07 2:50
Tomz_KV24-Oct-07 2:50 
AnswerRe: What is the proper way to send emails? Pin
Anthony Mushrow24-Oct-07 2:56
professionalAnthony Mushrow24-Oct-07 2:56 
AnswerRe: What is the proper way to send emails? Pin
Justin Perez24-Oct-07 3:01
Justin Perez24-Oct-07 3:01 
GeneralRe: What is the proper way to send emails? Pin
Anthony Mushrow24-Oct-07 3:48
professionalAnthony Mushrow24-Oct-07 3:48 
GeneralRe: What is the proper way to send emails? Pin
Justin Perez24-Oct-07 3:53
Justin Perez24-Oct-07 3:53 
AnswerRe: What is the proper way to send emails? Pin
Mike Dimmick24-Oct-07 5:38
Mike Dimmick24-Oct-07 5:38 
QuestionActivex control registeration problem Pin
mayoya8524-Oct-07 2:01
mayoya8524-Oct-07 2:01 
QuestionC# desperately need helps [modified] Pin
Mohd. Firdaus24-Oct-07 1:43
Mohd. Firdaus24-Oct-07 1:43 
AnswerRe: C# desperately need helps Pin
J4amieC24-Oct-07 1:46
J4amieC24-Oct-07 1:46 
AnswerHint Pin
CPallini24-Oct-07 1:54
mveCPallini24-Oct-07 1:54 
AnswerRe: C# desperately need helps Pin
Professor Sharada Ulhas24-Oct-07 4:34
Professor Sharada Ulhas24-Oct-07 4:34 
GeneralRe: C# desperately need helps Pin
J4amieC24-Oct-07 4:43
J4amieC24-Oct-07 4:43 
GeneralRe: C# desperately need helps Pin
Mohd. Firdaus26-Oct-07 2:47
Mohd. Firdaus26-Oct-07 2:47 

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.