Class BaseForm
Base class for all forms.
Inheritance
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
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
OnLoad(EventArgs)
Declaration
protected override void OnLoad(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
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
Events
DpiChanged
The event occurs on form's dpi change.
Declaration
public event EventHandler DpiChanged
Event Type
Type | Description |
---|---|
System.EventHandler |