TMlSkinNCImage

An image on the title bar, usually the application icon or logo.

Category
Title-bar controls
Unit
uMlSkinNCImage.pas
Inherits from
TMlSkinNCCtrlBase

Notes

  • Picture takes an image resource ID or an image file path.
  • For a decorative image, turn CaptureMouse off so mouse events pass through to the title bar and still drag the window.

Example

From the demo MlSkin.Demo.360云盘.v3.0 (.dfm form file)

object mlskncmg1: TMlSkinNCImage
  Pos.Align = caLeft
  Pos.XValue = 14
  Pos.YValue = 14
  Pos.UseDefault = False
  Picture = '.\Res\t011b73265384c4cc02.png'
  Left = 401
  Top = 112
end

Properties 2

NameTypeDefaultDescription
PictureTMlResIDThe image to display, given as a resource ID or an image file path.
CaptureMouseBooleanTrueWhether the image receives mouse events. For a purely decorative icon, turn it off so the mouse passes through to the title bar.
Properties of TMlSkinNCCtrlBase 6
NameTypeDefaultDescription
AboutTMlAboutInfoA design-time property: double-clicking it in the Object Inspector opens the MLSkin about box with the component version. It has no effect at run time and is not stored in the .dfm.
PutSideTSideKindskdTopWhich edge of the non-client area the control sits on: skdTop, skdBottom, skdLeft or skdRight.
TagInteger0A spare integer for your own bookkeeping; the component itself does not use it.
PosTNCCtrlPosPosition along that edge: an alignment plus X/Y offsets. With UseDefault on, the default layout is used.
HintstringTooltip text shown when the mouse rests on the control.
VisibleBooleanTrueWhether the control is visible.
Events of TMlSkinNCCtrlBase 5
NameTypeDefaultDescription
OnLMouseDownTNotifyEventFires when the left mouse button goes down on the control.
OnLMouseUpTNotifyEventFires when the left mouse button is released on the control.
OnMouseEnterTNotifyEventFires when the mouse enters the control.
OnMouseLeaveTNotifyEventFires when the mouse leaves the control.
OnDPIChangedTMlDPIChangedEventFires when the screen DPI changes, for example when the window moves to a monitor with a different scaling — a good place to re-adjust anything you draw yourself.

Only the properties and events MLSkin adds are listed here. Standard VCL properties such as Align, Anchors, Font and OnClick are available too and behave exactly as on the stock controls.

Offline helpA PDF / CHM version is available for offline reading.