Search Results for

    Show / Hide Table of Contents

    Class BaseForm

    Base class for all forms.

    Inheritance
    System.Object
    System.MarshalByRefObject
    System.ComponentModel.Component
    System.Windows.Forms.Control
    System.Windows.Forms.ScrollableControl
    System.Windows.Forms.ContainerControl
    System.Windows.Forms.Form
    BaseForm
    WebBrowserForm
    DesignerForm
    BaseDialogForm
    ProgressForm
    SplashForm
    WelcomeForm
    Namespace: FastReport.Forms
    Assembly: FastReport.dll
    Syntax
    public class BaseForm : Form, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl

    Constructors

    BaseForm()

    Initializes a new instance of the BaseForm class.

    Declaration
    public BaseForm()

    Properties

    CanSaveRestoreState

    Gets or sets value indicating that the form can save/restore the state such as location and size.

    Declaration
    public bool CanSaveRestoreState { get; set; }
    Property Value
    Type Description
    System.Boolean

    NewDpi

    Declaration
    protected int NewDpi { get; }
    Property Value
    Type Description
    System.Int32

    Storage

    Gets the form's storage service.

    Declaration
    public FormStorageService Storage { get; }
    Property Value
    Type Description
    FormStorageService

    Methods

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    Overrides
    System.Windows.Forms.Form.Dispose(System.Boolean)

    GetImage(Int32)

    Convenience method returns an image with specified index for this form's dpi.

    Declaration
    public Bitmap GetImage(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Image index.

    Returns
    Type Description
    System.Drawing.Bitmap

    The image.

    GetImage(String)

    Convenience method returns an image with specified name for this form's dpi.

    Declaration
    public Bitmap GetImage(string resource)
    Parameters
    Type Name Description
    System.String resource

    Image resource name.

    Returns
    Type Description
    System.Drawing.Bitmap

    The image.

    GetImages()

    Convenience method returns an imagelist for this form's dpi.

    Declaration
    public ImageList GetImages()
    Returns
    Type Description
    System.Windows.Forms.ImageList

    The imagelist.

    Localize()

    Localizes the dialog controls.

    Declaration
    public virtual void Localize()
    Remarks

    Use this method to set control's captions specific to the current locale.

    OnFormClosed(FormClosedEventArgs)

    Declaration
    protected override void OnFormClosed(FormClosedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.FormClosedEventArgs e
    Overrides
    System.Windows.Forms.Form.OnFormClosed(System.Windows.Forms.FormClosedEventArgs)

    OnLoad(EventArgs)

    Declaration
    protected override void OnLoad(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    System.Windows.Forms.Form.OnLoad(System.EventArgs)

    RestoreState()

    Restores the form's state.

    Declaration
    protected virtual void RestoreState()

    SaveState()

    Saves the form's state.

    Declaration
    protected virtual void SaveState()

    UpdateDpiDependencies()

    Update controls on dpi change.

    Declaration
    public virtual void UpdateDpiDependencies()
    Remarks

    This method is called when the form's dpi is changed. Write custom logic to update some controls (such as ListBox.ItemHeight) here.

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Overrides
    System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message)

    Events

    DpiChanged

    The event occurs on form's dpi change.

    Declaration
    public event EventHandler DpiChanged
    Event Type
    Type Description
    System.EventHandler

    Extension Methods

    UIUtils.DrawImageAndText(Control, DrawItemEventArgs, Image, String)
    UIUtils.DrawVisualStyleBorder(Control, Graphics, Rectangle)
    UIUtils.Dpi(Control)
    UIUtils.DpiMultiplier(Control)
    UIUtils.FontDpiMultiplier(Control)
    UIUtils.LogicalToDevice(Control, Int32)
    UIUtils.LogicalToDevice(Control, Single)
    UIUtils.LogicalToDevice(Control, Rectangle)
    UIUtils.LogicalToDevice(Control, Point)
    UIUtils.LogicalToDevice(Control, Size)
    UIUtils.LogicalToDevice(Control, Font, Boolean)
    UIUtils.GetImage(Control, Int32)
    UIUtils.GetImage(Control, String)
    UIUtils.GetImages(Control)
    Back to top © 1998-2025 Copyright Fast Reports Inc.