On 09/02/2008, Hess, Philip J <[EMAIL PROTECTED]> wrote: > > This console app runs okay on Delphi. Is there something I'm missing here > or is this just not possible with Lazarus?
You do not get true console applications under Windows, because all windows installations have a GUI installed. You can access for example the clipboard in a console application under Windows, but you can't under a true Linux console application. You will have to implement the color conversion yourself. Below is some code I use in fpGUI. Just remember that in fpGUI the TfpgColor type is define as RRGGBB, but under Delphi (and Lazarus) TColor is defined as BBGGRR due to Windows. function fpgColorToRGBTriple(const AColor: TfpgColor): TRGBTriple; begin with Result do begin Red := fpgGetRed(AColor); Green := fpgGetGreen(AColor); Blue := fpgGetBlue(AColor); // Alpha := fpgGetAlpha(AColor); end end; function RGBTripleTofpgColor(const AColor: TRGBTriple): TfpgColor; begin Result := AColor.Blue or (AColor.Green shl 8) or (AColor.Red shl 16);// or (AColor.Alpha shl 32); end; function fpgGetRed(const AColor: TfpgColor): word; begin // AARRGGBB format Result := Word((AColor shr 16) and $FF); end; function fpgGetGreen(const AColor: TfpgColor): word; begin // AARRGGBB format Result := Word((AColor shr 8) and $FF); end; function fpgGetBlue(const AColor: TfpgColor): word; begin // AARRGGBB format Result := Word(AColor and $FF); end; Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives