Click here to Skip to main content
15,922,166 members
Home / Discussions / C#
   

C#

 
GeneralRe: Help with unsafe code ( array of pointer to a stucture) Pin
Preetham.N17-Sep-08 3:50
Preetham.N17-Sep-08 3:50 
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 
In the control's Paint-event handler:

1. Get the sum of the three controls. In your example sum = 5 + 8 + 10 = 23.

2. Get the percentage of the total for each color: yp = 5 / 23, etc...

3. Get the bounds of your YOR control: (x, y) Location, Width, and Height.

4. Draw the three colors:

a) Draw a solid yellow rectangle at (x, y), yp * Width, Height

b) Draw a solid orange rectangle at (x + yp * Width, y), op * Width, Height.

c) Draw a solid red rectangle at (x * yp * Width + op * Width), rp * Width, Height.
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 
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
professional#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 

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.