Want to turn the letters on the label into image output
CodePudding user response:
Seems there is no direct function,
Can obtain the location of the label with size, put a piece of cut into the image
CodePudding user response:
Var
Cc: TControlCanvas;
BMP: TBitmap;
The begin
BMP:=TBitmap. Create;
Cc:=TControlCanvas. Create;
Try
Cc. Control:=Label1;
BMP. Width:=cc. Control. Width;
BMP. Height:=cc. Control. Height;
BitBlt (BMP. Canvas. Handle, 0, 0,
BMP. Width, BMP. Height, cc. Handle, 0, 0, SRCCOPY);
BMP. SaveToFile (' c: \ test. BMP);
The finally
Cc. Free;
BMP. Free;
end;
end;
CodePudding user response:
Sololie super severe,
This code from seemingly meaningless,
I was to write not to come out,
Finally even written, is also checked several web pages, repeatedly changed N times,
Too much too much
CodePudding user response:
So he is a cow people...
CodePudding user response: