Impactnetworking


Borland C ++ Builder FAQ
The content The last update: 14.02.2004

How to "wink" my icon in the Task bar (TaskBar)?

The author: OlegGG
The initial link: - - -

Once so:
FlashWindow (Application-> Handle, true); 
And if it is necessary to "blink" permanently to allocate on the form the timer (TTimer), and in its output agent of event OnTimer to write:
FlashWindow (Application-> Handle, false); 
FlashWindow (Application-> Handle, true); 

How to make on the button a multiline inscription?

The author: KAV

SetWindowLong (Button1-> Handle, GWL_STYLE, GetWindowLong (Button1-> Handle, GWL_STYLE) |BS_MULTILINE);  
Button1-> Caption = "a\nlot\nof\nstrings";  

How to replace color progres bar?

The author: KAV
The initial link: - - -

The red:
PostMessage (ProgressBar1-> Handle, 0x0409,0, clRed);  
To make its other color, it is necessary, accordingly, instead of clRed to write something another ;)

How to make, that on pushing Enter the following component (as well as on таб) was activated?

The author: OlegGG

We put property of form KeyPreview in true.
And in OnKeyUp forms we write:
if (Key == VK_RETURN) 
        { 
        Form1-> Perform (WM_NEXTDLGCTL, 0, 0); 
        }

How to make a translucent window?

The author: OlegGG

In 9x this piece is not provided. There it can be made "pens", but thus the program will "guzzle" many resources. But in ruler NT, since 2000, it can be made.

Example (the window will be smoothly shown):
SetWindowLong (Handle, GWL_EXSTYLE, GetWindowLong (Handle, GWL_EXSTYLE) | WS_EX_LAYERED); 
for (int x = 0; x <255; x + = 5) 
        { 
        SetLayeredWindowAttributes (Handle, 0, x, LWA_ALPHA); 
        Application-> ProcessMessages (); 
        Sleep (1); 
        }
SetLayeredWindowAttributes (Handle, 0, 255, LWA_ALPHA); 
Since a C ++ Builder 6, in properties of the form appeared AlphaBlend and AlphaBlendValue.
Here all is easier: we put AlphaBlend in true, and then we play about with value AlphaBlendValue.