Changes

Form Events and Capabilities VB6

2,025 bytes added, 16:49, 2 February 2008
The following lines were added (+) and removed (-):
== Form Move Event ==== Subclassing using WM_WINDOWPOSCHANGED ===== Subclassing using WM_WINDOWPOSCHANGED ===== EventVB.dll Custom Functions ===== EventVB.dll Custom Functions ===&nbsp;== Open a Form From Another Form ==Open the form called frmCompanies  frmCompanies.ShowOpen it so that the parent form cannot be clicked.  To suspend execution of the first form until after the second form is done with, add the keyword constant vbModal as an argument to the Show method.   frmCompanies.Show vbModalThe Hide method of a form removes the form from the screen (makes it invisible), but the form still remains in memory.  frmCompanies.Hide  Me.Hide  HideYou can load a form in memory and not display it.  Load frmCompaniesUnload form from memory (which also closes it)  Unload MeExample  Private Sub Form_Unload(Cancel As Integer)    If MsgBox("Are you sure you want to quit?", vbYesNo + vbQuestion, "Unload Test") = vbNo Then      Cancel = 1    End If  End Sub&nbsp;== From Dimensions and Twip Units ==The default unit is the twip, which is 1/1440 of an inch for height, width, top, and left.  There are 15 twips per pixel.Pixels to Twip:  W = W * Screen.TwipsPerPixelX  H = H * Screen.TwipsPerPixelY Twips to Pixel:  W = W / Screen.TwipsPerPixelX  H = H / Screen.TwipsPerPixelY&nbsp;== Resizing Forms ==* Width: Specifies the width of the control. The default unit is the twip, which is 1/1440 of an inch.* Height: Specifies the height of the control. The default unit is the twip, which is 1/1440 of an inch.* Left: Specifies the distance between the internal left edge of a control and the left edge of its containter.The default unit is the twip, which is 1/1440 of an inch.* Top: Specifies the distance between the internal top edge of a control and the top edge of its containter.The default unit is the twip, which is 1/1440 of an inch.<BR>* ScaleWidth: The width of the client area.* ScaleHeight: The height of the client area.* ScaleLeft:  Coordinate horizontal of upper left client area.* ScaleTop: Coordinate vertical of upper left client area.<BR>* ClientWidth:* ClientHeight:* ClientLeft:* ClientTop:&nbsp;
Bureaucrat, administrator
16,192
edits