Click here to Skip to main content
15,899,474 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple Instance Error Msg Pin
Dave Kreskowiak8-Jul-05 5:42
mveDave Kreskowiak8-Jul-05 5:42 
GeneralRe: Simple Instance Error Msg Pin
Stefan Troschuetz8-Jul-05 5:51
Stefan Troschuetz8-Jul-05 5:51 
GeneralRe: Simple Instance Error Msg Pin
zaboboa8-Jul-05 6:14
zaboboa8-Jul-05 6:14 
GeneralRe: Simple Instance Error Msg Pin
Stefan Troschuetz8-Jul-05 9:40
Stefan Troschuetz8-Jul-05 9:40 
GeneralObject Inheritance Pin
heistgonewrong8-Jul-05 4:48
heistgonewrong8-Jul-05 4:48 
GeneralRe: Object Inheritance Pin
therealmccoy8-Jul-05 5:33
therealmccoy8-Jul-05 5:33 
GeneralRe: Object Inheritance Pin
S. Senthil Kumar8-Jul-05 5:46
S. Senthil Kumar8-Jul-05 5:46 
GeneralOut of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 4:21
Alex Cutovoi8-Jul-05 4:21 
Hello fellows

I have a strange problem:

I'm calling a method called DrawXorCircle in my C# application.
When I pass the graphics object of my PaintEventArgs to my Graphics object, appears the following error: "Out of Memory"
In the form class I've create a Draw variable, that I assign to the object "Desenho", created in my form's Paint event
What is happening? Thanks a lot for help
Below, my code:

private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Draw Desenho = new Draw(e);
Reta = Desenho;
}
public class Draw
{
Pen pColor = new Pen(Color.Blue);
private PaintEventArgs pDes;
public Draw(PaintEventArgs e)
{
pDes = e;
}
public void DrawXorCircle(string sCoordinate)
{
Graphics g = pDes.Graphics;
int iPos = sCoordinate.IndexOf(",");
int iX = int.Parse((sCoordinate.Substring(0,iPos-1)));
int iY = int.Parse((sCoordinate.Remove(0, int.Parse(sCoordinate.Substring(0, iPos)))));
Point p1 = new Point(iX, iY);
Point p2 = new Point(iX+4, iY+4);
g.DrawLine(pColor,p1,p2);
}
}
GeneralRe: Out of Memory when I Drawing Pin
leppie8-Jul-05 4:24
leppie8-Jul-05 4:24 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 6:42
Alex Cutovoi8-Jul-05 6:42 
GeneralRe: Out of Memory when I Drawing Pin
leppie8-Jul-05 6:50
leppie8-Jul-05 6:50 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi8-Jul-05 9:54
Alex Cutovoi8-Jul-05 9:54 
GeneralRe: Out of Memory when I Drawing Pin
Guffa8-Jul-05 10:41
Guffa8-Jul-05 10:41 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi9-Jul-05 6:32
Alex Cutovoi9-Jul-05 6:32 
GeneralRe: Out of Memory when I Drawing Pin
Alex Cutovoi9-Jul-05 6:32
Alex Cutovoi9-Jul-05 6:32 
GeneralS.M.A.R.T. Support Pin
bernardoh8-Jul-05 4:16
bernardoh8-Jul-05 4:16 
GeneralRe: S.M.A.R.T. Support Pin
leppie8-Jul-05 4:22
leppie8-Jul-05 4:22 
GeneralRe: S.M.A.R.T. Support Pin
bernardoh8-Jul-05 4:25
bernardoh8-Jul-05 4:25 
QuestionHow can I delete multiple items from collection? Pin
Tesic Goran8-Jul-05 3:58
professionalTesic Goran8-Jul-05 3:58 
AnswerRe: How can I delete multiple items from collection? Pin
leppie8-Jul-05 4:20
leppie8-Jul-05 4:20 
GeneralRe: How can I delete multiple items from collection? Pin
Tesic Goran8-Jul-05 4:26
professionalTesic Goran8-Jul-05 4:26 
GeneralRe: How can I delete multiple items from collection? Pin
S. Senthil Kumar8-Jul-05 5:50
S. Senthil Kumar8-Jul-05 5:50 
AnswerRe: How can I delete multiple items from collection? Pin
Sean Michael Murphy8-Jul-05 7:14
Sean Michael Murphy8-Jul-05 7:14 
GeneralDockable Tool Windows Pin
PatteOne8-Jul-05 3:47
PatteOne8-Jul-05 3:47 
Generalhelp for adding com component Pin
arusmemon8-Jul-05 3:33
arusmemon8-Jul-05 3:33 

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.