Comparison Between VB 6.0 and VB.NET Objects, Part 2

 on Selasa, 14 Maret 2017  

For a more detailed look at which Visual Basic 6.0 Form properties still exist or have changed, visit MSDN Control Property, Method, and Event Changes for Visual Basic 6.0 Users.

Visual Basic.NET Properties Descriptions and Settings

Property Name Property Description Property Setting
DataBindings Holds all the bindings of properties of this control to data sources Refer To the DataBindings Advanced property
DataBindings Advanced Allows you to bind properties of the control [VBNETDataBindingsAdv.jpg]Use the above picture to assign binding properties to controls
Uses the DataBindings property to access the ControlBindingsCollection. By adding Binding objects to the collection, you can bind any property of a control to the property of an object.
Dynamic Properties Maps values in the application configuration file <appSettings> section to this component's properties [VBNETDynamicPropertiesAdv.jpg]
10 Things You Need to Know About Deploying Microsoft Office 365
When a Box similar to the above picture is displayed, you can set Dynamic Properties for your controls
Dynamic Properties Advanced Advanced Dynamic properties allow you to configure and set key names by which to store any dynamic property values  
AcceptButton The accept button of the form. If this is set, the button is 'clicked' whenever the user presses the 'ENTER' key. Choose the button you want to select as a Default button from the displayed list
AccessibleDescription An object's AccessibleDescription property provides a textual description about an object's visual appearance. The description is primarily used to provide greater context for low-vision or blind users, but also can be used for context searching or other applications. Any Textual and Numeric data can be entered here. Textual is recommended.
AccessibleName The AccessibleName property is a label that briefly describes and identifies the object within its container, such as the text in a Button, the name of a MenuItem, or a label displayed next to a TextBox control. Any Textual and Numeric data can be entered here. Textual is recommended.
AccessibleRole The role of the object describes the function of the object and is used by accessibility applications [VBNETAccessibleRole.jpg]Choose the applicable Role from the list
AllowDrop Determines whether the control will receive drag-drop notifications
  • True
  • False
AutoScale You can use this property to allow your form and its controls to automatically adjust based on changes in the font. This can be useful in applications where the font might increase or decrease based on the language specified for use by Windows.
  • True
  • False
AutoScroll If this property is set to True, scroll bars are displayed on the form if any controls are located outside the form's client region. Additionally, when autoscrolling is on, the client area of the form automatically scrolls to make the control with input focus visible.
  • True
  • False
AutoScrollMargin The margin around controls during auto scroll
The auto-scroll margin is the distance between any child controls and the edges of the scrollable parent control. The AutoScrollMargin size is added to the size of any child controls contained in the scrollable control to determine whether or not scroll bars are needed.
Integer data ONLY for Width and Height
AutoScrollMinSize The AutoScrollMinSize property is used to manage the screen size allocated to the automatic scroll bars. Integer data ONLY for Width and Height
BackColor The background color used to display text and graphics in the control [VBNETBackColorCustom.jpg][VBNETBackColorWeb.jpg]
[VBNETBackColorSystem.jpg]You can select any color from any Tab in the Color Dialogbox
BackgroundImage The background image used for the control [VBNETBackgroundPicture.jpg]Browse for a picture on your system using the above Dialog box
CancelButton This property allows you to designate a default action to occur when the user presses the 'ESC' key in your application. You can use this property to allow the user to quickly navigate a simple form by allowing them to simply press the 'ESC' key to close a window without committing changes instead of manually clicking the Cancel button with their mouse. Choose the button you wish to select as a Default button from the displayed list
CausesValidation Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
  • True
  • False
ContextMenu The shortcut menu to display when the user right-clicks the control Choose any ContextMenu item (on the Form) from the list
ControlBox If the ControlBox property is set to true, the control box is displayed in the upper-left corner of the caption bar. The control box is where the user can click to access the system menu.
  • True
  • False
Cursor The cursor that appears when the mouse pointer passes over the control [VBNETCursor.jpg]Based on your needs, select the appropriate Cursor from the list
DockPadding This determines the size of the border for docked controls Integer data ONLY for:
  • All - Number of pixels along all borders to pad docked controls
  • Left - Number of pixels along the left to pad docked controls
  • Top - Number of pixels along the top to pad docked controls
  • Right - Number of pixels along the right to pad docked controls
  • Bottom - Number of pixels along the right to pad docked controls
Enabled Gets or sets a value indicating whether the control can respond to user interaction
  • True
  • False
Font The font used to display text in the control [VB6FontSelectionDialogBox.jpg]Name [VBNETFontName.jpg]
  • Size - Any Numeric value
  • Unit - World, Pixel, Point, Inch, Document, Millimetre
  • Bold - True, False
  • GdiCharSet - Integer values ONLY
  • GdiVerticalFont - True, False
  • Italic - True, False
  • Strikeout - True, False
  • Underline - True, False
ForeColor The foreground color used to display text and graphics in the control [VBNETBackColorCustom.jpg][VBNETBackColorWeb.jpg]
[VBNETBackColorSystem.jpg]You can select any color from any Tab in the Color dialog box
FormBorderStyle Controls the appearance of the border for the form. This also will affect how the caption bar is displayed and what buttons are allowed to appear on it.
Fixed3D A fixed, three-dimensional border.
FixedDialog A thick, fixed dialog-style border.
FixedSingle A fixed, single-line border.
FixedToolWindow A tool window border that is not resizable. A tool window does not appear in the taskbar or in the window that appears when the user presses 'ALT+TAB'.
None No border.
Sizable A resizable border.
SizableToolWindow A resizable tool window border. A tool window does not appear in the taskbar or in the window that appears when the user presses 'ALT+TAB'.
GridSize Determines the size of the positioning grid Integer Values ONLY
HelpButton When this property is set to true, a small button with a question mark appears in the caption bar to the left of the Close button. You can use this button to display help for your application. You can create an event handler for the HelpRequested event of the Control class to display Help information to the user when the Help button of the form is clicked.
  • True
  • False
Icon A form's icon designates the picture that represents the form in the taskbar as well as the icon that is displayed for the control box of the form. [VBNETIcon.jpg]Unless an icon is selected, the Size sub-properties will be un-editable.
ImeMode Determines the IME (Input Method Editor) status of the object when selected An input method editor (IME) is a program that allows users to enter complex characters and symbols, such as Japanese Kanji characters, using a standard keyboard. The ImeMode property is typically set to ImeMode.Off for a TextBox control that is intended to only enter numeric values. The ImeMode property value is set to ImeMode.NoControl for the Form class. Select any of the following:
  • Inherit
  • NoControl
  • On
  • Off
  • Disable
  • Hiragana
  • Katakana
  • KatakanaHalf
  • AlphaFull
  • Alpha
  • HangulFull
  • Hangul
IsMdiContainer This property changes the display and behavior of the form to an MDI parent form. When this property is set to true, the form displays a sunken client area with a raised border. All MDI child forms assigned to the parent form are displayed within its client area.
  • True
  • False
KeyPreview When this property is set to true, the form will receive all KeyPress, KeyDown, and KeyUp events. After the form's event handlers have completed processing the keystroke, the keystroke is then assigned to the control with focus. You can use this property to process all keystrokes in your application and either handle the keystroke or call the appropriate control to handle the keystroke. For example, when an application uses function keys, you might want to process the keystrokes at the form level rather than writing code for each control that might receive keystroke events.
Note: If a form has no visible or enabled controls, it automatically receives all keyboard events.
  • True
  • False
Language Indicates the current localizable language List of languages from which to choose
Location The position of the top-left corner of the control with respect to its container Integer values for X and Y
Locked The Locked property determines whether you can move or resize the control
  • True
  • False
MaximizeBox Determines whether a form has a maximize box in the upper-right corner of its caption bar
  • True
  • False
MaximumSize The maximum size the form can be resized to. This property enables you to limit the size of a form to a specified maximum size. You can use this feature when displaying multiple windows at the same time, to ensure that a single window does not cause other windows to be hidden. If this property is set to a Size object that is 0 in height and 0 in width, the form will have no maximum size beyond the limits set by Windows. Integer values for Width and Height
Menu You can use this property to switch between complete menu sets at run time. For example, you can define one MainMenu to be displayed when your multiple document interface (MDI) form has no active MDI child forms and another MainMenu to display when a child window is displayed. You can also use a different MainMenu when specific conditions exist in your application that require displaying a different menu set. Choose from a list of Main Menu controls on the form
MinimizeBox Determines whether a form has a minimize box in the upper-right corner of its caption bar
  • True
  • False
MinimumSize The minimum size the form can be resized to. This property enables you to limit the size of a form to a specified minimum size. You can use this feature to prevent a user from sizing a window to an undesirable size. If this property is set to a Size object that is 0 in height and 0 in width, the form will have no minimum size beyond the limits set by Windows. Integer values for: Width and Height
Name Gets or sets the name of the control. Textual data
Opacity This property enables you to specify a level of transparency for the form and its controls. This property differs from transparency provided by the TransparencyKey, which only makes a form and its controls completely transparent if they are the same color as the value specified in the TransparencyKey property. When this property is set to a value less than 100% (1.00), the entire form, including borders, is made more transparent. Setting this property to a value of 0% (0.00) makes the form completely invisible. You can use this property to provide different levels of transparency or to provide effects such as phasing a form in or out of view. For example, you can phase a form into view by setting the Opacity property to a value of 0% (0.00) and gradually increasing the value until it reaches 100% (1.00). Percentage values Ranging from (0% to 100%)
RightToLeft The RightToLeft property is used for international applications where the language is written from right to left, such as Hebrew or Arabic. When this property is set to RightToLeft.Yes, control elements that include text are displayed from right to left. If the control is a top-level control, the user's operating system is queried to determine whether the control needs to enable right-to-left support.
The following are a few examples of how control elements are affected by the RightToLeft property value of RightToLeft.Yes:
  • Vertical scroll bars are displayed on the left side rather than right side of scrollable controls.
  • Horizontal scroll bars start with the scroll box (thumb) right-aligned.
  • The check box element alignment, controlled by the CheckAlign property, is reversed for CheckBox and RadioButton controls.
  • Text displayed in the title bar of a Form is right-aligned. The icon and control box retain their left and right alignment respectively.
  • Items in list box, combo box, and up-down controls are right aligned.
  • Menus are displayed right-aligned.
  • The alignment of toolbar buttons on a ToolBar control or the alignment of text on a ToolBarButton is not affected by the RightToLeft property.
  • No
  • Yes
  • Inherit
ShowInTaskbar You can use this property to prevent users from selecting your form through the Windows taskbar.
  • True
  • False
Size This property allows you to set both the height and width of the form at the same time instead of setting the Height and Width properties individually. Integer values for Width and Height
SizeGripStyle This property enables you to determine when the sizing grip is displayed on the form. You can set this property to display the sizing grip or have it automatically displayed based on the setting of the FormBorderStyle property.
  • Auto
  • Show
  • Hide
SnapToGrid Determines whether controls should snap to the positioning grid
  • True
  • False
StartPosition This property enables you to set the starting position of the form when it is displayed at run time. The form can be displayed manually or in the default location specified by Windows. Select any of the following:
  • Manual
  • CenterScreen
  • WindowsDefaultLocation
  • WindowsDefaultBounds
  • CenterParent
Tag A common use for the Tag property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer you, might store a DataSet that contains the customer's order history in that control's Tag property so the data can be accessed quickly. Any type derived from the Object class can be assigned to this property. If the Tag property is set through the Windows Forms designer, only text can be assigned.
Text Gets or sets the text associated with this control. Textual data and any Numeric data can be entered here.
TopMost A top-most form is a form that overlaps all the other forms even if it is not the active or foreground form.
  • True
  • False
TransparencyKey When the TransparencyKey property is assigned a Color, the areas of the form that have the same BackColor will be displayed transparently. Any mouse actions, such as the click of the mouse, that are performed on the transparent areas of the form will be transferred to the windows below the transparent area. [VBNETBackColorCustom.jpg][VBNETBackColorWeb.jpg]
[VBNETBackColorSystem.jpg]You can select any color from any Tab in the Color dialog box.
WindowState Determines the initial visual state of the form Select any of the following:
  • Normal
  • Minimized
  • Maximized
I hope this has made your migration to Visual Basic.NET a tiny bit easier, and that I have given you enough insight to the Form object Properties Window changes. Watch for Part II (Changes in the Toolboxes) of Comparison Between VB 6.0 and VB.NET Objects.



Tidak ada komentar:

Posting Komentar

Catatan: Hanya anggota dari blog ini yang dapat mengirim komentar.

B-Theme