Component | +--Control | +--Formpublic class Form
Represents the basic top-level window.
Constructors
Name | Description |
---|---|
Form() | Creates a new form. |
addOwnedForm(Form ownedForm) | Adds an owned form to this form. |
removeOwnedForm(Form ownedForm) | Removes a form from the list of owned forms. |
Methods
Name | Description |
---|---|
add(Control control) | Adds a control to the form. |
addOnClosed(EventHandler value) | Adds an event handler for the Closed event. |
addOnClosing(CancelEventHandler value) | Adds an event handler for the Closing event. |
addOnInputLangChange( InputLangChangeEventHandler value) | Adds an event handler for the InputLangChange event. |
addOnInputLangChangeRequest( InputLangChangeRequestEventHandler value) | Adds an event handler for the InputLangChangeRequest event. |
addOnMDIChildActivate(EventHandler value) | Adds an event handler for the MDIChildActivate event. |
adjustFormScrollbars( boolean displayScrollbars) | Adjust the automatic scroll bars on the form based on current control positions and the current selected control. |
createControl() | Topic under construction. |
createHandle() | Creates the handle for the form. |
defWndProc(Message m) | Calls the default window proc for the form. |
dispose() | Releases all the system resources associated with the form. |
fillInCreateParamsBorderIcons(CreateParams cp) | Adjusts the window style of the CreateParams to reflect the border icons. |
fillInCreateParamsBorderStyles(CreateParams cp) | Adjusts the window style of the CreateParams to reflect the border style. |
fillInCreateParamsStartPosition(CreateParams cp) | Adjusts the CreateParams to reflect the window bounds and start position. |
fillInCreateParamsWindowState(CreateParams cp) | Adjusts the Createparams to reflect the window state. |
getAcceptButton() | Retrieves the current acceptButton. |
getActiveControl() | Retrieves the current active control. |
getActiveMDIChild() | Retrieves the current MDIChild window that is active. |
getAutoScale() | Retrieves the current value of the AutoScale property. |
getAutoScaleBaseSize() | Retrieves the base size used for autoscaling. |
getAutoScroll() | Retrieves the current value of the AutoScroll property. |
getAutoScrollMargin() | Retrieves the current value of the AutoScrollMargin property. |
getAutoScrollPosition() | Retrieves the current value of the AutoScrollPosition property. |
getAxContainer() | Topic under construction. |
getBorderStyle() | Retrieves the current value of the BorderStyle property. |
getCancelButton() | Retrieves the current CancelButton. |
getClientSize() | Retrieves the current clientSize of the form. |
getControlBox() | Retrieves the current value of the ControlBox property. |
getCreateParams() | Retrieves the CreateParams used to create the window. |
getDesktopBounds() | Retrieves the bounds of the form in desktop coordinates. |
getDesktopLocation() | Retrieves the location of the form in desktop coordinates. |
getDialogResult() | Retrieves the current value of the DialogResult property. |
getDisplayRect() | Retreives the current display rectangle. |
getForm() | Retrieves the form that this control is parented to. |
getFormState(int flag) | Retrieves the bits associated with the requested formstate. |
getHelpButton() | Retrieves the current value of the HelpButton property. |
getHScroll() | Retrieves the current value of the HScroll property. |
getIcon() | Returns the current value of the Icon property. |
getIsMDIChild() | Returns a boolean indicating whether this form is an MDI child form. |
getIsMDIContainer() | Returns a boolean indicating whether this form is an MDI container. |
getIsMenuBarContainer() | Returns a boolean indicating whether this form is a Menu Bar Container. |
getKeyPreview() | Returns the current value of the KeyPreview property. |
getMaxButton() | Returns the current value of the MaxButton property. |
getMaximizedBounds() | Returns the maximized bounds of the form. |
getMaxTrackSize() | Returns the maximum size the form can be resized to. |
getMDIClient() | Returns the control that is the MDI Client region. |
getMDIParent() | Returns the current MDI parent of this form. |
getMenu() | Returns the current Menu for this form. |
getMergedMenu() | Returns the merged menu for the form. |
getMinButton() | Returns the current value of the MinButton property. |
getMinTrackSize() | Returns the minimum size the form can be resized to. |
getModal() | Returns the modal status of the form. |
getOwnedForms() | Returns an array of forms that are owned by this form. |
getOwner() | Returns the owner of this form. |
getPalette() | Returns the palette currently being used by the form. |
getPaletteMode() | Returns the current value of the PaletteMode property. |
getPaletteSource() | Returns the current value of the PaletteSource property. |
getParentForm() | Returns the form that is the visual parent of this form. |
getShowInTaskbar() | Returns the current value of the ShowInTaskbar property. |
getStartPosition() | Returns the current value of the StartPosition property. |
getWindowState() | Returns the current value of the WindowState property. |
hasDefaultAutoScrollPosition() | Topic under construction. |
hasFormState(int flag) | Returns whether any of the bits in the mask are on. |
invalidateFrame() | Forces a WM_WINDOWPOSCHANGED message to be sent that tells the form that the frame has changed. |
invalidateMergedMenu() | Invalidates the merged menu, forcing the menu to be re-created if needed again. |
layoutCore(Control dockLast) | Forces the layout of any docked or anchored child controls. |
layoutMDI(int value) | Arranges the MDI child forms according to value, which should be a member of the MDILayout enum. |
menuChanged(int change, Menu menu) | Topic under construction. |
menuChanged(int change, Menu menu, Form form) | Topic under construction. |
onClosed(Event e) | The Closed event is fired when the form is closed. |
onClosing(CancelEvent e) | The Closing event is fired when the form is closed. |
onInputLangChange(InputLangChangeEvent e) | The InputLangChange event is fired after the input language has changed for this form. |
onInputLangChangeRequest( InputLangChangeRequestEvent e) | The InputLangChangeRequest event is fired when the user attempts to change the input language for this form. |
onMDIChildActivate(Form form) | This function handles the activation of a MDI child form. |
onMDIChildActivate(Event e) | The MDIChildActivate event is fired when a MDI Child window is activated. |
onNewPalette(boolean fForceBackground) | Topic under construction. |
onResize(Event event) | The Resize event is fired when the form is resized. |
pointToScreen(Point p) | Topic under construction. |
processCmdKey(MSG msg, int keyData) | Topic under construction. |
processDialogChar(char charCode) | Topic under construction. |
processDialogKey(int keyData) | Topic under construction. |
processKeyPreview(Message m) | Topic under construction. |
processMnemonic(char charCode) | Topic under construction. |
propertyChanged(int property) | Topic under construction. |
rectToClient(Rectangle r) | Topic under construction. |
rectToScreen(Rectangle r) | Topic under construction. |
removeOnClosed(EventHandler value) | Removes an event handler for the Closed event. |
removeOnClosing(CancelEventHandler value) | Removes an event handler for the Closing event. |
removeOnInputLangChange( InputLangChangeEventHandler value) | Removes an event handler for the InputLangChange event. |
removeOnInputLangChangeRequest( InputLangChangeRequestEventHandler value) | Removes an event handler for the InputLangChangeRequest event. |
removeOnMDIChildActivate(EventHandler value) | Removes an event handler for the MDIChildActivate event. |
resumeUpdateMenuHandles() | Decrements updateMenuHandleSuspendCount. |
scaleCore(float x, float y) | Base function that performs scaling of the form. |
select(boolean directed, boolean forward) | Selects this form, and optionally selects the next/previous control. |
setAcceptButton(IButtonControl button) | Sets the control that is the AcceptButton. |
setActiveControl(Control value) | Sets the control that is currently active. |
setAutoScale(boolean value) | Sets the AutoScale property. |
setAutoScaleBaseSize(int value) | Sets the AutoScaleBaseSize. |
setAutoScroll(boolean value) | Sets the AutoScroll property. |
setAutoScrollMargin(Point value) | Sets the margins used during AutoScrolling. |
setAutoScrollPosition(Point value) | Sets the default position of the AutoScroll region. |
setBorderStyle(int borderStyle) | Sets the border style for the form. |
setCancelButton(IButtonControl button) | Sets the cancelButton for the Form. |
setClientSize(Point clientSize) | Sets the clientSize of the form. |
setControlBox(boolean controlBox) | Sets the value for the ControlBox property. |
setDesktopBounds(Rectangle bounds) | Sets the bounds of the Form in desktop coordinates. |
setDesktopBounds(int x, int y, int width, int height) | Sets the bounds of the form in desktop coordinates. |
setDesktopLocation(Point loc) | Sets the location of the form in desktop coordinates. |
setDesktopLocation(int x, int y) | Sets the location of the form in desktop coordinates. |
setDialogResult(int value) | Sets the value that will be returned from the form when it is displayed as a modal dialog. |
setFormState(int flag, boolean value) | This will turn all the bits on or off for the specified FORMSTATE_* property. |
setFormState(int flag, int value) | This will set the value of the specified FORMSTATE_* property. |
setHelpButton(boolean helpButton) | Sets the HelpButton property. |
setIcon(Icon icon) | Sets the icon to be displayed in the caption bar of the form. |
setIsMDIContainer(boolean value) | Sets the value for the IsMDIContainer property. |
setKeyPreview(boolean keyPreview) | Sets the KeyPreview property. |
setMaxButton(boolean maxButton) | Sets the value for the MaxButton property. |
setMDIParent(Form form) | Sets the MDIParent for this form. |
setMenu(MainMenu value) | Sets the main menu for this form. |
setMinButton(boolean minButton) | Sets the value for the MinButton property. |
setNewControls(Control[] ctls) | Topic under construction. |
setOwner(Form owner) | Sets the owner for this form. |
setPaletteMode(int paletteMode) | Sets the PaletteMode for the Form. |
setPaletteSource(Control paletteSource) | Sets the source for the form's palette if the Form PaletteMode is FormPaletteMode.USE_CONTROL. |
setParentHandle(int value) | Sets the HWND parent of this form. |
setShowInTaskbar(boolean showInTaskbar) | Sets the ShowInTaskbar property. |
setStartPosition(int startPosition) | Sets the StartPosition for the form. |
setVisible(boolean value) | Sets the visibility of the form. |
setWindowState(int windowState) | Sets the WindowState of the form. |
showDialog() | Shows this form as a modal dialog with no owner. |
showDialog(Form owner) | Shows this form as a modal dialog with the specified owner. |
suspendUpdateMenuHandles() | Increments updateMenuHandleSuspendCount. |
updateMenuHandles(MainMenu menu, boolean forceRedraw) | Topic under construction. |
updateStyles() | Topic under construction. |
wndProc(Message m) | Base wndProc encapsulation. |
Creates a new form.
Adds an owned form to this form. Owned forms are other top-level forms that are children of this form.
Removes a form from the list of owned forms. Also sets the owner of the removed form to null.
Adds a control to the form. This visually parents the specified control to the form.
add(Control) in Control.
Adds an event handler for the Closed event. The Closed event is fired when the form is closed.
Adds an event handler for the Closing event. The Closing event is fired when the form is closed.
Adds an event handler for the InputLangChange event. The InputLangChange event is fired after the input language has changed for this form.
Adds an event handler for the InputLangChangeRequest event. The InputLangChangeRequest event is fired when the user attempts to change the input language for this form. If the event is canceled, the input language will not change.
Adds an event handler for the MDIChildActivate event. The MDIChildActivate occurs when a MDIChild window is activated.
Adjust the automatic scroll bars on the form based on current control positions and the current selected control.
Topic under construction.
Creates the handle for the form. If a subclass overrides this function, it must call the super implementation.
createHandle() in Control.
Calls the default window proc for the form. If a subclass overrides this function, it must call the super implementation.
defWndProc(Message) in Control.
Releases all the system resources associated with the form. If a subclass overrides this function, it must call the super implementation.
Adjusts the window style of the CreateParams to reflect the border icons. If a subclass overrides this function, it must call the super implementation.
Adjusts the window style of the CreateParams to reflect the border style. If a subclass overrides this function, it must call the super implementation.
Adjusts the CreateParams to reflect the window bounds and start position. If a subclass overrides this function, it must call the super implementation.
Adjusts the Createparams to reflect the window state. If a subclass overrides this function, it must call the super implementation.
Returns control that current is the acceptButton.
Retrieves the current acceptButton.
Returns current active control.
Retrieves the current active control.
Returns active MDIChild window.
Retrieves the current MDIChild window that is active. Returns null if there are no MDIChild windows.
Returns current value of the AutoScale property.
Retrieves the current value of the AutoScale property. When AutoScale is set to true, the form will adjust the size of the form to fit the height of the font that is used on the form. All child controls will also be scaled. This allows the form to resize to fit systems with Large Fonts and international systems.
Returns base autoScaling size.
Retrieves the base size used for autoscaling. The AutoScaleBaseSize is used internally to determine how much to scale the form when AutoScaling is used.
Returns current value of the AutoScroll property.
Retrieves the current value of the AutoScroll property. When AutoScroll is set to true, the form will allow the user to scroll the contents of the form if any child controls are placed outside the bounds of the form. This allows the form to have a virtual size that is larger than the current form bounds.
Returns current value of the AutoScrollMargin property.
Retrieves the current value of the AutoScrollMargin property. The margins define the width and height of the border around each control. This border is used to determine when scroll bars are needed on the form and where to scroll to when a control is selected.
Returns current value of the AutoScrollPosition property.
Retrieves the current value of the AutoScrollPosition property. The AutoScrollPosition property is used internally to adjust the position of controls that are placed on the form through the form designer.
Topic under construction.
Returns current value of the BorderStyle property.
Retrieves the current value of the BorderStyle property. The border style of the form determines how the outer edge of the form appears. In addition, certain border styles prevent the form from being sized.
Returns current cancelButton.
Retrieves the current CancelButton. The cancel button will be "clicked" when the user presses ESC.
Returns current clientSize of the form.
Retrieves the current clientSize of the form. The clientSize of a form is the width and height of it's clientRect. The distinction between the clientRect and clientSize is that the clientSize can be set. It also represents the requested size of the clientRect.
Returns current value of the ControlBox property.
Retrieves the current value of the ControlBox property. If ControlBox is set to true, the control box will be displayed in the upper- left corner of the caption bar. The control box is where the user can click to access the system menu.
Returns CreateParams used to create the window.
Retrieves the CreateParams used to create the window. If a subclass overrides this function, it must call the super implementation.
getCreateParams() in Control.
Returns bounds of the form in desktop coordinates.
Retrieves the bounds of the form in desktop coordinates.
Returns location of the form in desktop coordinates.
Retrieves the location of the form in desktop coordinates.
Returns current value of the DialogResult property.
Retrieves the current value of the DialogResult property.
Returns current display rectangle.
Retreives the current display rectangle. The display rectangle is the virtual display area that is used to lay out components. The position and dimensions of the form's display rectangle change during autoScroll.
Returns form that this form is parented to.
Retrieves the form that this control is parented to.
Returns value of the formState property.
Retrieves the bits associated with the requested formstate.
Returns current value of the HelpButton property.
Retrieves the current value of the HelpButton property. If HelpButton is set to true, a small question mark will appear in the caption bar to the left of the minimize, maximize, and close buttons.
Returns true if the Auto-HorizScrollbar is visible.
Retrieves the current value of the HScroll property.
Returns current value of the Icon property.
Returns the current value of the Icon property.
Returns true if this is an MDI child.
Returns a boolean indicating whether this form is an MDI child form.
Returns true if this form is an MDI container.
Returns a boolean indicating whether this form is an MDI container.
Returns true if this form is a menu bar container
Returns a boolean indicating whether this form is a Menu Bar Container.
Returns current value of the KeyPreview property.
Returns the current value of the KeyPreview property.
Returns current value of the MaxButton property.
Returns the current value of the MaxButton property.
Returns bounds of the form when it is maximized.
Returns the maximized bounds of the form. Classes that extend form can override this function to provide new bounds for the form when it is maximized. This function is called when the form is being resized.
Returns maximum size the form can be sized to.
Returns the maximum size the form can be resized to. Classes that extend form can override this function to provide a new maximum size for the form. This function is called when the form is being resized.
Returns MDI Client control.
Returns the control that is the MDI Client region.
Returns current MDI parent of this form.
Returns the current MDI parent of this form.
Returns current Menu for this form.
Returns the current Menu for this form.
Returns merged menu.
Returns the merged menu for the form. This is primarily used when this form is an MDI child that merges its menu with the parent form's menu.
Returns current value of the MinButton property.
Returns the current value of the MinButton property.
Returns minimum size the form can be sized to.
Returns the minimum size the form can be resized to. Classes that extend form can override this function to provide a new minimum size for the form. This function is called when the form is being resized.
Returns s true if this form is currently modal.
Returns the modal status of the form.
Returns s array of forms that are owned by this form.
Returns an array of forms that are owned by this form.
Returns form that currently owns this form.
Returns the owner of this form.
Returns the palette currently being used by the form.
getPalette() in Control.
Returns current value of the PaletteMode property.
Returns the current value of the PaletteMode property.
Returns current value of the PaletteSource property.
Returns the current value of the PaletteSource property.
Returns current value of the ParentForm property.
Returns the form that is the visual parent of this form.
Returns current value of the ShowInTaskbar property.
Returns the current value of the ShowInTaskbar property.
Returns Current value of teh StartPosition property.
Returns the current value of the StartPosition property.
Returns current value of the WindowState property.
Returns the current value of the WindowState property.
Topic under construction.
Returns true if any of the bits are on.
Returns whether any of the bits in the mask are on.
Forces a WM_WINDOWPOSCHANGED message to be sent that tells the form that the frame has changed.
Invalidates the merged menu, forcing the menu to be re-created if needed again.
Forces the layout of any docked or anchored child controls.
layoutCore(Control) in Control.
Arranges the MDI child forms according to value, which should be a member of the MDILayout enum.
Topic under construction.
Topic under construction.
The Closed event is fired when the form is closed.
The Closing event is fired when the form is closed.
The InputLangChange event is fired after the input language has changed for this form.
The InputLangChangeRequest event is fired when the user attempts to change the input language for this form. If the event is canceled, the input language will not change.
This function handles the activation of a MDI child form. If a subclass overrides this function, it must call super.onMDIChildActivate.
The MDIChildActivate event is fired when a MDI Child window is activated.
Topic under construction.
The Resize event is fired when the form is resized.
Topic under construction.
pointToScreen(Point) in Control.
Topic under construction.
processCmdKey(MSG,int) in Control.
Topic under construction.
processDialogChar(char) in Control.
Topic under construction.
processDialogKey(int) in Control.
Topic under construction.
Topic under construction.
processMnemonic(char) in Control.
Topic under construction.
propertyChanged(int) in Control.
Topic under construction.
rectToClient(Rectangle) in Control.
Topic under construction.
rectToScreen(Rectangle) in Control.
Removes an event handler for the Closed event.
Removes an event handler for the Closing event.
Removes an event handler for the InputLangChange event.
Removes an event handler for the InputLangChangeRequest event.
Removes an event handler for the MDIChildActivate event.
Decrements updateMenuHandleSuspendCount. If updateMenuHandleSuspendCount becomes zero and updateMenuHandlesDeferred is true, updateMenuHandles is called.
Base function that performs scaling of the form.
scaleCore(float,float) in Control.
Selects this form, and optionally selects the next/previous control.
select(boolean,boolean) in Control.
Sets the control that is the AcceptButton. This control must implement IButtonControl to be used as the acceptButton.
Sets the control that is currently active.
Sets the AutoScale property. When AutoScalling is turned on, the form will rescale the form based on the base font size when it is created. This makes the form display correctly on large font systems and systems that have a larger default font than what the form was designed on.
Sets the AutoScaleBaseSize. This value is used at form display time to compute the scaling factor for the form.
Sets the AutoScroll property. When AutoScrolling is turned, scroll bars will be displayed on the form if any controls are located outside the client region of the form. This allows the user to scroll the client region to make the controls visible.
In addition, when AutoScrolling is on, the client region will automatically scroll to make the control with focus visible. This lets the user tab around the form and always see the control that has focus.
Sets the margins used during AutoScrolling. The margins define the width and height of the border around each control. This border is used to determine when scroll bars are needed on the form and where to scroll to when a control is selected.
Sets the default position of the AutoScroll region. This will not move the scroll region once the form has been created.
Sets the border style for the form. Valid values are:
FormBorderSytle.NONE FormBorderSytle.FIXED_SINGLE FormBorderSytle.SIZABLE FormBorderSytle.FIXED_DIALOG FormBorderSytle.FIXED_TOOLWINDOW FormBorderSytle.SIZABLE_TOOLWINDOW
Sets the cancelButton for the Form. The cancelButton is "clicked" when the user presses ESC.
Sets the clientSize of the form. This will adjust the bounds of the form to make the clientSize the requested size.
setClientSize(Point) in Control.
Sets the value for the ControlBox property. If ControlBox is set to true, there is an icon in the upper-left corner of the form that has the System menu on it.
Sets the bounds of the Form in desktop coordinates.
Sets the bounds of the form in desktop coordinates. Desktop coordinates are based on the working area of the screen, which excludes the taskbar.
Sets the location of the form in desktop coordinates.
Sets the location of the form in desktop coordinates.
Sets the value that will be returned from the form when it is displayed as a modal dialog.
This will turn all the bits on or off for the specified FORMSTATE_* property.
This will set the value of the specified FORMSTATE_* property.
Sets the HelpButton property. If HelpButton is true, a "What's This" Help icon will be displayed in the caption bar of the form.
Sets the icon to be displayed in the caption bar of the form.
Sets the value for the IsMDIContainer property. If this is set to true, this form can contain other forms in an MDI fashion.
Sets the KeyPreview property. When KeyPreview is set to true, the form will recieve key events for all the contained controls before the control. This allows the form to catch events such as ENTER, and so forth.
Sets the value for the MaxButton property. If MaxButton is true, the maximize button is displayed in the caption bar of the form.
Sets the MDIParent for this form. The MDIParent must be marked as an MDI container for this to succeed.
Sets the main menu for this form.
Sets the value for the MinButton property. If MinButton is true, the minimize button is displayed in the caption bar of the form.
Topic under construction.
setNewControls(Control[]) in Control.
Sets the owner for this form. This is the same as calling owner.addOwnedForm(this).
Sets the PaletteMode for the Form. Valid values are:
FormPaletteMode.HALFTONE FormPaletteMode.NONE FormPaletteMode.USE_CONTORL
Sets the source for the form's palette if the Form PaletteMode is FormPaletteMode.USE_CONTROL.
Sets the HWND parent of this form.
setParentHandle(int) in Control.
Sets the ShowInTaskbar property. If ShowInTaskbar is true, the form will be displayed in the Windows taskbar.
Sets the StartPosition for the form. Valid values are:
FormStartPosition.MANUAL FormStartPosition.WINDOWS_DEFAULT_LOCATION FormStartPosition.WINDOWS_DEFAULT_BOUNDS FormStartPosition.CENTER_SCREEN
Sets the visibility of the form.
setVisible(boolean) in Control.
Sets the WindowState of the form. Valid values are:
FormWindowState.NORMAL FormWindowState.MAXIMIZED FormWindowState.MINIMIZED
Returns The DialogResult from the form.
Shows this form as a modal dialog with no owner.
Returns The DialogResult from the form.
Shows this form as a modal dialog with the specified owner.
Increments updateMenuHandleSuspendCount.
Topic under construction.
Topic under construction.
Base wndProc encapsulation.
wndProc(Message) in Control.