Click here to Skip to main content
15,904,926 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Tumbnail algorithm Pin
Giorgi Dalakishvili14-Sep-07 0:54
mentorGiorgi Dalakishvili14-Sep-07 0:54 
GeneralRe: Tumbnail algorithm Pin
martin_hughes14-Sep-07 1:30
martin_hughes14-Sep-07 1:30 
GeneralRe: Tumbnail algorithm Pin
Giorgi Dalakishvili14-Sep-07 1:35
mentorGiorgi Dalakishvili14-Sep-07 1:35 
Questionconversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 0:28
professionalTom Deketelaere13-Sep-07 0:28 
AnswerRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 1:36
sitebuilderLuc Pattyn13-Sep-07 1:36 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 1:43
professionalTom Deketelaere13-Sep-07 1:43 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:00
sitebuilderLuc Pattyn13-Sep-07 2:00 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 2:13
professionalTom Deketelaere13-Sep-07 2:13 
well we are working with a component (datawindows) and in order to get that component to display the same color as was picked in .NET we need to convert them (that is what the above code does).
But now I have to display the color that has been saved to the db (in this converted state) in .NET. And that is where I'm stuck.
The problem is that I can't get the RGB and A extracted back from the converted integer
maybe an example would help

I used the color red for this one:

color.toargb(color.red) = -65536

put red true the conversion for the component and we get: 255
conversion: (255-255)+(256*(255-0))+(256*256*(255-0)) = 16776960
16777215-16776960=255

now getting the number in bold back isn't a problem the problem is that I don't know how to get R,G and B back from the above formula.

once I have these it's indeed a simply putting them thru the fromargb methode

hope this clears things up a bit

If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistaks.

GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 2:36
sitebuilderLuc Pattyn13-Sep-07 2:36 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:08
professionalTom Deketelaere13-Sep-07 3:08 
GeneralRe: conversion color - hexnumber - color Pin
Luc Pattyn13-Sep-07 3:18
sitebuilderLuc Pattyn13-Sep-07 3:18 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 3:26
professionalTom Deketelaere13-Sep-07 3:26 
GeneralRe: conversion color - hexnumber - color Pin
Tim Craig13-Sep-07 18:21
Tim Craig13-Sep-07 18:21 
GeneralRe: conversion color - hexnumber - color Pin
Tom Deketelaere13-Sep-07 20:46
professionalTom Deketelaere13-Sep-07 20:46 
AnswerRe: conversion color - hexnumber - color Pin
Jeremy Falcon25-Sep-07 8:45
professionalJeremy Falcon25-Sep-07 8:45 
QuestionDinamyc priority asignation Pin
Nelek12-Sep-07 4:18
protectorNelek12-Sep-07 4:18 
AnswerRe: Dinamyc priority asignation Pin
Russell'13-Sep-07 6:54
Russell'13-Sep-07 6:54 
GeneralRe: Dinamyc priority asignation Pin
Nelek13-Sep-07 22:52
protectorNelek13-Sep-07 22:52 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 0:02
Russell'14-Sep-07 0:02 
GeneralRe: Dinamyc priority asignation Pin
Nelek14-Sep-07 0:51
protectorNelek14-Sep-07 0:51 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 1:07
Russell'14-Sep-07 1:07 
GeneralRe: Dinamyc priority asignation Pin
Nelek14-Sep-07 1:51
protectorNelek14-Sep-07 1:51 
GeneralRe: Dinamyc priority asignation Pin
Russell'14-Sep-07 2:17
Russell'14-Sep-07 2:17 
GeneralRe: Dinamyc priority asignation Pin
Nelek25-Sep-07 2:17
protectorNelek25-Sep-07 2:17 
GeneralRe: Dinamyc priority asignation Pin
Russell'25-Sep-07 3:03
Russell'25-Sep-07 3:03 

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.