Click here to Skip to main content
15,889,200 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 23:40
Preetham.N17-Sep-08 23:40 
QuestionHow to Set Expiration Policy to an Application Object in ASP.Net Applciation? Pin
BhanuRegonda17-Sep-08 1:56
BhanuRegonda17-Sep-08 1:56 
AnswerRe: How to Set Expiration Policy to an Application Object in ASP.Net Applciation? Pin
N a v a n e e t h17-Sep-08 2:08
N a v a n e e t h17-Sep-08 2:08 
QuestionThreshold type control - calculating size Pin
Gareth H17-Sep-08 1:51
Gareth H17-Sep-08 1:51 
AnswerRe: Threshold type control - calculating size Pin
BhanuRegonda17-Sep-08 2:01
BhanuRegonda17-Sep-08 2:01 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 2:06
Gareth H17-Sep-08 2:06 
AnswerRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 3:33
Alan Balkany17-Sep-08 3:33 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 4:06
Gareth H17-Sep-08 4:06 
Alan,

I tried what you suggested, but i cannot see colours on the screen.

decimal total = yellow + orange + red;<br />
decimal yellowPerc = yellow / total;<br />
decimal orangePerc = orange / total;<br />
decimal redPerc = red / total;<br />
<br />
int width = 150;<br />
int height = 20;<br />
<br />
int x = 20;<br />
int y = 20;<br />
<br />
Size yellowSize = new Size((int)orangePerc * width, height);<br />
Rectangle yellowRectangle = new Rectangle(new Point(x, y), yellowSize);<br />
<br />
Size orangeSize = new Size((int)orangePerc * width, height);<br />
Point orangePoint = new Point(x + (int)orangePerc * width, y);<br />
Rectangle orangeRectangle = new Rectangle(orangePoint, orangeSize);<br />
<br />
Size redSize = new Size((int)redPerc * width, height);<br />
Point redPoint = new Point(x * (int)yellowPerc * width + (int)orangePerc * width, y);<br />
Rectangle redRectangle = new Rectangle(redPoint, redSize);


Thats the code i have used, minus the actual drawing.

Regards,
Gareth.

(FKA gareth111)

GeneralRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 4:40
Alan Balkany17-Sep-08 4:40 
GeneralRe: Threshold type control - calculating size Pin
Gareth H17-Sep-08 5:19
Gareth H17-Sep-08 5:19 
GeneralRe: Threshold type control - calculating size Pin
Alan Balkany17-Sep-08 5:26
Alan Balkany17-Sep-08 5:26 
QuestionLog Pin
ellllllllie17-Sep-08 1:20
ellllllllie17-Sep-08 1:20 
AnswerRe: Log Pin
N a v a n e e t h17-Sep-08 2:05
N a v a n e e t h17-Sep-08 2:05 
AnswerRe: Log [modified] Pin
Colin Angus Mackay17-Sep-08 2:06
Colin Angus Mackay17-Sep-08 2:06 
GeneralRe: Log Pin
Harvey Saayman17-Sep-08 8:09
Harvey Saayman17-Sep-08 8:09 
AnswerRe: Log Pin
nelsonpaixao17-Sep-08 12:51
nelsonpaixao17-Sep-08 12:51 
QuestionWindows service using C# Pin
Mohammed Hameed17-Sep-08 0:53
professionalMohammed Hameed17-Sep-08 0:53 
AnswerRe: Windows service using C# Pin
Manas Bhardwaj17-Sep-08 1:21
professionalManas Bhardwaj17-Sep-08 1:21 
GeneralRe: Windows service using C# Pin
Mohammed Hameed17-Sep-08 1:56
professionalMohammed Hameed17-Sep-08 1:56 
AnswerRe: Windows service using C# Pin
#realJSOP17-Sep-08 4:39
mve#realJSOP17-Sep-08 4:39 
GeneralRe: Windows service using C# Pin
Mohammed Hameed18-Sep-08 23:58
professionalMohammed Hameed18-Sep-08 23:58 
AnswerRe: Windows service using C# Pin
PIEBALDconsult17-Sep-08 6:37
mvePIEBALDconsult17-Sep-08 6:37 
GeneralRe: Windows service using C# Pin
Mohammed Hameed18-Sep-08 23:59
professionalMohammed Hameed18-Sep-08 23:59 
GeneralRe: Windows service using C# Pin
PIEBALDconsult19-Sep-08 5:20
mvePIEBALDconsult19-Sep-08 5:20 
QuestionExport single Pages from a .indd file Pin
frostii17-Sep-08 0:50
frostii17-Sep-08 0:50 

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.