/ Assembly List / LJCWinFormCommon / FormCommon

Namespace - LJCWinFormCommon


Syntax

C#
public class FormCommon

Provides common WinForms methods.

General Functions
CreateTablesPrompt Verify create of missing tables.
SetString Sets the string to "-" if it is empty or blanks and to "" if it is "-".
RestoreSplitDistance Restore the splitter distance.
SetLabelsBackColor Sets the BackColor for the labels.

Action State Functions
SetMenuState Sets the enable state for the menu items.
SetToolState Sets the enable state for the tool items.

Error Functions
ShowError Displays the error text if not null.
ShowHasError Displays "No records affected." if the affected count is less than 1.

Key Handler Functions
HandleNumberOrEditKey Checks the key character for a numeric or allowed control value.
HandleSpace Checks the key character for a space.
StripBlanks Strips blanks from the string.
StripNonDigits Strips non-digits from a string.
TextBoxNoSpace_KeyPress Does not allow spaces.
TextBoxNoSpace_TextChanged Strips blanks from the text value.
TextBoxNumeric_KeyPress Only allows numbers or edit keys.

File Functions
SaveFile Displays the Save dialog to select a file.
SelectFile Displays the Open dialog to select a file.
ShellFile Execute a program with the selected file.
ShellProgram Executes an external program.

Image Functions
CreateGradient Draws a gradient in the specified rectangle.
CropImage Crops an image.
ResizeImage Resizes an image.
TransformCrop Transforms the crop rectangle values of the sample image relative to the values of the origina

ScreenPoint Functions
GetDialogScreenPoint Gets the Grid target Dialog screen position.
GetMenuScreenPoint Get the control target menu screen position.
GetScreenRectangle Gets the Control screen rectangle.
GetScreenPoint Converts the Control point to Screen point.

Other Public Methods
AddError Standard Add error message.
DataError Standard Duplicate error message.
NotSortable Sets the grid columns to not sortable.
UpdateError Standard Update error message.
31 Methods

Fields
DeleteConfirm The Delete Confirmation message.
DeleteError The Delete Error message.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.