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

C#

 
AnswerRe: Setting where Forms should show [modified] Pin
Rei Miyasaka29-May-06 10:37
Rei Miyasaka29-May-06 10:37 
QuestionAdd node to TreeList Pin
Dima Filipiuk29-May-06 9:24
Dima Filipiuk29-May-06 9:24 
AnswerRe: Add node to TreeList Pin
leppie29-May-06 12:54
leppie29-May-06 12:54 
QuestionCan not use INSERT INTO for Date/Time Variable? Pin
surasaku29-May-06 8:57
surasaku29-May-06 8:57 
AnswerRe: Can not use INSERT INTO for Date/Time Variable? Pin
Christopher Duncan29-May-06 9:55
Christopher Duncan29-May-06 9:55 
AnswerRe: Can not use INSERT INTO for Date/Time Variable? Pin
Guffa29-May-06 10:01
Guffa29-May-06 10:01 
AnswerRe: Can not use INSERT INTO for Date/Time Variable? Pin
Guffa1-Jun-06 11:55
Guffa1-Jun-06 11:55 
QuestionUsing PathGradientBrush Pin
JuanAlbertoMD29-May-06 8:33
JuanAlbertoMD29-May-06 8:33 
Hello!

I have this code:

GraphicsPath path1 = new GraphicsPath();
path1.AddEllipse(10,10,100,100);
PathGradientBrush brush1 = new PathGradientBrush(path1);
brush1.CenterColor = Color.White;
Color[] colorArray2 = new Color[] { ScaleColor(Color.White, 0.25f) };
Color[] colorArray1 = colorArray2;
brush1.SurroundColors = colorArray1;
-----------------------------------------------------------------------------------
public static Color ScaleColor(Color sourceColor, float scale)
{
int num1 = (int)(sourceColor.R * scale);
int num2 = (int)(sourceColor.G * scale);
int num3 = (int)(sourceColor.B * scale);
if (num1 > 0xff)
{
num1 = 0xff;
}
if (num2 > 0xff)
{
num2 = 0xff;
}
if (num3 > 0xff)
{
num3 = 0xff;
}
return Color.FromArgb(num1, num2, num3);
}
---------------------------------------------------------------------------------------


this works fine but when i change the size of the ellipse and the width or height is zero my project shows an exception : Out of memory

Somebody knows why this happen or why can i do to fix this?

Regards,
Alberto Martinez
QuestionHow to send e-mail Pin
ventomito29-May-06 7:39
ventomito29-May-06 7:39 
AnswerRe: How to send e-mail Pin
Guffa29-May-06 8:13
Guffa29-May-06 8:13 
GeneralRe: How to send e-mail Pin
ventomito29-May-06 8:31
ventomito29-May-06 8:31 
GeneralRe: How to send e-mail Pin
Christopher Duncan29-May-06 10:01
Christopher Duncan29-May-06 10:01 
QuestionClick event on a user control Pin
Ista29-May-06 7:07
Ista29-May-06 7:07 
QuestionCollision Detection Using Regions [modified] Pin
Tristan Rhodes29-May-06 7:02
Tristan Rhodes29-May-06 7:02 
Questionattach a database to sql Pin
shabonaa29-May-06 6:24
shabonaa29-May-06 6:24 
AnswerRe: attach a database to sql Pin
Colin Angus Mackay29-May-06 6:48
Colin Angus Mackay29-May-06 6:48 
QuestionConvert Image to byte[] Pin
hung_ngole29-May-06 5:41
hung_ngole29-May-06 5:41 
AnswerRe: Convert Image to byte[] Pin
A.A.29-May-06 6:42
A.A.29-May-06 6:42 
QuestionName property in PropertyGrid Pin
navin.tirodkar29-May-06 5:27
navin.tirodkar29-May-06 5:27 
QuestionSynchronizing the calls to a function Pin
coolestCoder29-May-06 5:12
coolestCoder29-May-06 5:12 
AnswerRe: Synchronizing the calls to a function [modified] Pin
Ravi Bhavnani29-May-06 5:32
professionalRavi Bhavnani29-May-06 5:32 
GeneralRe: Synchronizing the calls to a function Pin
Guffa29-May-06 8:18
Guffa29-May-06 8:18 
Questionproblem with compiling C++ files Pin
e_LA29-May-06 4:45
e_LA29-May-06 4:45 
AnswerRe: Cannot show class methods in another class Pin
Sean Michael Murphy29-May-06 4:35
Sean Michael Murphy29-May-06 4:35 
QuestionURL Verifiaction Pin
AnnnS29-May-06 4:02
AnnnS29-May-06 4:02 

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.