FormExtensionsGetTitleBarBounds Method
Gets the titlebar bounds of the source Form.
Namespace: DevCase.Extensions.FormExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Rectangle GetTitleBarBounds(
this Form f,
bool includeBorderSizes
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function GetTitleBarBounds (
f As Form,
includeBorderSizes As Boolean
) As Rectangle
Dim f As Form
Dim includeBorderSizes As Boolean
Dim returnValue As Rectangle
returnValue = f.GetTitleBarBounds(includeBorderSizes)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static Rectangle GetTitleBarBounds(
Form^ f,
bool includeBorderSizes
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member GetTitleBarBounds :
f : Form *
includeBorderSizes : bool -> Rectangle
No code example is currently available or this language may not be supported.
- f Form
-
The source Form.
- includeBorderSizes Boolean
-
If , the titlebar bounds will include the bounds of the top, left and right border edges.
If , the titlebar bounds will NOT include the bounds of the top, left and right border edges.
Rectangle
The titlebar bounds (including the border sizes) of the source
Form.
In Visual Basic and C#, you can call this method as an instance method on any object of type
Form. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim titleBarBoundsWithBorders As Rectangle = GetTitleBarBounds(Me, includeBorderSizes:=True)
Console.WriteLine(String.Format("TitleBar Bounds (including borders) Width = {0}", titleBarBoundsWithBorders.Width))
Console.WriteLine(String.Format("TitleBar Bounds (including borders) Height = {0}", titleBarBoundsWithBorders.Height))
Console.WriteLine(String.Format("TitleBar Bounds (including borders) Pos. X = {0}", titleBarBoundsWithBorders.X))
Console.WriteLine(String.Format("TitleBar Bounds (including borders) Pos. Y = {0}", titleBarBoundsWithBorders.Y))
Dim titleBarBoundsWithoutBorders As Rectangle = GetTitleBarBounds(Me, includeBorderSizes:=False)
Console.WriteLine(String.Format("TitleBar Bounds (not including borders) Width = {0}", titleBarBoundsWithoutBorders.Width))
Console.WriteLine(String.Format("TitleBar Bounds (not including borders) Height = {0}", titleBarBoundsWithoutBorders.Height))
Console.WriteLine(String.Format("TitleBar Bounds (not including borders) Pos. X = {0}", titleBarBoundsWithoutBorders.X))
Console.WriteLine(String.Format("TitleBar Bounds (not including borders) Pos. Y = {0}", titleBarBoundsWithoutBorders.Y))
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.