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

C#

 
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 
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 
Alan,

Ye, I had a look in my trace statements and the percentages were zero. So I changed my code to cast the percentages to int's in the Size/Point constructors. eg:

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((int)(x + 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((int)(x * yellowPerc * width + orangePerc * width), y);<br />
Rectangle redRectangle = new Rectangle(redPoint, redSize);


The yellow and orange block were displayed but not red, but were the same size.
I am not 100% sure you have understood want I want, as I do not want proportions - which from the perc * width, it looks like that's what you think I want.

It should be like a ruler. I think that's the best way of explaining it. So, the ruler is 10 long (red == 10), and you have sections of yellow (5) and orange (8).

Hope that helps.

Regards,
Gareth.

(FKA gareth111)

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 
Questionevent id for system reboot Pin
George_George17-Sep-08 0:44
George_George17-Sep-08 0:44 
QuestionReading csv file into a dataTable Pin
Muammar©17-Sep-08 0:38
Muammar©17-Sep-08 0:38 

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.