ED
Size: a a a
ED
RS
{ NativeInt and NativeUInt are Delphi compatibility types. Even though Delphi
has IntPtr and UIntPtr, the Delphi documentation for NativeInt states that
'The size of NativeInt is equivalent to the size of the pointer on the
current platform'. Because of the misleading names, these types shouldn't be
used in the FPC RTL. Note that on i8086 their size changes between 16-bit
and 32-bit according to the memory model, so they're not really a 'native
int' type there at all. }
NativeInt = Type PtrInt;
NativeUInt = Type PtrUInt;
Int8 = ShortInt;
Int16 = SmallInt;
Int32 = Longint;
IntPtr = PtrInt;
UInt8 = Byte;
UInt16 = Word;
UInt32 = Cardinal;
UIntPtr = PtrUInt;
RS
procedure CreateScreenshot(aStream: TStream);
var
MyBitmap: TBitmap;
ScreenDC: HDC;
begin
ScreenDC := GetDC(0);
MyBitmap := TBitmap.Create;
try
MyBitmap.LoadFromDevice(ScreenDC);
MyBitmap.SaveToStream(aStream);
finally
MyBitmap.Free;
ReleaseDC(0,ScreenDC);
end;
end;
Она работает по умолчании в GUI приложении и удалось добится этого в консольном приложении, если добавить в зависимости LCL... I
RS
RS
I
RS
AS
AK
AS
AS
AK
I
AK
АВ
procedure CreateScreenshot(aStream: TStream);
var
MyBitmap: TBitmap;
ScreenDC: HDC;
begin
ScreenDC := GetDC(0);
MyBitmap := TBitmap.Create;
try
MyBitmap.LoadFromDevice(ScreenDC);
MyBitmap.SaveToStream(aStream);
finally
MyBitmap.Free;
ReleaseDC(0,ScreenDC);
end;
end;
Она работает по умолчании в GUI приложении и удалось добится этого в консольном приложении, если добавить в зависимости LCL... RS
АВ
RS
AS