nsaretro.blogg.se

Alpha controls delphi
Alpha controls delphi






  1. #Alpha controls delphi code#
  2. #Alpha controls delphi windows#

The most important value in the BorderIcons set is the biSystemMenu value. The BorderIcons property is a set property that specifies which icons appear on the title bar of the form. You can use the Position property to, for instance, place the form exactly where you want it to be, allow the operating system to place the form where it wants the form to be, or center the form on the screen. The Position property specifies the initial position of the form. To completely configure a form and make it look and work like you want it to, you usually have to modify three properties: BorderIcons, BorderStyle, and Position. If you really want to have an alpha-blended form in your application, you should only enable alpha blending on forms that are used a short period of time, like the splash screen or the application's About box. You should think twice before enabling alpha blending on the main form because such forms are slower and the user may have trouble seeing the contents of the form.

#Alpha controls delphi windows#

Besides using more resources, alpha-blended forms are only available in Windows NT 5.0 (Windows 2000) and later versions of the operating system.

Alpha controls delphi

When the AlphaBlendValue property is set to 255, the form is opaque when the AlphaBlendValue property is set to 0, the form is completely transparent.Īlpha-blended forms require more memory and more CPU power than standard forms. The AlphaBlendValue property accepts values in the 0 to 255 range. The value of the AlphaBlendValue property is only relevant if the AlphaBlend property is set to True. The AlphaBlend property specifies whether the form is translucent and is used in conjunction with the AlphaBlendValue property. Procedure TForm1.FormShow(Sender: TObject) begin Edit1.SetFocus end Listing 12-1: Assigning focus to a control To change the initial focus of a control using the SetFocus method, place the SetFocus call in the OnShow event of the form.

#Alpha controls delphi code#

You can also change the focus of a control in code by using the SetFocus method. To transfer the initial focus to the text box, select the Edit1 component from the drop-down list of the form's ActiveControl property.įigure 12-2: Assigning a control to an object property Operating systems that use visual styles to display controls use the visual style's custom image to identify a focused control. In previous versions of the Windows operating system, or in XP and later versions that use the Classic visual style, the control that has the focus usually displays a dotted rectangle on its surface. For instance, the form shown in Figure 12-1 is designed to acquire the user's name, but instead of the more important text box, the Add button has the focus.

Alpha controls delphi

When you add controls to the Designer Surface, the focus may be given to a control that doesn't need it at application startup. Only one control at a time can have the focus. When a control has focus, it can receive keyboard input.

Alpha controls delphi

The ActiveControl property can be used to specify which control should have the focus. This part of the chapter deals with properties and events of the TForm class that enhance the quality of the user interface, either visually or practically. Delphi's TForm class is an extremely powerful class that encapsulates an enormous number of properties, methods, and events. Forms are the most important container controls in VCL Forms applications because they represent main or secondary application windows and contain all other controls like buttons, images, and menus.








Alpha controls delphi