Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralMDI child can't close itself Pin
Luis Alonso Ramos8-Jul-05 9:00
Luis Alonso Ramos8-Jul-05 9:00 
GeneralRe: MDI child can't close itself Pin
Snowblind379-Jul-05 8:24
Snowblind379-Jul-05 8:24 
GeneralRe: MDI child can't close itself Pin
Luis Alonso Ramos9-Jul-05 9:54
Luis Alonso Ramos9-Jul-05 9:54 
GeneralRe: MDI child can't close itself Pin
Snowblind379-Jul-05 11:20
Snowblind379-Jul-05 11:20 
Questionbest way to connect to a database? Pin
Jassim Rahma8-Jul-05 7:32
Jassim Rahma8-Jul-05 7:32 
AnswerRe: best way to connect to a database? Pin
breen258-Jul-05 8:47
breen258-Jul-05 8:47 
GeneralSimple Instance Error Msg Pin
zaboboa8-Jul-05 5:32
zaboboa8-Jul-05 5:32 
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 

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.