Show / Hide Table of Contents

Class OsdWindow

Transparent window that can be used for on-screen display. Derived classes on it can draw non-transparent text, rectangle, image, anything.

public abstract class OsdWindow : IDisposable

Namespace: Au.Types
Assembly: Au.dll
Inheritance
object
OsdWindow
osdRect
osdText

Properties

Name Description
ClickToClose

If true, the OSD window receive mouse messages. Only completely transparent areas don't. The user can click to close the OSD (left, right or middle button).

Hwnd

OSD window handle or default(wnd).

IsHandleCreated

Returns true if the OSD window is created.

Name

OSD window name. Optional, default null.

Opacity

Gets or sets the opacity of the OSD window, from 0 to 1. If 1, completely opaque. If 0, pixels of OsdWindow.TransparentColor are transparent, others opaque. If between 0 and 1, partially transparent.

Rect

Gets or sets OSD window size and position in screen.

Shadow

If true, the OSD window will have shadow.

TransparentColor

Gets or sets transparent color, default 0xF5F4F5. Pixels of this color will be transparent, unless OsdWindow.Opacity is not 0.

Visible

Gets or sets whether the OSD window is visible. The set function calls OsdWindow.Show (it creates OSD window if need) or OsdWindow.Hide (it does not destroy the OSD window).

Methods

Name Description
Close()

Destroys the OSD window.

Dispose()

Destroys the OSD window.

Dispose(bool)

Destroys the OSD window.

Hide()

Hides the OSD window. Does not destroy; use OsdWindow.Close or OsdWindow.Dispose for it. Does nothing if not created or not visible.

Invalidate()

Sets to redraw the OSD window later. Does nothing it is not created or not visible.

OnPaint(nint, Graphics, RECT)

Called when the OSD window must be drawn or redrawn. Derived classes should override this function and draw anything. Don't need to call base.OnPaint of OsdWindow, it does nothing.

Redraw()

Redraws the OSD window immediately. Does nothing it is not created or not visible.

Show()

Shows the OSD window. Creates if need.

WndProc(wnd, int, nint, nint)

Called when the OSD window receives a message. If your derived class overrides this function, it must call base.WndProc and return its return value, except when don't need default processing.

closeAll(string)

Closes all OSD windows of this process.