TImage.Bitmap fade out
Put a TImage (Image1) on a Delphi form and load a bitmap of 24 bits or 32 bits in it; put a TButton (Button1) and put this code in its OnClick event:
Put a TImage (Image1) on a Delphi form and load a bitmap of 24 bits or 32 bits in it; put a TButton (Button1) and put this code in its OnClick event:
This canvas class allows you to access the Windows Desktop,and draw on it.
Put a TColorDialog (ColorDialog1),a TLabel (Label1) and a TButton (Button1) in your form,and assign the Button1.OnClick procedure as follows:
TBitBtn and TSpeedButton accept only BMP pictures, if you have some other picture format, like ICO or JPG, (in an Image component) you want to show as a Glyph, you'll need to "transform" it to Bitmap, here's how:
Here is an example of text output that is rotated 45 degrees:
Here's how to draw tiled bitmap image on a Form:
This solution checks how many times you cross a line to pass from point X,Y to the edge of the polygon….
You can easily convert a BMP image to a JPG (JPEG) image: .
Here's one approach to drawing a lasso rectangle using Delphi:1.In the OnMouseDown event for the form that you are 'lasso-ing' controls on:2.In the OnMouseMove event for the form….3.In the OnMouseUp event for the form….4.The DrawMarquee procedure….
This example uses an averaging mechanism to obtain grayscale intensity on a pixel-by-pixel basis.Specifically,it averages the Red,Green and Blue component values of a color and assigns that value back to each RGB component. Usage:Here's the source code can...
The DrawCursor procedure draws a current cursor image on ACanvas at the Position point: .
Many Windows API functions return a HIcon value (handle to Icon).Here's how to "convert" a HIcon to TIcon (object).For example,when using ExtractIcon to get icon from file,the resulting value is of the HICON type.The answer is: Create a TIcon object and as...
This tip shows how to extract the associated icon and draw it into a small area of the form (e.g.Notepad icon)?.
Here's how to draw transparent text on the Windows Desktop:
If you have an icon file (ICO) and want to convert it to a bitmap image,use the following code:
Here's a piece of Delphi code capable of capturing the Windows Desktop image into a TBitmap object: .
Cutting a graphic to the Clipboard is like copying it,but you also erase the graphic from the source.
Here are two simple functions to convert color values from TColor to Hex (HTML) and vice versa:function TColorToHex(Color : TColor) : string;begin Result := IntToHex(GetRValue(Color), 2) + IntToHex(GetGValu...
Here's how to rotate a TBitmap at any angle:
In C# the foreach statement repeats a group of embedded statements for each element in an array or an object collection. Delphi 8 does not have an eqivalent of the foreach statement. Let's see how to code a foreach statement in Delphi...First, here's a sim...
If you need to convert pixel value to millimeters (inches,centimeters,etc.) use the code provided here.The code uses the API function GetDeviceCaps to get the metrics you need.