Akemi Power Pack

Akemi Power Pack v1.0.38

Akemi Power Pack is a suite of ActiveX controls to enhance Visual Basic applications.

This documentation is divided into the following parts:

Guide to Examples

ActiveX Controls Reference

Class Reference

Event Index

Property Index

Methods and Functions Index

Interfaces

Error Index

Copyright and Disclaimer


Copyright and Disclaimer

Akemi Power Pack, including this documentation, is copyright 2001 Akemi.

Microsoft, Visual Basic, and Windows are trademarks of Microsoft.

In explaining how to use Akemi Power Pack, parts of this documentation refer to more general issues relating to Windows and Visual Basic. Any advice given here should be taken in the context of the full documentation of these two products as supplied by Microsoft.

All information here is provided "as is". No warranty is intended.

Akemi Power Pack is not to be used in any situation where software failure would result in injury or loss of life.

Akemi is owned and operated by Adelle Hartley.

Mailing Address:

15 Culloden Ave
Lutana TAS 7009
Australia

Australian Business Number 52 910 377 186

Home


Licensing and Redistribution

The "Demonstration" version of Akemi Power Pack will display a pop-up nag screen when used in design mode.

A "Licensed" version of Akemi Power Pack can be purchased through the VbXtras web site, which will:

  • Eliminate the nag screen.
  • Entitle you to distribute the following files with your software which uses the Akemi Power Pack:
  • AkemiPowerPack.ocx
  • AkemiKeyState.dll
  • AkemiFlatControls.ocx

The redistributed version of Akemi Spy Library will have the same limitations as the Demonstration version. That is, if Akemi Spy Library is used to build an ActiveX control, then developers who use that control will see a nag screen when designing VB forms which use that control.


Guide To Examples

Contents

Flat Demo 1

Flat Demo 2

Flat Demo 3

Mouse Rollover using standard controls

Mouse Rollover (hard way)

Splitter Demo 1 (single instance of host form)

Splitter Demo 2 (multiple instances of host form)

Standard Scroll bars

SubForm - Single Form View

SubForm - Continuous Forms View

SubForm - Grid Of Forms View

SubForm - Grid Of Forms View (2)


FlatDemo 1

Next: FlatDemo 2

This example demonstrates a basic HotButton, and DirectionalButton, and uses ShowPopupForm to display a pop-up form when the mouse hovers over the DirectionalButton.

This example includes a HotButton whose HotBackColor is set to "Active Title Bar" and whose HotForeColor is set to "Active Title Bar Text", so that the highlighting that occurs when the mouse moves over the control fits in with the user's own color scheme.

Open zip file


FlatDemo 2

Next: FlatDemo 3

This example demonstrates the following Panel properties:

BorderStyle
BackStyle
PictureAlignment
TextAlignment

As the HotButton and DirectionalButton controls are based on the Panel control, each of these properties is also a property of the HotButton and DirectionalButton controls.

Open zip file

Look up BorderStyle property

Look up BackStyle property

Look up Picture Alignment property

Look up TextAlignment property


FlatDemo 3

Next: Mouse Roll Over Using Standard Controls

This example changes the HotPicture property of a HotButton control at run-time, to simulate a graphical check box. The "inactive" Picture property is automatically derived from the HotPicture property.

The background of the Form in this example is achieved using the intrinsic Picture property of the form. The BackStyle of the HotButton controls on the form is set to opTransparent.

Open zip file


Mouse Roll Over Using Standard Controls

Next: Mouse Roll Over (Hard Way)

This example demonstrates using the PowerForm control to add mouse roll over effects to intrinsic VB controls.

The effects are achieved using the MouseEnterControl, MouseLeaveControl, and MouseHoverControl events.

Open zip file


Mouse Roll Over (Hard Way)

Next: Splitter Demo 1

This example demonstrates using Subclasser objects to add mouse roll over effects to intrinsic VB controls. This example achieves exactly the same behaviour as the previous example by using the Subclasser object to subclass each individual control.

Each control is subclassed using the SubClassWindow function.

Open zip file


Splitter Demo 1

Next: Splitter Demo 2

This example demonstrates using a Splitter control to host two forms at a time. In this example, the user can select which form to display in the right-hand or bottom pane, by selecting an item from the TreeView in the left-hand or top pane.

Related Help topics:

ChildForm1 and ChildForm2 Properties
 Orientation Property

Open zip file

Design-time | Run-Time

Navigation between the different pages is accomplished by clicking on a TreeView which is hosted on the form cfmNavigation. The Load event handler for cfmNavigation is shown below:

Private Sub Form_Load()
    'Initialize the Treeview
    TreeView1.Nodes.Add , , "About", "About"
    TreeView1.Nodes.Add , , "Page1", "Page1"
    TreeView1.Nodes.Add , , "Page2", "Page2"
End Sub

The NodeClick event for the TreeView is below:

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
    'Set the Active Page based on which node was clicked.
    Select Case Node.Key
        Case "About"
            Set frmMain.ActivePage = cfmAbout
        Case "Page1"
            Set frmMain.ActivePage = cfmPage1
        Case "Page2"
            Set frmMain.ActivePage = cfmPage2
    End Select
End Sub

The ActivePage property is implemented in code, in frmMain:

Public Property Set ActivePage(ByRef frm As Form)
    Set Splitter1.ChildForm2 = frm
End Property

Public Property Get ActivePage() As Form
    Set ActivePage = Splitter1.ChildForm2
End Property

An alternative way of implementing this behaviour, would be for cfmNavigation to access the Splitter control directly, so that the NodeClick event for the TreeView would look like:

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
    'Set the Active Page based on which node was clicked.
    Select Case Node.Key
        Case "About"
            Set frmMain.Splitter1.ChildForm2 = cfmAbout
        Case "Page1"
            Set frmMain.Splitter1.ChildForm2 = cfmPage1
        Case "Page2"
            Set frmMain.Splitter1.ChildForm2 = cfmPage2
    End Select
End Sub


Splitter Demo 2

Next: SubForm - Standard Scroll Bars

This example shows how to use the Splitter control on multiple instances of the hosting form. In this example, the left-hand panel can be switched between the navigation list, and a search form - emulating the explorer bar of Microsoft's Internet Explorer.

Related Help topics:

ChildForm1 and ChildForm2 Properties
 Orientation Property

Open zip file


Standard Scroll Bars

Next: SubForm Single Form View

This example is a simple map editor which demonstrates using the PowerForm control to add standard Win32 scroll bars to a standard VB form, and to handle scroll events.

The application opens a map file which is stored as an ASCII text file shown at the bottom of this page.

Related Help topics:

MinHorizontalScroll Property, MaxHorizontalScroll Property
 MinVerticalScroll Property, MaxVerticalScroll Property
 HorizontalScrollPage Property, VerticalScrollPage Property
 HorizontalScroll Event, VerticalScroll Event

Open zip file

MyMap.txt

AAAAAAAAAAAAAAFAAAAAG
AAAAAAAAAAAAAAFAAAAAG
@@@@AAAAAAAAAAFAAAAAG
GG@@@AAABAAAAAFAAAAAG
GGGG@@CCECCCCCECDCCCG
HGGGGG@AAAAAAAAAFAAAG
GGGGGGGAAAAAAAAAFAAAG
GGGGGGGAAAAAAAAAFAAAG
GGGGGGGGAAAAAAAAFAAAG
GGGGGGGGGGAAAAAAFAAAG
GGGGGGGGGGAAAAAAFAAAG
GGHGGGGGGGGAAAAAFAAAG
GGGGGGGGGGGAAAAAFAAAG
GGGGGGGGGGGAAAABFAAAG
GGGGGGGGGGGG@@CEECCCG
GAAA@GHGGGGGGG@AAAAAG
GAAAAGGGGGGGGGGGAAAAG
GGGAAGGGGGGGGGGGGAAAG
GGGGGGGGGGGGGGGGGGAAG
GGGGGGGGGGGGGGGGGGGAG
GGGGGGGGGGGGGGGGGGGGG


SubForm - Continuous Forms View

Next: SubForm - Grid Of Forms View

This example demonstrates a SubForm using continuous forms view.

Related Help topics:

ChildFormFactory Property
 Rows Property
 View Property

Open zip file

Design-time

Run-time

frmMain stores contact information in a Collection, with each each element of the Collection being an instance of clsPerson.

The Load event of frmMain, initializes the Collection, sets the Rows property of the SubForm to the number of elements in the collection, and sets the ChildFormFactory property of the SubForm.

Private Sub Form_Load()
    InitializePeopleCollection
    SubForm1.Rows = colmPeople.Count

    'Set the ChildFormFactory of the SubForm to Me
    'because IFormFactory is implemented in this form.
    Set SubForm1.ChildFormFactory = Me
End Sub

Whenever the SubForm needs an instance of cfmPerson, the form factory's GetFormInstance method is called. In frmMain's implementation of this method, a new instance of cfmPerson is created and is assigned the element of colmPeople which corresponds to the requested row:

Private Sub IFormFactory_GetFormInstance(ByVal Column As Long, ByVal Row As Long, frm As Object)
    Set frm = New cfmPerson
    Set frm.Person = colmPeople("Person" & CStr(Row))
End Sub

The form class, cfmPerson, has a Person property which is implemented as follows:

Public Property Set Person(ByRef obj As clsPerson)
    Set objmPerson = obj
    lblmName.Caption = obj.Name
    txtmHomePhone.Text = obj.HomePhone
    txtmWorkPhone.Text = obj.WorkPhone
    txtmAddress.Text = obj.Address
End Property

Public Property Get Person() As clsPerson
    Set Person = objmPerson
End Property

Setting the Person property of an instance of cfmPerson, displays the information about the person in the TextBoxes on the form. The Change event of each of these TextBoxes updates the instance of clsPerson used to initialize the form.

This is important, because the form instances themselves, are unloaded whenever they are scrolled out of view. Whereas the lifetime of the people collection (frmMain.colmPeople) is tied to the lifetime of frmMain.


SubForm - Grid Of Forms View

Next: SubForm - Grid Of Forms View (2)

This example demonstrates a SubForm using grid of forms view.

Related Help topics:

ChildFormFactory Property
 Rows Property, Columns Property
 View Property

Open zip file

Design-time

Run-time

The Load event of frmMain, creates a new instance of clsItemFactory and assigns it to the ChildFormFactory property of the SubForm.

Private Sub Form_Load()
    Set SubForm1.ChildFormFactory = New clsItemFactory
End Sub

Only one instance of clsItemFactory is created during the program's execution. clsItemFactory implements IFormFactory, which has exactly one Sub:

Private Sub IFormFactory_GetFormInstance(ByVal Column As Long, ByVal Row As Long, frm As Object)
    Set frm = New cfmItem
    frm.Initialize Row, Column
End Sub

The Initialize method of cfmItem, initializes the controls on the form, based on the Row and Column:

Public Sub Initialize(ByVal Row As Long, ByVal Column As Long)
lblmRow.Caption = "Row: " & CStr(Row)
lblmColumn.Caption = "Col: " & CStr(Column)

    'Invent a color
    txtmRed.Text = CStr(Row * 25)
    txtmGreen.Text = CStr(100 - Column * 5 - Row * 5)
    txtmBlue.Text = Column * 25
End Sub


SubForm - Grid Of Forms View (2)

Back to start

This example demonstrates a SubForm using grid of forms view. This is very similar to the previous example, except that all of the instances of the child form are stored in an array, and are prevented from being unloaded when they are scrolled out of view.

Related Help topics:

ChildFormFactory Property
 Rows Property, Columns Property
 View Property

Open zip file

Design-time

Run-time


SubForm - Single Form View

Next: SubForm - Continuous Forms View

This example demonstrates a SubForm using single form view.

Related Help topics:

ChildForm Property
 View Property
 ScrollToControl Method

Open zip file

Design-time

Run-time

This example uses a TabStrip control to switch between different pages of a dialog. The pages themselves are forms. There is one Subform Control on the main form. The code for the TabStrip control is below:

Private Sub TabStrip1_Click()
    Select Case TabStrip1.SelectedItem.Index
        Case 1
            Set SubForm1.ChildForm = cfmPage1
            'Set the focus to the first control on cfmPage1
            cfmPage1.Text1.SetFocus
        Case 2
            Set SubForm1.ChildForm = cfmPage2
            'Set the focus to the first control on cfmPage2
            cfmPage2.List1.SetFocus
        Case 3
            Set SubForm1.ChildForm = cfmPage3
            'Set the focus to the first control on cfmPage3
            cfmPage3.Check1.SetFocus
    End Select
End Sub

frmMain is resizable, and in response to the form's Resize event, all of the controls on the form, including the SubForm, are resized:

Private Sub Form_Resize()
    Const lcSpacing = 90

    TabStrip1.Width = ScaleWidth - TabStrip1.Left - lcSpacing
    Shape1.Height = ScaleHeight - Shape1.Top - lcSpacing
    Shape1.Width = ScaleWidth - Shape1.Left - lcSpacing
    Line1.Y2 = ScaleHeight - Line1.Y1 - lcSpacing
    SubForm1.Width = ScaleWidth - SubForm1.Left - lcSpacing * 2
    SubForm1.Height = ScaleHeight - SubForm1.Top - lcSpacing * 2
End Sub

The SubForm control displays scroll bars whenever the current child form is larger than the SubForm. As the user tabs through the controls on the child form (using the tab key), the GotFocus event of each control, calls ScrollToControl, to scroll that control into view.

Private Sub Check3_GotFocus()
    frmMain.SubForm1.ScrollToControl Check3
End Sub

This code has no effect, if the entire child form is visible.


Glossary

hWnd | A handle assigned to each window by the operating system.
child window | A window that has the WS_CHILD style. MDI child windows and ActiveX controls are examples of child windows.
scroll bar | A scroll bar can be a part of a window, or it can be a separate control with its own window handle. A window will be drawn with the little funny triangular bit in the bottom right-hand corner, if the window is resizable and has both a horizontal and vertical scroll bar.
top-level window | A window that has no parent window. Typical VB forms, (with MDIChild=false) are top-level windows.


WithEvents

Appendix: WithEvents

To handle the events raised by an event source (such as a SubClasser object), declare a variable using the keyword WithEvents.

Private WithEvents objmSubclasser As SubClasser

This will put objmSubclasser in the left drop-down list of your code window, and events raised by objmSubclasser can be selected from the right drop-down list, just like a visual control placed on the form's designer window.

For objmSubclasser to actually raise any events though, it must be explicity created at run-time.

Eg:

Private Sub Form_Load()
    Set objmSubClasser = SubClassWindow(hWnd)
 End Sub


Akemi Power Pack Controls

ActiveX Controls

See also: Classes, Event Index, Property Index, Method and Function Index, Interfaces

Akemi Power Pack includes the following ActiveX controls:

AkemiPowerPack.ocx
 | PowerForm
 | Splitter
 | SubForm
AkemiFlatControls.ocx
 | DirectionalButton
 | HotButton
 | Panel


DirectionalButton Control

See also: ShowPopupForm Method, HotButton Control, Panel Control, Controls

The DirectionalButton control is a button which displays an arrow with optional text.

Events:

Click
 MouseDown
 MouseEnter
 MouseHover
 MouseLeave
 MouseMove
 MouseUp

Properties:

BackColor
 BackStyle
 BorderStyle
 Caption
 Direction
 Enabled
 FocusRect
 Font
 ForeColor
 HotBackColor
 HotBorderStyle
 HotForeColor
 HoverTime
 MaskColor
 Size
 TextAlignment


HotButton Control

See also: Panel control, DirectionalButton control, Controls

The HotButton control is a button which displays a caption or an image or both or neither.

Events:

Click
 MouseDown
 MouseEnter
 MouseHover
 MouseLeave
 MouseMove
 MouseUp

Properties:

BackColor
 BackStyle
 BorderStyle
 Caption
 DisabledPicture
 Enabled
 FocusRect
 Font
 ForeColor
 HotBackColor
 HotBorderStyle
 HotForeColor
 HotPicture
 HoverTime
 MaskColor
 Picture
 PictureAlignment
 TextAlignment


Panel Control

See also: HotButton control, DirectionalButton control, Controls

The Panel control is a control container much like the intrinsic frame control.

Events:

Click
 MouseDown
 MouseEnter
 MouseHover
 MouseLeave
 MouseMove
 MouseUp

Properties:

AlignToClient
 BackColor
 BackStyle
 BorderStyle
 Caption
 Enabled
 FocusRect
 Font
 ForeColor
 GotMouse
 HoverTime
 MaskColor
 Picture
 PictureAlignment
 TextAlignment

Methods:

ReleaseMouse
 TrackMouse


PowerForm Control

See also: SubClasser object, Controls

The PowerForm control encapsulates all of the functionality of a Subclasser object in an ActiveX control. However, unlike the SubClasser object, a PowerForm control can only subclass the window in which it is contained.

Events:

ActivateApp
 Click
 ClickControl
 Compacting
 DeactivateApp
 DestroyWindow
DisplayResolutionChange
DoubleClick
 HorizontalScroll
 Maximize
 Minimize
 MouseDown
 MouseDownControl
MouseEnter
 MouseEnterControl
MouseHover
 MouseHoverControl
MouseLeave
 MouseLeaveControl
MouseMove
MouseUp
 MouseUpControl
Moved
Moving
Resized
Resizing
 Restore
SettingChange
TimeChange
 TrapMessage
 VerticalScroll

Properties:

AllowSizingBottom
AllowSizingLeft
AllowSizingRight
AllowSizingTop
BorderThickness
CaptionButtonSize
CaptionHeight
ClientEdge
ContextHelpButton
DragButton
DragStartX
DragStartY
 GotMouse
 HorizontalScrollBarHeight
 HorizontalScrollPage
 HorizontalScrollPosition
 HoverTime
 hWnd
 MaxHorizontalScroll
 MaximizedHeight
MaximizedLeft
MaximizedTop
MaximizedWidth
 MaxVerticalScroll
 MinHeight
 MinHorizontalScroll
 MinVerticalScroll
 MinWidth
 Parent
PreviousMouseX
PreviousMouseY
 Resizable
 SizeGranularityX
 SizeGranularityY
 VerticalScrollBarWidth
 VerticalScrollPage
 VerticalScrollPosition
 ZOrder

Methods:

ControlFromHwnd
 ClearTrap
 SetTrap
 ReleaseMouse
 ScrollTo
 TrackMouse


Splitter Control

See also: Controls

The Splitter control is a two form container.

Events:

UnloadChildForm1
UnloadChildForm2

Properties:

AlignToClient
 ChildForm1
ChildForm2
 Orientation
 SplitterOffset


SubForm Control

See also: IFormFactory interface, Splitter control, Controls

The SubForm control is a container for other forms.

Properties:

AlignToClient
 ChildForm
 ChildFormFactory
 ChildFormInstance
 Columns
 HorizontalScrollPosition
 LeftColumn
 Rows
 TopRow
 VerticalScrollPosition
 View
 VisibleColumns
 VisibleRows

Methods:

ScrollTo
 ScrollToControl


Akemi Power Pack Classes

Classes

See also: Controls, Event Index, Property Index, Method and Function Index, Interfaces

Akemi Power Pack includes the following classes:

AkemiPowerPack.ocx
PowerPack
SubClasser
AkemiKeyState.dll
KeyState
AkemiFlatControls.ocx
FlatController


FlatController Object

See also: Classes, Controls, DirectionalButton control

The FlatController object is a global object, and there is no need to create an instance of this object as its single method is accessible globally.

Methods:

ShowPopupForm


KeyState Object

See also: Classes, Controls

The KeyState object is a global object which can be used to determine the state of various virtual keys.

Properties:

Control
Shift
Menu
LeftControl
LeftShift
LeftMenu
RightControl
RightShift
RightMenu

The LeftControl, LeftShift, and LeftMenu properties return boolean values indicating the state of the Control, Shift, and Menu buttons on the left-hand side of the keyboard (true = button is down, false = button is up).

The RightControl, RightShift, and RightMenu properties return the state of the corresponding buttons on the right-hand side of the keyboard.

The Control, Shift, and Menu properties can be used to indicate whether either button is down without distinguishing between left and right.

All of these properties are Read Only, and are available only at run-time.

Example:

Public Sub Form_Mouse_Down()
    If Button = vbRightButton Then
        'Show a popup menu in response to right-clicking on the form,
        'but only show the secret menu item if the shift key is down.
        mnumPopupSecretItem.Visible = KeyState.Shift
        PopupMenu mnumPopup
    End If
End Sub


PowerPack Object

See also: Classes, Controls

The PowerPack object is a global object, and there is no need to create an instance of this object as its single method is accessible globally.

Methods:

SubclassWindow


Subclasser Object

See also: PowerForm control

A Subclasser object is used to subclass a window using its hWnd, and change the operation of that window.

Events:

ActivateApp
 Click
 ClickChild
 Compacting
 DeactivateApp
DestroyWindow
DisplayResolutionChange
DoubleClick
 HorizontalScroll
KeyPress
 Maximize
 Minimize
MouseDown
 MouseDownChild
MouseEnter
 MouseEnterChild
MouseHover
 MouseHoverChild
MouseLeave
 MouseLeaveChild
MouseMove
MouseUp
 MouseUpChild
Moved
Moving
Resized
Resizing
 Restore
SettingChange
TimeChange
 TrapMessage
 VerticalScroll

Properties:

AllowSizingBottom
AllowSizingLeft
AllowSizingRight
AllowSizingTop
BorderThickness
CaptionButtonSize
CaptionHeight
ClientEdge
ContextHelpButton
DragButton
DragStartX
DragStartY
 GotMouse
 HorizontalScrollBarHeight
 HorizontalScrollPage
 HorizontalScrollPosition
 HoverTime
 hWnd
 MaxHorizontalScroll
 MaximizedHeight
MaximizedLeft
MaximizedTop
MaximizedWidth
 MaxVerticalScroll
 MinHeight
 MinHorizontalScroll
 MinVerticalScroll
MinWidth
 Parent
PreviousMouseX
PreviousMouseY
 Resizable
 SizeGranularityX
 SizeGranularityY
 VerticalScrollBarWidth
 VerticalScrollPage
 VerticalScrollPosition
 ZOrder

Methods:

ClearTrap
 SetTrap
 ReleaseMouse
 ScrollTo
 Subclass
TrackMouse


Event Index

See also: Controls, Classes, Property Index, Method and Function Index, Interfaces

ActivateApp
 Click
 ClickChild
 ClickControl
 Compacting
 DeactivateApp
 DestroyWindow
 DisplayResolutionChange
 DoubleClick
 HorizontalScroll
 Maximize
 Minimize
 MouseDown (Subclasser object and PowerForm control)
 MouseDown (Flat Controls)
 MouseDownChild
 MouseDownControl
 MouseEnter
 MouseEnterChild
 MouseEnterControl
 MouseHover
 MouseHoverChild
MouseHoverControl
MouseLeave (Subclasser object and PowerForm control)
 MouseLeave (Panel control)
 MouseLeave (HotButton control and DirectionalButton control)
 MouseLeaveChild
 MouseLeaveControl
MouseMove (Subclasser object and PowerForm control)
 MouseMove (Flat Controls)
 MouseUp (Subclasser object and PowerForm control)
 MouseUp (Flat Controls)
 MouseUpChild
MouseUpControl
 Moved
 Moving
 Resized
 Resizing
 Restore
 SettingChange
 TimeChange
 TrapMessage
 VerticalScroll
 UnloadChildForm1
UnloadChildForm2


ActivateApp Event

Applies to: Subclasser object, PowerForm control, Event Index
See also: DeactivateApp

Occurs when a top-level window is activated as a result of the focus being switched from another application.

Syntax:

Private Sub object_ActivateApp()

The ActivateApp event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

Typically, your application should perform the same actions in response to both Form_Activate and ActivateApp.

Example:

Private Sub Form_Activate()
    ActivateForm
End Sub

Private Sub PowerForm1_ActivateApp()
    ActivateForm
End Sub

Private Sub ActivateForm()
    'Write some code here to change the colours of various form components so that
    'it looks like the form has been activated.
End Sub


Click Event

Applies to: Subclasser object, PowerForm control, Panel control, HotButton control, DirectionalButton control
See also: ClickChild event, ClickControl event, Event Index

For the SubClasser and PowerForm controls, the Click event occurs when a mouse button is pressed whilst the mouse pointer is within the window subclassed by the SubClasser or PowerForm control, and is then released whilst the mouse pointer is within the same window.

For the Panel control, HotButton control, and DirectionalButton controls, the Click event occurs when the mouse button is clicked within the opaque region of the control.

Syntax:

Private Sub object_Click(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The Click event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.


ClickChild Event

Applies to: Subclasser object
See also: ClickControl event, Event Index

The ClickChild event occurs when the subclassed window has captured mouse input, and a mouse button is pressed whilst the mouse pointer is within a child window of the subclassed window and then released within the same window.

Syntax:

Private Sub object_ClickChild(ByVal hWndChild As Long, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The ClickChild event syntax has these parts:

Part | Description
object | The name of a SubClasser object, declared using WithEvents.
hWndChild | The handle of the child window in which the mouse button was clicked.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
Cancel | A boolean flag indicating whether to pass the WM_CLICK message which generated this event onto the child window. Setting this flag has no discernable effect.

Remarks:

The ClickChild event is only raised if the subclassed window has captured mouse input. To enable the ClickChild event, call TrackMouse in the MouseEnter event.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the Subclasser object to handle messages that would normally be processed by child windows.

Example:

'This example disables normal handling of mouse events
'by controls on the form, and outputs a message whenever
'the user clicks on a control on the form.

Option Explicit

Private WithEvents objmSubclasser As Subclasser

Private Sub Form_Load()
    'Subclass this form
    Set objmSubclasser = SubClassWindow(hWnd)
End Sub

Private Sub objmSubclasser_MouseEnter()
    'Capture mouse input to enable the ClickChild event.
    objmSubclasser.TrackMouse
 End Sub

Private Sub objmSubclasser_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)
    If Side = siChildWindow Then
         'Cancel the MouseLeave event if the mouse pointer
        'has entered a child window.  This will have the
        'effect of retaining mouse capture until the
        'mouse pointer leaves the SubClassed window
        'all together.
        Cancel = True
    End If
End Sub

Private Sub objmSubclasser_ClickChild(ByVal hWndChild As Long, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)
    Debug.Print "ClickChild"
End Sub


ClickControl Event

Applies to: PowerForm Control
See also: ClickChild Event, Event Index

The ClickControl event occurs when the subclassed window has captured mouse input, and a mouse button is clicked whilst the mouse pointer is within a control placed in the same container as the PowerForm control.

Syntax:

Private Sub object_ClickControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The ClickControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control that was clicked.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.

Remarks:

The ClickControl event is only raised if the control was added to the form at design time. Clicking on dynamically loaded controls will not generate a ClickControl event. The ClickChild event of the Subclasser object would be better suited to that task.

The ClickControl event is only raised if the subclassed window has captured mouse input. To enable the ClickControl event, call TrackMouse in the MouseEnter event.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the PowerForm control to handle messages that would normally be processed by child windows.

Example:

'This example disables normal handling of mouse events
'by controls on the form, and outputs a message whenever
'the user clicks on a control on the form.
Option Explicit

Private Sub PowerForm1_ClickControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)
    Debug.Print "ClickControl " & ctl.Name
End Sub

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the ClickControl event.
     PowerForm1.TrackMouse
 End Sub
Private Sub PowerForm1_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)
    If Side = siChildWindow Then
         'Cancel the MouseLeave event if the mouse pointer
        'has entered a child window.  This will have the
        'effect of retaining mouse capture until the
        'mouse pointer leaves the SubClassed window
        'all together.
        Cancel = True
    End If
End Sub


Compacting Event

Applies to: Subclasser object, PowerForm control
 See also: Event Index

Occurs when Windows is low on resources.

Syntax:

Private Sub object_Compacting()

The Compacting event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

Your application should respond to this message by flushing any cached data which is not currently needed.


DeactivateApp Event

Applies to: Subclasser object, PowerForm control
See also: ActivateApp

Occurs when a top-level window is activated as a result of the focus being switched from another application.

Syntax:

Private Sub object_ActivateApp()

The ActivateApp event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

Typically, your application should perform the same actions in response to both Form_Deactivate and DectivateApp.

Example:

Private Sub Form_Deactivate()
    DeactivateForm
End Sub

Private Sub PowerForm1_DeactivateApp()
    DeactivateForm
End Sub

Private Sub DeactivateForm()
    'Write some code here to change the colours of various form components so that
    'it looks like the form has been deactivated.
End Sub


DestroyWindow Event

Applies to: Subclasser object, PowerForm control
 See also: Event Index

Occurs when a window is about to be destroyed, but before the window is unsubclassed.

Syntax:

Private Sub object_DestroyWindow()

The DestroyWindow event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

If the subclassed window is a Visual Basic form, the DestroyWindow event occurs after the form has been unloaded.


DisplayResolutionChange Event

Applies to: Subclasser object, PowerForm control
See also: Resizing event, Resized event, Event Index

Occurs when the system's display resolution has changed. This event can occur when the display resolution has been changed by the user via the Display Control Panel, or when the display resolution has been changed by another application.

Syntax:

Private Sub object_DisplayResolutionChange()

The DisplayResolutionChange event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

It is generally preferable to re-position controls in response to the Resized event. If your form is maximized, the Form_Resize event and the Resized event will both fire when the display resolution is changed.

The DisplayResolutionChange event should only be handled if there are specific aspects of your user interface which rely on the screen resolution.

Use the intrinsic Screen object to determine the new screen resolution.

Example:

The following code snippet resets the maximized height of the form to always leave a 100 pixel gap below the form, even when the form is maximized.

Private Sub PowerForm1_DisplayResolutionChange()
    PowerForm1.MaximizedHeight = Screen.TwipsPerPixelY-100
End Sub


DoubleClick Event

Applies to: Subclasser object, PowerForm control
 See also: Click Event, Event Index

Occurs when a mouse button is double clicked in the subclassed window.

Syntax:

Private Sub object_DoubleClick(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The DoubleClick event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.


HorizontalScroll Event

Applies to: Subclasser object, PowerForm control
See also: VerticalScroll event, MinHorizontalScroll property, MaxHorizontalScroll property, HorizontalScrollPage property, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control is scrolled horizontally.

Syntax:

Private Sub object_HorizontalScroll(ByVal ScrollEvent As AkemiPowerPack.HorizontalScrollEvent, ByVal Position As Long, Cancel As Boolean)

The HorizontalScroll event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
ScrollEvent One of the following values:
  • hsEndScroll
  • hsFarLeft
  • hsFarRight
  • hsLeftOne
  • hsPageLeft
  • hsPageRight
  • hsRightOne
  • hsThumbPosition
  • hsThumbTrack
Position | The window's current horizontal scroll position.
Cancel | A flag indicating whether to cancel the scroll event.

Remarks:

It is up to the application to redraw the contents of the window in response to a scroll event.

It is not necessary to deal with the individual values of ScrollEvent, although doing so may improve performance.

Example:

The following snippet is a modified version of an event handler in the StandardScrollbars example. This modified version of the event handler will only redraw the grid when scrolling is finished, rather than redrawing the grid several times during the scroll operation, as in the actual example application.

Private Sub PowerForm1_HorizontalScroll(ByVal ScrollEvent As AkemiPowerPack.HorizontalScrollEvent, ByVal Position As Long, Cancel As Boolean)
    lmHorizontalScrollPos = Position

    'Draw the grid
    If ScrollEvent = hsEndScroll Then
        DrawGrid
    End If
End Sub

Further examples:

Standard Scroll Bars


Maximize Event

Applies to: Subclasser object, PowerForm control
See also: Minimize event, Restore event, Resized event, Resizing event, AllowSizingBottom property, AllowSizingLeft property, AllowSizingRight property, AllowSizingTop property, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control is maximized.

Syntax:

Private Sub object_Maximize(ByVal ClientWidth As Long, ByVal ClientHeight As Long)

The Maximize event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
ClientWidth | The width of the client area of the window, in pixels.
ClientHeight | The height of the licent area of the window, in pixels.

Remarks:

The Maximize event is fired irrespective of whether the form was maximized manually or in code.

Example:

SubForm - Continuous Forms View


Minimize Event

Applies to: Subclasser object, PowerForm control
See also: Maximize Event, Restore event, Resized event, Resizing event, AllowSizingBottom property, AllowSizingLeft property, AllowSizingRight property, AllowSizingTop property, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control is minimized.

Syntax:

Private Sub object_Minimize()

The Maximize event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

The Minimize event is fired irrespective of whether the form was minimized manually or in code.


MouseDownChild Event

Applies to: Subclasser object
See also: MouseDownControl event, MouseUpChild event, ClickChild event, MouseEnterChild event, MouseLeaveChild event, MouseEnter event, MouseLeave event, TrackMouse method, ReleaseMouse method, Event Index

The MouseDownChild event occurs when the subclassed window has captured mouse input, and a mouse button is pressed whilst the mouse pointer is within a child window of the subclassed window.

Syntax:

Private Sub object_MouseDownChild(ByVal hWndChild As Long, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The MouseDownChild event syntax has these parts:

Part | Description
object | The name of a SubClasser object, declared using WithEvents.
hWndChild | The handle of the child window in which the mouse button was pressed.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
Cancel | A boolean value indicating whether to cancel normal processing of the MouseDown event. Setting Cancel = True in response to a MouseDownChild event will alter the processing of normal MouseDown events, so that a double click will be interpreted by the control as a single MouseDown and other MouseDown events will be cancelled.

Remarks:

The MouseDownChild event is only raised if the subclassed window has captured mouse input. To enable the MouseDownChild event, call TrackMouse in the MouseEnter event.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the Subclasser object to handle messages that would normally be processed by child windows.

Example:

'This example disables normal handling of mouse events
'by controls on the form, and outputs a message whenever
'the user clicks on a control on the form.

Option Explicit

Private WithEvents objmSubclasser As Subclasser

Private Sub Form_Load()
    'Subclass this form
    Set objmSubclasser = SubClassWindow(hWnd)
End Sub

Private Sub objmSubclasser_MouseEnter()
    'Capture mouse input to enable the ClickChild event.
    objmSubclasser.TrackMouse
 End Sub

Private Sub objmSubclasser_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)
    If Side = siChildWindow Then
         'Cancel the MouseLeave event if the mouse pointer
        'has entered a child window.  This will have the
        'effect of retaining mouse capture until the
        'mouse pointer leaves the SubClassed window
        'all together.
        Cancel = True
    End If
End Sub

Private Sub objmSubclasser_MouseDownChild(ByVal hWndChild As Long, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)
    Debug.Print "MouseDownChild"
End Sub


MouseDownControl Event

Applies to: PowerForm Control
See also: MouseUpControl Event, MouseEnterControl Event, MouseLeaveControl Event, ControlFromHwnd Function, MouseDownChild Event, Event Index

The MouseDownControl event occurs when the subclassed window has captured mouse input, and a mouse button is pressed whilst the mouse pointer is within a control placed in the same container as the PowerForm control.

Syntax:

Private Sub object_MouseDownControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The MouseDownControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control that the mouse pointer was over when the button was pressed.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was pressed, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was pressed, relative to the top-left corner of the window or control.

Remarks:

The MouseDownControl event is only raised if the control was added to the form at design time. Pressing a mouse button over a dynamically loaded control will not generate a MouseDownControl event. The MouseDownChild event of the Subclasser object would be better suited to that task.

The MouseDownControl event is only raised if the subclassed window has captured mouse input.

To enable the MouseDownControl event, call TrackMouse in the MouseEnter event.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the PowerForm control to handle messages that would normally be processed by child windows.

Example:

'This example disables normal handling of mouse events
'by controls on the form, and outputs a message whenever
'the user presses a mouse button over a control on the form.
Option Explicit

Private Sub PowerForm1_MouseDownControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)
    Debug.Print "MouseDownControl " & ctl.Name
End Sub

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the MouseDownControl event.
     PowerForm1.TrackMouse
 End Sub
Private Sub PowerForm1_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)
    If Side = siChildWindow Then
         'Cancel the MouseLeave event if the mouse pointer
        'has entered a child window.  This will have the
        'effect of retaining mouse capture until the
        'mouse pointer leaves the SubClassed window
        'all together.
        Cancel = True
    End If
End Sub


MouseDown Event - Flat Controls

Applies to: Panel Control, HotButton Control, DirectionalButton Control
 See also: Click event, MouseUp event, Event Index

Occurs when a mouse button is pressed whilst the mouse pointer is within a Panel, HotButton, or DirectionalButton control.

Syntax:

Private Sub object_MouseDown(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The MouseDown event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
Button A value indicating which button was pressed. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was pressed, relative to the top-left corner of the control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was pressed, relative to the top-left corner of the control.


MouseDown Event - Subclasser and PowerForm

Applies to: SubClasser object, PowerForm control
 See also: MouseUp event, MouseEnter event, MouseEnterChild event, TrackMouse method, ReleaseMouse method, Event Index

Occurs when a mouse button is pressed whilst the mouse pointer is within a window subclassed by a Subclasser object or PowerForm control.

Syntax:

Private Sub object_MouseDown(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The MouseDown event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Button A value indicating which button was pressed. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window.
Cancel | A boolean value indicating whether the MouseDown event will be cancelled. Setting Cancel = True in response to a MouseDown event will prevent the subclassed window from processing the MouseDown event.

Remarks:

Cancelling the MouseDown event will prevent the window from processing the MouseDown event, but will not prevent the window from processing a Click event unless the MouseUp event is also cancelled.

Although an intrinsic Click event can be cancelled by cancelling both the MouseDown and MouseUp events, doing so will not prevent intrinsic DblClick events from being processed.


MouseEnter Event

Applies to: Subclasser object, PowerForm control, Panel Control, HotButton Control, DirectionalButton Control
See also: MouseHover event, MouseLeave event, HoverTime property, TrackMouse method, Event Index

Occurs when the mouse pointer enters the client area of the window subclassed by a Subclasser object or PowerForm control, or enters the opaque region of a Panel, HotButton, or DirectionalButton control..

Syntax:

Private Sub object_MouseEnter()

The MouseEnter event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Examples:

Mouse Roll Over Using Standard Controls

Mouse Roll Over (Hard Way)


MouseEnterChild Event

Applies to: Subclasser object
See also:

The MouseEnterChild event occurs when the subclassed window has captured mouse input, and the mouse pointer moves into a child window of the subclassed window.

Syntax:

Private Sub object_MouseEnterChild(ByVal hWndChild As Long)

The MouseDownChild event syntax has these parts:

Part | Description
object | The name of a SubClasser object, declared using WithEvents.
hWndChild | The handle of the child window into which the mouse pointer has moved.

Remarks:

The MouseEnterChild event is only raised if the subclassed window has captured mouse input. To enable the MouseEnterChild event, call TrackMouse in the MouseEnter event.

The subclassed window will lose mouse capture when the mouse pointer enters a child window. However, this will not prevent a MouseLeaveChild event from being raised when the mouse pointer re-enters the subclassed window.

Example:

'Because the Subclasser object relinquishes
'mouse input capture when the mouse pointer
'enters a child control, the following example
'will not interfere with normal mouse events
'generated by controls on the form.
Option Explicit

 Private Sub Form_Load()
    Set objmSubclasser = SubClassWindow(hWnd)
End Sub

Private Sub objmSubclasser_MouseEnter()
    'Capture mouse input
    objmSubclasser.TrackMouse
End Sub

Private Sub objmSubclasser_MouseEnterChild(ByVal hWndChild As Long)
    Debug.Print "EnterChild"
End Sub

Private Sub objmSubclasser_MouseLeaveChild(ByVal hWndChild As Long)
    Debug.Print "LeaveChild"
End Sub

Further examples:

Mouse Roll Over (Hard Way)


MouseEnterControl Event

Applies to: PowerForm Control
See also: MouseLeaveControl event, MouseEnterChild event, TrackMouse method, ReleaseMouse method, Event Index

The MouseEnterControl event occurs when the subclassed window has captured mouse input, and the mouse pointer moves over a control placed in the same container as the PowerForm control.

Syntax:

Private Sub object_MouseDownControl(ctl As Object)

The MouseEnterControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control over which the mouse pointer has moved.

Remarks:

The MouseEnterControl event is only raised if the control was added to the form at design time. Moving the mouse pointer over a dynamically loaded control will not generate a MouseEnterControl event. The MouseEnterChild event of the Subclasser object would be better suited to that task.

The MouseEnterControl event is only raised if the subclassed window has captured mouse input.

To enable the MouseEnterControl event, call TrackMouse in the MouseEnter event.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the PowerForm control to handle messages that would normally be processed by child windows.

Example:

'Because the PowerForm control relinquishes
'mouse input capture when the mouse pointer
'enters a child control, the following example
'will not interfere with normal mouse events
'generated by controls on the form.
Option Explicit

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the MouseEnterControl,
    'and MouseLeaveControl events.
     PowerForm1.TrackMouse
 End Sub
Private Sub PowerForm1_MouseEnterControl(ctl As Object)
    Debug.Print "MouseEnter " & ctl.Name
End Sub

Private Sub PowerForm1_MouseLeaveControl(ctl As Object)
    Debug.Print "MouseLeave " & ctl.Name
End Sub

Further examples:

Mouse Roll Over Using Standard Controls


MouseHover Event

Applies to: Subclasser object, PowerForm control, Panel Control, HotButton Control, DirectionalButton Control
See also: MouseEnter event, MouseLeave event - Subclasser and PowerForm, MouseLeave event - Panel, MouseLeave event - HotButton and DirectionalButton, Event Index

For Subclasser objects and PowerForm controls, the MouseHover event occurs when the mouse pointer moves within the subclassed window and remains within the subclassed window for the number of milliseconds determined by the HoverTime property.

For Panel, HotButton, and DirectionalButton controls, the MouseHover event occurs when the mouse pointer moves into the opaque region of the control and remains within the opaque region of the control for the number of milliseconds determined by the control's HoverTime property.

Syntax:

Private Sub object_MouseHover()

The MouseHover event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a Subclasser object, then the object must be declared using WithEvents.

Remarks:

The MouseHover event is enabled by default for the Panel, HotButton, and DirectionalButton controls. To enable the MouseHover event for a Subclasser object or PowerFormControl, call TrackMouse in response to the MouseEnter event.

Examples:

Flat Demo 1

Flat Demo 2


MouseHoverChild Event

Applies to: Subclasser object
See also: MouseEnterChild event, MouseLeaveChild event, MouseHoverControl event, Event Index

The MouseHoverChild event occurs when the subclassed window has captured mouse input, and the mouse pointer moves into a child window of the subclassed window, and remains within that child window for the number of milliseconds determined by the HoverTime property of the Subclasser object.

Syntax:

Private Sub object_MouseHoverChild(ByVal hWndChild As Long)

The MouseHoverChild event syntax has these parts:

Part | Description
object | The name of a SubClasser object, declared using WithEvents.
hWndChild | The handle of the child window into which the mouse pointer has moved.

Remarks:

The MouseEnterChild event is only raised if the subclassed window has captured mouse input. To enable the MouseEnterChild event, call TrackMouse in the MouseEnter event.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the Subclasser object to handle messages that would normally be processed by child windows.

Refer to the MouseDownChild example to see how to do this.

Further examples:

Mouse Roll Over (Hard Way)


MouseHoverControl Event

Applies to: PowerForm Control
See also: MouseEnterControl event, MouseLeaveControl event, MouseHoverChild event, Event Index

The MouseHoverControl event occurs when the mouse pointer moves within a control placed in the same container as the PowerForm control, and the subclassed window does not have mouse input capture, and the mouse pointer remains over the child control for the number of milliseconds determined by the PowerForm control's HoverTime property.

Syntax:

Private Sub object_MouseHoverControl(ctl As Object)

The MouseDownControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control over which the mouse pointer is hovering.

Remarks:

The MouseHoverControl event is only raised if the control was added to the form at design time. Holding the mouse pointer over a dynamically loaded control will not generate a MouseHoverControl event. The MouseHoverChild event of the Subclasser object would be better suited to that task.

The MouseHoverControl event is only raised if the PowerForm control has relinquished mouse input.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control. It is possible to override this default behaviour by cancelling the MouseLeave event. To do so, when the mouse pointer enters a child window, will disable the MouseHoverControl event.

Example:

'This example will output a message to the debug window,
'when the mouse pointer enters a control on the form,
'when it is held over the control for 1 second (default
'HoverTime), and when the mouse pointer leaves the
'control.

'Because mouse input capture is relinquished when the
'mouse pointer enters a control, this example does not
'interfere with normal mouse events generated by controls
'on the form.
Option Explicit

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the MouseEnterControl,
    'and MouseLeaveControl events.
    PowerForm1.TrackMouse
End Sub

Private Sub PowerForm1_MouseEnterControl(ctl As Object)
    Debug.Print "MouseEnterControl " & ctl.Name
End Sub

Private Sub PowerForm1_MouseHoverControl(ctl As Object)
    Debug.Print "MouseHoverControl " & ctl.Name
End Sub

Private Sub PowerForm1_MouseLeaveControl(ctl As Object)
    Debug.Print "MouseLeaveControl " & ctl.Name
End Sub

Further examples:

Mouse Roll Over Using Standard Controls


MouseLeaveChild Event

Applies to: Subclasser object
See also: MouseEnterChild Event, MouseLeaveControl Event, Event Index

The MouseEnterChild event occurs when the mouse pointer leaves a child window of the subclassed window.

Syntax:

Private Sub object_MouseLeaveChild(ByVal hWndChild As Long)

The MouseLeaveChild event syntax has these parts:

Part | Description
object | The name of a Subclasser object, declared using WithEvents.
hWndChild | The handle of the child window into which the mouse pointer has moved.

Remarks:

The MouseLeaveChild event is only raised if the subclassed window does not have mouse input capture, and a MouseEnter event was previously raised for the same child window. To enable the MouseEnterChild event, call TrackMouse in the MouseEnter event.

The subclassed window will lose mouse capture when the mouse pointer enters a child window, thus enabling the MouseLeaveChild event.

Example:

'Because the Subclasser object relinquishes
'mouse input capture when the mouse pointer
'enters a child control, the following example
'will not interfere with normal mouse events
'generated by controls on the form.
Option Explicit

 Private Sub Form_Load()
    Set objmSubclasser = SubClassWindow(hWnd)
End Sub

Private Sub objmSubclasser_MouseEnter()
    'Capture mouse input.
    objmSubclasser.TrackMouse
End Sub

Private Sub objmSubclasser_MouseEnterChild(ByVal hWndChild As Long)
    Debug.Print "EnterChild"
End Sub

Private Sub objmSubclasser_MouseLeaveChild(ByVal hWndChild As Long)
    Debug.Print "LeaveChild"
End Sub

Further examples:

Mouse Roll Over (Hard Way)


MouseLeaveControl Event

Applies to: PowerForm Control
See also: MouseEnterControl Event, MouseHoverControl Event, MouseLeaveChild Event, Event Index

The MouseLeaveControl event occurs when the mouse pointer leaves a control placed in the same container as the PowerForm control.

Syntax:

Private Sub object_MouseLeaveControl(ctl As Object)

The MouseLeaveControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control that the mouse pointer has moved away from.
Cancel | A boolean value indicating whether to cancel normal processing of the MouseDown event. Setting Cancel = True in response to a MouseDownControl event will alter the processing of normal MouseDown events, so that a double click will be interpreted by the control as a single MouseDown and other MouseDown events will be cancelled.

Remarks:

The MouseLeaveControl event is only raised if the control was added to the form at design time. Moving the mouse pointer away from a dynamically loaded control will not generate a MouseLeaveControl event. The MouseLeaveChild event of the Subclasser object would be better suited to that task.

The MouseLeaveControl event is only raised if the if the subclassed window does not have mouse input capture, and a MouseEnterControl event was previously raised for the same control.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control. It is possible to override this default behaviour by cancelling the MouseLeave event. To do so, when the mouse pointer enters a child window, will disable the MouseLeaveControl event.

Example:

'Because the PowerForm control relinquishes
'mouse input capture when the mouse pointer
'enters a child control, the following example
'will not interfere with normal mouse events
'generated by controls on the form.
Option Explicit

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the MouseEnterControl,
    'and MouseLeaveControl events.
    PowerForm1.TrackMouse
End Sub

Private Sub PowerForm1_MouseEnterControl(ctl As Object)
    Debug.Print "MouseEnter " & ctl.Name
End Sub

Private Sub PowerForm1_MouseLeaveControl(ctl As Object)
    Debug.Print "MouseLeave " & ctl.Name
End Sub

Further examples:

Mouse Roll Over Using Standard Controls


MouseLeave Event - HotButton and DirectionalButton

Applies to: HotButton Control, DirectionalButton Control
See also: MouseHover event, MouseLeave event, HoverTime property, TrackMouse method, Event Index

Occurs when the mouse pointer leaves the client area of the window subclassed by a Subclasser object or PowerForm control, or leaves the opaque region of a Panel, HotButton, or DirectionalButton control..

Syntax:

Private Sub object_MouseLeave(ByVal Side As AkemiFlatControls.SideConstants)

The MouseLeave event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
Side A value indicating which side of the window the mouse pointer is leaving by. Side can be any one of the following values:
  • siBottom
  • siTop
  • siLeft
  • siRight
  • siChildWindow
  • siNoneOfTheAbove

Remarks:

The Side parameter must be qualified with the library name (as shown above) if both AkemiPowerPack.ocx and AkemiFlatControls are referenced by your project, because both libraries define a SideConstants type.

The SideConstants enumerated type contains the following additional values which are not used in the MouseLeave event:

  • siBottomLeft
  • siBottomRight
  • siTopLeft
  • siTopRight

If the mouse leaves via the corner of a Panel control, the MouseLeave event will be raised with Side equal to one of siBottom, siTop, siLeft, or siRight.

If the mouse leaves the Panel by entering a control contained on the Panel, the MouseLeave event will be raised with Side equal to siChildWindow.

If the mouse capture is released programatically, the MouseLeave event will be raised with Side equal to siNoneOfTheAbove.

Unlike the MouseLeave event for the Panel control, the MouseLeave event for the HotButton control and DirectionalButton control cannot be cancelled.


MouseLeave Event - Panel

Applies to: Panel Control
See also: MouseHover event, MouseLeave event, HoverTime property, TrackMouse method, Event Index

Occurs when the mouse pointer leaves the opaque region of a Panel control.

Syntax:

Private Sub object_MouseLeave(ByVal Side As AkemiFlatControls.SideConstants, Cancel As Boolean)

The MouseLeave event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
Side A value indicating which side of the window the mouse pointer is leaving by. Side can be any one of the following values:
  • siBottom
  • siTop
  • siLeft
  • siRight
  • siChildWindow
  • siNoneOfTheAbove
Cancel | A boolean value indicating whether normal processing of the MouseLeave event will be cancelled.

Remarks:

The Side parameter must be qualified with the library name (as shown above) if both AkemiPowerPack.ocx and AkemiFlatControls are referenced by your project, because both libraries define a SideConstants type.

The SideConstants enumerated type contains the following additional values which are not used in the MouseLeave event:

  • siBottomLeft
  • siBottomRight
  • siTopLeft
  • siTopRight

If the mouse leaves via the corner of a Panel control, the MouseLeave event will be raised with Side equal to one of siBottom, siTop, siLeft, or siRight.

If the mouse leaves the Panel by entering a control contained on the Panel, the MouseLeave event will be raised with Side equal to siChildWindow.

If the mouse capture is released programatically, the MouseLeave event will be raised with Side equal to siNoneOfTheAbove.

Setting Cancel = True in response to a MouseLeave event will prevent the Panel from losing mouse input. As a consequence, the Panel will receive mouse input that would otherwise be directed at other windows (including contained controls).

If the MouseLeave event is cancelled, the Panel control will continue to receive MouseLeave messages for as long as the mouse pointer remains outside Panel, or until the MouseLeave message is not cancelled.


MouseLeave Event - Subclasser and PowerForm

Applies to: Subclasser object, PowerForm control
See also: MouseHover event, MouseLeave event, HoverTime property, TrackMouse method, Event Index

Occurs when the mouse pointer leaves the client area of the window subclassed by a Subclasser object or PowerForm control, or leaves the opaque region of a Panel, HotButton, or DirectionalButton control..

Syntax:

Private Sub object_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)

The MouseLeave event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a Subclasser object, then the object must be declared using WithEvents.
Side A value indicating which side of the window the mouse pointer is leaving by. Side can be any one of the following values:
  • siBottom
  • siTop
  • siLeft
  • siRight
  • siChildWindow
  • siNoneOfTheAbove
Cancel | A boolean value indicating whether normal processing of the MouseLeave event will be cancelled.

Remarks:

The Side parameter must be qualified with the library name (as shown above) if both AkemiPowerPack.ocx and AkemiFlatControls are referenced by your project, because both libraries define a SideConstants type.

The SideConstants enumerated type contains the following additional values which are not used in the MouseLeave event:

  • siBottomLeft
  • siBottomRight
  • siTopLeft
  • siTopRight

If the mouse leaves via the corner of a window, the MouseLeave event will be raised with Side equal to one of siBottom, siTop, siLeft, or siRight.

If the mouse leaves the subclassed window by entering a child window, the MouseLeave event will be raised with Side equal to siChildWindow.

If the mouse capture is released programatically, the MouseLeave event will be raised with Side equal to siNoneOfTheAbove.

Setting Cancel = True in response to a MouseLeave event will prevent the subclassed window from losing mouse input. As a consequence, the subclassed window will receive mouse input that would otherwise be directed at other windows (including child windows).

If the MouseLeave event is cancelled, the Subclasser object or PowerForm control will continue to receive MouseLeave messages for as long as the mouse pointer remains outside the subclassed window, or until the MouseLeave message is not cancelled.

Retaining mouse input capture by cancelling MouseLeave events will enable the MouseDownChild, MouseDownControl, MouseUpChild, MouseUpControl, ClickChild, and ClickControl events, and will disable the MouseHoverChild, MouseHoverControl, MouseLeaveChild, and MouseLeaveControl events.


MouseMove Event - Flat Controls

Applies to: Panel control, HotButton control, DirectionalButton control
See also: MouseEnter event, MouseLeave event - Panel, MouseLeave event - HotButton and DirectionalButton, Event Index

Occurs when the mouse pointer moves, whilst over the subclassed window.

Syntax:

Private Sub object_MouseMove(ByVal Shift As Boolean, ByVal Control As Boolean, ByVal X As Long, ByVal Y As Long)

The MouseMove event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer.
y | The y coordinate (in pixels) of the mouse pointer.


MouseMove Event - Subclasser and PowerForm

Applies to: SubClasser object, PowerForm control
 See also: MouseEnter Event, MouseLeave Event, Event Index

Occurs when the mouse pointer moves, whilst over the subclassed window.

Syntax:

Private Sub object_MouseMove(ByVal Shift As Boolean, ByVal Control As Boolean, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)

The MouseMove event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer.
y | The y coordinate (in pixels) of the mouse pointer.
Cancel | A boolean value indicating whether the MouseMove event will be cancelled. Setting Cancel = True in response to a MouseDown event will prevent the subclassed window from processing the MouseMove event.

Remarks:

The PreviousMouseX and PreviousMouseY properties can be used within the MouseMove event.

If a mouse button is down, and was pressed whilst the mouse pointer was within the subclassed window, then the DragButton property will be one of vbLeftButton, vbRightButton, or vbMiddleButton.


MouseUpChild Event

Applies to: Subclasser object
See also:

The MouseDownChild event occurs when the subclassed window has captured mouse input, and a mouse button is pressed whilst the mouse pointer is within a child window of the subclassed window.

Syntax:

Private Sub object_MouseUpChild(ByVal hWndChild As Long, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The MouseDownChild event syntax has these parts:

Part | Description
object | The name of a SubClasser object, declared using WithEvents.
hWndChild | The handle of the child window in which the mouse button was pressed.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window or control.
Cancel | A boolean value indicating whether to cancel normal processing of the MouseDown event. Setting Cancel = True in response to a MouseDownChild event will alter the processing of normal MouseDown events, so that a double click will be interpreted by the control as a single MouseDown and other MouseDown events will be cancelled.

Remarks:

The MouseUpChild event is only raised if the subclassed window has captured mouse input. To enable the MouseDownChild and MouseUpChild events, call TrackMouse in the MouseEnter event. This will disable normal processing of mouse messages by child windows, and will allow the Subclasser object to handle messages that would normally be processed by child windows.

Refer to the example given in MouseDownChild


MouseUpControl Event

Applies to: PowerForm Control
See also: MouseDownControl Event, Event Index

The MouseUpControl event occurs when the subclassed window has captured mouse input, and a mouse button is released whilst the mouse pointer is within a control placed in the same container as the PowerForm control.

Syntax:

Private Sub object_MouseUpControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The MouseDownControl event syntax has these parts:

Part | Description
object | The name of a PowerForm control.
ctl | A reference to the control that the mouse pointer was over when the button was pressed.
Button A value indicating which button was clicked. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was released, relative to the top-left corner of the window or control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was released, relative to the top-left corner of the window or control.

Remarks:

The MouseUpControl event is only raised if the control was added to the form at design time. Releasing a mouse button over a dynamically loaded control will not generate a MouseUpControl event. The MouseUpChild event of the Subclasser object would be better suited to that task.

The MouseUpControl event is only raised if the subclassed window has captured mouse input.

To enable the MouseDownControl and MouseUpControl events, call TrackMouse in the MouseEnter event.

By default, the PowerForm control will release mouse capture when the mouse pointer leaves the subclassed window or enters a child control.

In order to retain mouse input capture when the mouse pointer enters a child window, cancel any MouseLeave events where Side = siChildWindow. This will disable normal processing of mouse messages by child windows, and will allow the PowerForm control to handle messages that would normally be processed by child windows.

Example:

'This example disables normal handling of mouse events
'by controls on the form, and outputs a message whenever
'the user presses a mouse button over a control on the form.
Option Explicit

Private Sub PowerForm1_MouseEnter()
    'Call TrackMouse to enable the MouseDownControl,
    'and MouseLeave events.
    PowerForm1.TrackMouse
End Sub

Private Sub PowerForm1_MouseDownControl(ctl As Object, ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)
    Debug.Print "MouseDownControl " & ctl.Name
End Sub

Private Sub PowerForm1_MouseLeave(ByVal Side As AkemiPowerPack.SideConstants, Cancel As Boolean)
    If Side = siChildWindow Then
         'Cancel the MouseLeave event if the mouse pointer
        'has entered a child window.  This will have the
        'effect of retaining mouse capture until the
        'mouse pointer leaves the SubClassed window
        'all together.
        Cancel = True
    End If
End Sub


MouseUp Event - Flat Controls

Applies to: Panel Control, HotButton Control, DirectionalButton Control

Occurs when a mouse button is released whilst the mouse pointer is within a Panel, HotButton, or DirectionalButton control.

Syntax:

Private Sub object_MouseUp(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long)

The MouseUp event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
Button A value indicating which button was released. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was released, relative to the top-left corner of the control.
y | The y coordinate (in pixels) of the mouse pointer at the time it was released, relative to the top-left corner of the control.


MouseUp Event - Subclasser and PowerForm

Applies to: SubClasser object, PowerForm control
 See also: MouseDown event, Event Index

Occurs when a mouse button is released whilst the mouse pointer is within a window subclassed by a Subclasser object or PowerForm control.

Syntax:

Private Sub object_MouseUp(ByVal Button As MouseButtonConstants, ByVal Shift As Boolean, ByVal Control As Boolean, ByVal x As Long, ByVal y As Long, Cancel As Boolean)

The MouseUp event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Button A value indicating which button was released. Can be any one of the following values:
  • vbLeftButton
  • vbMiddleButton
  • vbRightButton
Shift | A boolean value indicating the state of the Shift key. A value of True indicates that one or both Shift keys are down.
Control | A boolean value indicating the state of the Control key. A value of True indicates that one or both Control keys are down
x | The x coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window.
y | The y coordinate (in pixels) of the mouse pointer at the time it was clicked, relative to the top-left corner of the window.
Cancel | A boolean value indicating whether the MouseUp event will be cancelled. Setting Cancel = True in response to a MouseUp event will prevent the subclassed window from processing the MouseUp event.

Remarks:

Cancelling the MouseDown event will prevent the window from processing the MouseDown event, but will not prevent the window from processing a Click event unless the MouseUp event is also cancelled.

Although a Click event can be cancelled by cancelling both the MouseDown and MouseUp events, doing so will not prevent DblClick events from being processed.


Moved Event

Applies to: Subclasser object, PowerForm control
See also: Moving event, Resizing event, Resizing event, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control has been moved by the user.

Syntax:

Private Sub object_Moved(ByVal NewLeft As Long, ByVal NewTop As Long)

The Moved event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
NewLeft | The distance, in pixels, from the left edge of the screen to the left edge of the dragging rectangle.
NewTop | The distance, in pixels, from the top edge of the screen to the top edge of the dragging rectangle.

Remarks:

The Moved event is only raised when the window has been manually moved. The Moved event is not raised if the window has been moved by code (eg by calling the form's Move method).

The Moved event is raised at the end of the moving operation, after the user has released the mouse button, irrespective of whether the current display settings include "Show window contents while dragging".

The values for NewLeft and NewTop cannot be modified in response to a Moved event. To prevent the user from moving the window into a particular position, the values for NewLeft and NewTop can be modified in response to the Moving event.


Moving Event

Applies to: Subclasser object, PowerForm control
See also: Moved Event, Resizing Event, Resized Event

Occurs when the window subclassed by a Subclasser object or PowerForm control is being moved by the user.

Syntax:

Private Sub object_Moving(NewLeft As Long, NewTop As Long)

The Moving event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
NewLeft | The distance, in pixels, from the left edge of the screen to the left edge of the dragging rectangle.
NewTop | The distance, in pixels, from the top edge of the screen to the top edge of the dragging rectangle.

Remarks:

The Moving event is only raised when the window is being manually moved. The Moving event is not raised if the window is moved by code (eg by calling the form's Move method).

Moving events are raised repeatedly, whilst the user drags the window by its title bar. When the user releases the mouse button, a Moved event is raised.

The values for NewLeft and NewTop can be modified in response to the Moving event, to prevent the user from moving the window into a particular area.


Resized Event

Applies to: Subclasser object, PowerForm control
See also: Resizing event, Minimize event, Maximize event, Restore event, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control has been resized by the user.

Syntax:

Private Sub object_Resized(ByVal ClientWidth As Long, ByVal ClientHeight As Long, ByVal NewWidth As Long, ByVal NewHeight As Long, ByVal Side As AkemiPowerPack.SideConstants)

The Moved event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
ClientWidth | The width, in pixels, of the client area of the window.
ClientHeight | The height, in pixels, of the client area of the window.
NewWidth | The width, in pixels, of the window, including any borders.
NewHeight | The height, in pixels, of the window, including any borders, and the title bar if present.
Side A value indicating which side was used to resize the window. Side may be any one of the following values:
  • siBottom
  • siTop
  • siLeft
  • siRight
  • siBottomLeft
  • siBottomRight
  • siTopLeft
  • siTopRight

Remarks:

The Side parameter must be fully qualified (as shown above) if both AkemiPowerPack.ocx and AkemiFlatControls.ocx are referenced in your project.

The SideConstants enumerated type includes the following additional values which are not used in the Resized event.
  • siChildWindow
  • siNoneOfTheAbove

The Resized event is only raised when the window has been manually resized. The Resized event is not raised if the window has been resized by code (eg by calling the form's Move method).

The Resized event is raised at the end of the resizing operation, after the user has released the mouse button, irrespective of whether the current display settings include "Show window contents while dragging".

The values for NewWidth and NewHeight cannot be modified in response to a Resized event. To modify the final size of the window, the values for NewWidth and NewHeight can be modified in response to the Resizing event.


Resizing Event

Applies to: Subclasser object, PowerForm control
See also: Resized Event, Moving Event, Moved Event, Minimize Event, Maximize Event, Restore Event

Occurs when the window subclassed by a Subclasser object or PowerForm control is being resized by the user.

Syntax:

Private Sub object_Resizing(NewWidth As Long, NewHeight As Long, ByVal Side As AkemiPowerPack.SideConstants)

The Resizing event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
NewWidth | The width, in pixels, of the window, including any borders.
NewHeight | The height, in pixels, of the window, including any borders, and the title bar if present.
Side A value indicating which side or corner is being used to resize the window. Side may be any one of the following values:
  • siBottom
  • siTop
  • siLeft
  • siRight
  • siBottomLeft
  • siBottomRight
  • siTopLeft
  • siTopRight
NewWidth | The width, in pixels, of the window, including any borders.
NewHeight | The height, in pixels, of the window, including any borders, and the title bar if present.

Remarks:

The Resizing event is only raised when the window is being manually resized. The Resizing event is not raised if the window is resized by code (eg by calling the form's Move method).

Resing events are raised repeatedly, whilst the user drags the window by its title bar. When the user releases the mouse button, a Resized event is raised.

The values for NewWidth and NewHeight can be modified in response to the Resizing event, to control the manner in which the window can be resized.


Restore Event

Applies to: Subclasser object, PowerForm control
See also: Minimize Event, Maximize Event, Resizing Event, Resized Event, Event Index

Occurs when the window subclassed by a Subclasser object or PowerForm control is restored to its original size after having been minimized or maximized, or the size of the window is altered programmatically.

Syntax:

Private Sub object_Restore(ByVal ClientWidth As Long, ByVal ClientHeight As Long)

The Restore event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
ClientWidth | The width of the client area of the window, in pixels.
ClientHeight | The height of the licent area of the window, in pixels.

Examples:

SubForm - Continuous Forms View


SettingChange Event

Applies to: Subclasser object, PowerForm control
See also: Resizing event, Resized event

Occurs when any display settings have changed. This event can occur when settings have been changed on the "Appearance" section of the Display Control Panel, or when the display settings have been changed by another application.

Syntax:

Private Sub object_SettingChange()

The SettingChange event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.


TimeChange Event

Applies to: Subclasser object, PowerForm control
See also: SettingChange event, DisplayResolutionChange event, Event Index

Occurs when time or date have been changed. This event can occur when the time has been changed via the Date/Time control panel, or when the time has been updated by another application.

Syntax:

Private Sub object_TimeChange()

The TimeChange event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.


TrapMessage Event

Applies to: Subclasser object, PowerForm control
See also: SetTrap method, ClearTrap method, Event Index

Occurs when the subclassed window receives a message for which a trap was previously set by a call to SetTrap.

Syntax:

Private Sub object_TimeChange(ByVal Message As Long, ByVal wParam As Long, ByVal lParam As Long, Cancel As Boolean)

The TrapMessage event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
Message | The uMsg for the message that has been trapped.
wParam | The wParam parameter for the message that has been trapped.
lParam | The lParam parameter for the message that has been trapped.
Cancel | A boolean value indicating whether normal processing of the message will be cancelled.


UnloadChildForm Event

UnloadChildForm1 and UnloadChildForm2 Events

Applies to: Splitter control
See also: ChildForm1 and ChildForm2 Properties, Event Index

The UnloadChildForm1 and UnloadChildForm2 events occur after a form contained in a Splitter control is unloaded.

Syntax:

Private Sub object_UnloadChildForm1()

Private Sub object_UnloadChildForm2()

The UnloadChildForm1 and UnloadChildForm2 event syntax have these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

If both the ChildForm1 and ChildForm2 properties of a Splitter control have been set, then if either contained form is unloaded, the other form will be resized to fill the splitter control, and an UnloadChildForm1 or UnloadChildForm2 event will be raised.


VerticalScroll Event

Applies to: Subclasser object, PowerForm control
See also: HorizontalScroll Event, MinVerticalScroll Property, MaxVerticalScroll Property, VerticalScrollPage Property

Occurs when the window subclassed by a Subclasser object or PowerForm control is scrolled vertically.

Syntax:

Private Sub object_HorizontalScroll(ByVal ScrollEvent As AkemiPowerPack.VerticalScrollEvent, ByVal Position As Long, Cancel As Boolean)

The VerticalScroll event syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.
ScrollEvent One of the following values:
  • vsEndScroll
  • vsTop
  • vsBottom
  • vsUpOne
  • vsDownOne
  • vsPageUp
  • vsPageDown
  • vsThumbPosition
  • vsThumbTrack
Position | The window's current vertical scroll position.
Cancel | A flag indicating whether to cancel the scroll event.

Remarks:

It is up to the application to redraw the contents of the window in response to a scroll event.

It is not necessary to deal with the individual values of ScrollEvent, although doing so may improve performance.

Example:

The following snippet is a modified version of an event handler in the StandardScrollbars example. This modified version of the event handler will only redraw the grid when scrolling is finished, rather than redrawing the grid several times during the scroll operation, as in the actual example application.

Private Sub PowerForm1_VerticalScroll(ByVal ScrollEvent As AkemiPowerPack.VerticalScrollEvent, ByVal Position As Long, Cancel As Boolean)
    lmVerticalScrollPos = Position

    'Draw the grid
    If ScrollEvent = vsEndScroll Then
        DrawGrid
    End If
End Sub

Further examples:

Standard Scroll Bars


Property Index

See also: Event Index, Classes, Controls, Method and Function Index, Interfaces

AlignToClient
 AllowSizingBottom
AllowSizingLeft
AllowSizingRight
AllowSizingTop
BackColor
 BackStyle
 BorderStyle
 BorderThickness
 Caption
 CaptionButtonSize
CaptionHeight
ChildForm
 ChildForm1
ChildForm2
 ChildFormFactory
 ChildFormInstance
 ClientEdge
 Columns
 ContextHelpButton
 Control
 DisabledPicture
DragButton
DragStartX
DragStartY
 Enabled
 FocusRect
 Font
 ForeColor
 GotMouse (Subclasser object and PowerForm control)
 GotMouse (Panel)
 HorizontalScrollBarHeight Property
 HorizontalScrollPage
 HorizontalScrollPosition Property
 HotBackColor
 HotBorderStyle
 HotForeColor
 HotPicture
 HoverTime
 hWnd
 LeftColumn
 LeftControl
LeftMenu
LeftShift
 MaskColor
 MaxHorizontalScroll
 MaximizedHeight
MaximizedLeft
MaximizedTop
MaximizedWidth
 MaxVerticalScroll
 Menu
 MinHeight
 MinHorizontalScroll
 MinVerticalScroll
MinWidth
 Orientation
 Parent
Picture
 PictureAlignment
PreviousMouseX
PreviousMouseY
 Resizable
 RightControl
RightMenu
RightShift
 Rows
 Shift
 Size
SizeGranularityX
 SizeGranularityY
 SplitterOffset
 TextAlignment
TopRow
 VerticalScrollBarWidth Property
 VerticalScrollPage
 VerticalScrollPosition Property
 View
 VisibleColumns
VisibleRows
 ZOrder


AlignToClient Property

Applies to: SubForm control, Splitter control, Panel control
 See also: Property Index

Determines whether the control will automatically resize to fill its container.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The control will automatically resize to fill its container.
False | The control will not automatically resize to fill its container

Remarks:

The AlignToClient property interacts with the intrinsic Align property. If the AlignToClient property is set to True, then the Align property should not be modified.


AllowSizingBottom Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingLeft, AllowSizingRight, AllowSizingTop, Resizable Property, Property Index

Determines whether the subclassed window can be resized using the bottom edge.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The form can be resized by dragging its bottom edge.
False | The form cannot be resized by dragging its top edge.

Remarks:

Use this property for forms with sizable borders (BorderStyle 2 or 5) to obtain finer control over the way the form can be resized. For instance, you may want to create a form which can be resized horizontally, but with a fixed height. This property is ignored for windows with non-sizable borders.

Example:

The following statement assumes that there is a PowerForm control called PowerForm1 placed on the form, and when executed, will prevent the form from being resized by dragging the bottom edge.

PowerForm1.AllowSizingBottom = False

Further Examples:

SubForm - Continuous Forms View


AllowSizingLeft Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingRight, AllowSizingBottom, AllowSizingTop, Resizable Property, Property Index

Determines whether the subclassed window can be resized using the left-hand edge.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The form can be resized by dragging its left edge.
False | The form cannot be resized by dragging its left edge.

Remarks:

Use this property for forms with sizable borders (BorderStyle 2 or 5) to obtain finer control over the way the form can be resized. For instance, you may want to create a form which can be resized horizontally, but with a fixed height. This property is ignored for windows with non-sizable borders.

Example:

The following statement assumes that there is a PowerForm control called PowerForm1 placed on the form, and when executed, will prevent the form from being resized by dragging the left edge.

PowerForm1.AllowSizingLeft = False

Further Examples:

SubForm - Continuous Forms View


AllowSizingRight Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingLeft, AllowSizingRight, AllowSizingBottom, Resizable Property, Property Index

Determines whether the subclassed window can be resized using the right-hand edge.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The form can be resized by dragging its right edge.
False | The form cannot be resized by dragging its right edge.

Remarks:

Use this property for forms with sizable borders (BorderStyle 2 or 5) to obtain finer control over the way the form can be resized. For instance, you may want to create a form which can be resized horizontally, but with a fixed height. This property is ignored for windows with non-sizable borders.

Example:

The following statement assumes that there is a PowerForm control called PowerForm1 placed on the form, and when executed, will prevent the form from being resized by dragging the right edge.

PowerForm1.AllowSizingRight = False

Further Examples:

SubForm - Continuous Forms View


AllowSizingTop Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingLeft, AllowSizingRight, AllowSizingBottom, Resizable Property, Property Index

Determines whether the subclassed window can be resized using the top edge.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The form can be resized by dragging its top edge.
False | The form cannot be resized by dragging its top edge.

Remarks:

Use this property for forms with sizable borders (BorderStyle 2 or 5) to obtain finer control over the way the form can be resized. For instance, you may want to create a form which can be resized horizontally, but with a fixed height. This property is ignored for windows with non-sizable borders.

Example:

The following statement assumes that there is a PowerForm control called PowerForm1 placed on the form, and when executed, will prevent the form from being resized by dragging the top edge.

PowerForm1.AllowSizingTop = False

Further Examples:

SubForm - Continuous Forms View


BackColor Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: HotBackColor Property, BackStyle Property, Property Index

For the Panel control, the BackColor property determines the background color of the panel.

For the HotButton control, and DirectionalButton control, the BackColor property determines the background color of the control when the mouse pointer is not over the control.

Read/write at both design-time and run-time.

Type:

OLE_COLOR

Remarks:

This property has no effect if the control's BackStyle property is opTransparent.


BackStyle Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: BackColor Property, Property Index

Determines the control's opacity.

Read/write at both design-time and run-time.

Type:

OpacityConstants

Settings:

Value | Meaning
opOpaque | The background of the control will be opaque.
opTransparent | The background of the control will be transparent.


BorderStyle Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: HotBorderStyle Property, Property Index

For the Panel control, the BorderStyle property determines the border style of the panel.

For the HotButton control, and DirectionalButton control, the BorderStyle property determines the border style of the control when the mouse pointer is not over the control.

Read/write at both design-time and run-time.

Type:

ThreeDBorderConstants

Settings:

Value | Meaning
tdbEmbossed | Embossed.
tdbEtched | Etched.
tdbNone | None.
tdbRaised | Raised.
tdbSolid | Solid (button shadow color is used).
tdbSunken | Sunken.

Remarks:

The default BorderStyle property for a Panel control is tdbRaised. The default BorderStyle property for a HotButton control or DirectionalButton control is tdbNone.

Further examples:

Flat Demo 2


BorderThickness Property

Applies to: SubClasser object, PowerForm control
See also: CaptionButtonSize property, CaptionHeight property, Property Index

Returns the thickness (in pixels) of the window border.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The window border width is a user setting which can be updated via the Display Control Panel. Use this property to maintain a consistent look and feel which responds to user preferences.

The BorderThickness property is not required when sizing or positioning controls. Instead, use the ScaleWidth and ScaleHeight properties of the form.

Example:

The following snippet assumes that there is a PictureBox control called PictureBox1, and a PowerForm control called PowerForm1. When executed, this line of code will resize the form so that the PictureBox fills the form, irrespective of the form's BorderStyle or ScaleMode properties.

Move Left, Top, ScaleX(Picture1.Width, ScaleMode, vbTwips) _
        + ScaleX(PowerForm1.BorderThickness * 2, vbPixels, vbTwips), _
    ScaleY(Picture1.Height, ScaleMode, vbTwips) _
        + ScaleY(PowerForm1.BorderThickness * 2 _
            + PowerForm1.CaptionHeight, vbPixels, vbTwips)


CaptionButtonSize Property

Applies to: SubClasser object, PowerForm control
See also: BorderThickness property, CaptionHeight property, Property Index

Returns the size (in pixels) of buttons in the window's caption (eg, the close, minimize, and maximize buttons).

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The size of buttons in a window's caption are dependant on the size of the caption, which in turn is a user setting which can be updated via the Display Control Panel. Use this property to resize buttons which need to have the same size as caption buttons in order to maintain a consistent look and feel which responds to user preferences.


Caption Property

Applies to: Panel control, HotButton control, DirectionalButton control
 See also: Property Index

Determines the text that is displayed in the control.

Read/Write at both design-time and run-time.

Type:

String


CaptionHeight Property

Applies to: Subclasser object, PowerForm control
See also: CaptionButtonSize property, BorderThickness property, Property Index

Returns the height (in pixels) of the window's caption.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The height of a window's caption bar is dependant on user settings which can be updated via the Display Control Panel. Use this property to maintain a consistent look and feel which responds to user preferences.

The CaptionHeight property is not required when sizing or positioning controls. Instead, use the ScaleWidth and ScaleHeight properties of the form.

Example:

The following snippet assumes that there is a PictureBox control called PictureBox1, and a PowerForm control called PowerForm1. When executed, this line of code will resize the form so that the PictureBox fills the form, irrespective of the form's BorderStyle or ScaleMode properties.

Move Left, Top, ScaleX(Picture1.Width, ScaleMode, vbTwips) _
        + ScaleX(PowerForm1.BorderThickness * 2, vbPixels, vbTwips), _
    ScaleY(Picture1.Height, ScaleMode, vbTwips) _
        + ScaleY(PowerForm1.BorderThickness * 2 _
            + PowerForm1.CaptionHeight, vbPixels, vbTwips)


ChildForm Property

Applies to: SubForm control
See also: ChildFormFactory Property, ChildFormInstance Property, Property Index

Determines which form is hosted by the SubForm control, when the SubForm's View property is vwSingleForm.

Read/Write at run-time. Not available at design-time.

Type:

Object

Remarks:

To host a form within the SubForm control, the BorderStyle of the intended child form should be set to 0 (none) at design-time.

If there will only ever be one instance of the host form, then the ChildForm property can be set to the intrinsic instance of the hosted form:

Set SubForm1.ChildForm = frmMyChildForm

If there will be multiple instances of the host form, then the ChildForm property can be set to a new instance of the hosted form::

Set SubForm1.ChildForm = New frmMyChildForm

Example:

SubForm - Single Form View


ChildForm1 and ChildForm2 Properties

Applies to: Splitter Control
See also: Orientation Property, Property Index

Determine which forms are hosted by a Splitter control.

Read/Write at run-time. Not available at design-time.

Type:

Object

Remarks:

A Splitter control can host only 1 or 2 child forms, and both are always hosted as single forms.

To host a form within the Splitter control, the BorderStyle of the intended child form should be set to 0 (none) at design-time.

If there will only ever be one instance of the host form, then the ChildForm property can be set to the intrinsic instance of the hosted form:

Set Splitter1.ChildForm1 = frmMyChildForm
Set Splitter1.ChildForm2 = frmMyOtherChildForm

If there will be multiple instances of the host form, then the ChildForm property can be set to a new instance of the hosted form::

Set SubForm1.ChildForm1 = New frmMyChildForm
Set SubForm1.ChildForm2 = New frmMyOtherChildForm

If the ChildForm1 property is set to Nothing, and the ChildForm2 property is not nothing, then the second child form will be resized to fill the entire splitter control. Likewise, if the ChildForm2 property is set to Nothing, and the ChildForm1 property is not nothing, then the first child form will be resized to fill the entire splitter control.

If one or other pane of the splitter control is to display continuous subforms, then place a SubForm control with View = vwContinuousForms onto a form, and then make that form the ChildForm2 (or ChildForm1) of the Splitter control.

Examples:

Splitter Demo 1

Splitter Demo 2


ChildFormFactory Property

Applies to: SubForm control
See also: View Property, ChildForm Property, IFormFactory Interface, Property Index

Determines which form factory is hosted by the SubForm control, when the SubForm's View property is vwContinuousForms or vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Object

Remarks:

To host continuous sub forms, or a grid of forms, within a SubForm control:

1. Create a Class Module or Form, which implements the IFormFactory interface.

2. At either design-time or run-time, set the Rows property to the number of rows to be displayed. For a grid of forms, also set the Columns property.

3. At run-time, set the ChildFormFactory property of the SubForm control to the form created in step 1, or a new instance of the class created in step 1 if IFormFactory is implemented in a Class Module:

Set SubForm1.ChildFormFactory = New clsMyChildFormFactory.

If the hosting form will only ever host instances of a single child form, the IFormFactory interface can be implemented in the hosting form's module. If the hosting form will host instances of multiple forms, then the IFormFactory interface is best implemented in a separate class module.

Although the IFormFactory interface can be implemented in the code module of the Form class which the form factory will create, it is better not to do so, because multiple instances of the form class will be created and destroyed whenever the number of rows/columns changes, whereas typically, only one instance of the form factory will be needed (or only one form factory per hosting form).

The SubForm control will create and load new instances of child forms, by calling the GetFormInstance method exposed by the factory class, whenever new rows or columns are scrolled into view. Child forms which are scrolled out of view are unloaded.

Examples:

SubForm - Continuous Forms View

SubForm - Grid Of Forms View


ChildFormInstance Property

Applies to: SubForm control
See also: IFormFactory Interface, ChildFormFactory Property, View Property, Property Index

Retrieves an instance of a child form hosted by the SubForm control, when the SubForm's View property is vwContinuousForms or vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Object

Remarks:

The ChildFormInstance property will only return an instance of a child form, if the specified row and column are visible. Otherwise, the return value will be Nothing.

Set SubForm1.ChildFormFactory = new clsMyChildFormFactory.


ClientEdge Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingLeft, AllowSizingRight, AllowSizingTop, Property Index

Determines whether the subclassed window has a sunken edge.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The form has a sunken edge when used as a child form.
False | The form does not have a sunken edge when used as a child form.

Remarks:

Use this property to give child forms or custom controls a sunken 3d appearance. Although this property can be set at design time, the effect is not visible until run-time. The effect is not visible on a top-level window, unless the window has a scroll bar.

Although the ClientEdge property can be modified at run-time, doing so will not have any effect unless

  • The ClientEdge property is modified during the Form_Load event.
  • OR the ClientEdge property is modified prior to modifying the MaxHorizontalScroll or MaxVerticalScroll property.

Examples:

Splitter Demo 1


Columns Property

Applies to: SubForm control
See also: View property, ChildFormFactory property, Rows property, VisibleColumns property, Property Index

Determines the number of columns displayed in a SubForm whose View property is vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long

Remarks:

The number of rows and columns can be changed at run-time.

Refer to the ChildFormFactory property, for further information.


ContextHelpButton Property

Applies to: SubClasser object, PowerForm control
See also: Property Index

Determines whether the subclassed window has a displays a context help button.

Read/Write at design-time. Read-Only at run-time.

Type:

Boolean

Settings:

Value | Meaning
True | A context help button is visible in the window's caption bar. (given the conditions in the Remarks section below).
False | The window does not have a context help button.

Remarks:

This property only has an effect on windows with BorderStyle = 1 (fixed single) or BorderStyle = 3 (fixed dialog). The context help button is not visible at design-time.


Direction Property

Applies to: DirectionalButton control
See also: ShowPopupForm Method, Property Index

The Direction property determines the position and direction of the arrow drawn on a DirectionalButton control.

Read/write at both design-time and run-time.

Type:

DirectionConstants

Settings:

Value | Meaning
diRight (default) | Arrow to the right.
diLeft | Arrow to the left.
diUp | Arrow upwards.
diDown | Arrow downwards.

Remarks:

To display a pop-up form next to a DirectionalButton, call ShowPopupForm in response to the MouseHover event and/or the Click event.


DisabledPicture Property

Applies to: HotButton control, DirectionalButton control
See also: HotPicture Property, Picture Property, MaskColor Property, Property Index

The DisabledPicture property is the picture that will be drawn in the control, when the control is disabled.

Read/write at both design-time and run-time.

Type:

Picture

Remarks:

The DisabledPicture property is automatically set to a modified version of the HotPicture, whenever the HotPicture property is set.

If you want to design your own combination of Picture/DisabledPicture/HotPicture, set the HotPicture property first and the Picture and DisabledPicture properties second, so that your Picture and DisabledPicture properties overwrite the automatically generated Picture and DisabledPicture properties.


DragButton Property

Applies to: SubClasser object, PowerForm control
See also: DragStartX Property, DragStartY Property, Property Index

If the mouse is being dragged within the subclassed window, the DragButton property will return a value indicating which button is down, otherwise the DragButton property will return 0.

Read Only at run-time, not available at design-time.

Type:

MouseButtonConstants

Return Values:

Value | Meaning
vbLeftButton | Left mouse button
vbMiddleButton | Middle mouse button
vbRightButton | Right mouse button
0 | None of the above


DragStartX Property

Applies to: SubClasser object, PowerForm control
See also: DragButton Property, Property Index

Returns the X coordinate (in pixels) of the point where the most recent MouseDown event occurred.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The DragButton property should be examined to determine whether a drag operation is currently in progress, prior to reading the DragStartX or DragStartY property.


DragStartY Property

Applies to: SubClasser object, PowerForm control
See also: DragButton Property, Property Index

Returns the Y coordinate (in pixels) of the point where the most recent MouseDown event occurred.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The DragButton property should be examined to determine whether a drag operation is currently in progress, prior to reading the DragStartX or DragStartY property.


Enabled Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: DisabledPicture Property, Property Index

Determines whether the control is enabled.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The control is enabled.
False | The control is disabled.

Remarks:

When a Panel control is disabled, it will not track mouse input, and the MouseEnter, MouseLeave, MouseHover, MouseEnterControl, MouseLeaveControl, and MouseHoverControl events will not be fired. However, mouse input can be explicitly captured by calling TrackMouse.

When a HotButton or DirectionalButtonControl is disabled, the MouseEnter, MouseLeave, and MouseHover events will not be fired. Also, the control will display the picture specified by the DisabledPicture property. If the DisabledPicture has not been set, the Picture property will be used instead.


FocusRect Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: Property Index

Determines whether a focus rectangle will be drawn when the control has the keyboard focus.

Read/Write at both design-time and run-time.

Type:

Boolean

Settings:

Value | Meaning
True | The control will display a focus rectangle when it has keyboard focus.
False | The control will not display a focus rectangle when it has keyboard focus.

Remarks:

Setting the FocusRect property to False will not prevent the control from receiving keyboard focus.

The focus rectangle gives visual feedback to the user as to which control currently has the keyboard focus. If the FocusRect property is set to false, then your application should give some indication as to which control has keyboard focus.


Font Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: Property Index

Determines the font that will be used to display the control's caption.

Read/write at both design-time and run-time.

Type:

Font


ForeColor Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: HotForeColor Property, BackColor Property, MaskColor Property

For the Panel control, the ForeColor property determines the color used to draw the control's caption when the control is enabled.

For the HotButton control, and DirectionalButton control, the ForeColor property determines the foreground color of the control, when the control is enabled, and the mouse pointer is not over the control.

Read/write at both design-time and run-time.

Type:

OLE_COLOR


GotMouse Property - Panel

Applies to: Panel Control
See also: MouseEnter Event, MouseLeave Event - Panel, Property Index

Returns a boolean value indicating whether the control has captured mouse input.

Read only at run-time. Not available at design-time.

Type:

Boolean

Return Values:

Value | Meaning
True | The control currently has mouse capture.
False | The control currently does not have mouse capture.

Remarks:

By default, mouse input is captured when the mouse pointer enters a Panel, and is released when the mouse pointer leaves the control, or when the mouse pointer moves over another control placed on or within the Panel.

Mouse input can be explicitly captured and released by calling TrackMouse and ReleaseMouse.


GotMouse Property - Subclasser and PowerForm

Applies to: SubClasser object, PowerForm control
See also: MouseEnter Event, MouseLeave Event - Subclasser and PowerForm, Property Index

Returns a boolean value indicating whether the subclassed window has captured mouse input.

Read only at run-time. Not available at design-time.

Type:

Boolean

Return Values:

Value | Meaning
True | The subclassed window currently has mouse capture.
False | The subclassed window currently does not have mouse capture.

Remarks:

By default, mouse input is captured when the mouse pointer enters the subclassed window, and is released when the mouse pointer leaves the window, or enters a child window.

Mouse input can be explicitly captured and released by calling TrackMouse and ReleaseMouse.


HorizontalScrollBarHeight Property

Applies to: SubClasser object, PowerForm control
See also: VerticalScrollBarWidth Property, BorderThickness property, CaptionHeight property, Property Index

Either returns the height (in pixels) of a window's horizontal scroll bar, or 0 if the window does not have a horizontal scroll bar.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The height of a window's horizontal scroll bar is determined by a user setting which can be updated via the Display Control Panel. If the window is a VB form, then the form's ScaleHeight property will be the height of the window's client area. If the window has a horizontal scroll bar, then the ScaleHeight property will be reduced by the height of the scroll bar.


HorizontalScrollPage Property

Applies to: SubClasser object, PowerForm control
See also: MinHorizontalScroll Property, MaxHorizontalScroll Property, HorizontalScroll Event, VerticalScrollPage Property, Property Index

Determines the increment that will be used when the subclassed window is scrolled by clicking in the area of the horizontal scroll bar, between the thumb and either of the arrows.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

The HorizontalScrollPage property must be set after the MaxHorizontalScroll has been set.


HorizontalScrollPosition Property

Applies to: SubClasser object, PowerForm control, SubForm control
See also: MinHorizontalScroll Property, MaxHorizontalScroll Property, Property Index

Sets or returns the position of the horizontal scroll bar.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

The HorizontalScrollPosition of a SubClasser object or PowerForm control must be between the values determined by the MinHorizontalScroll and MaxHorizontalScroll properties.

The HorizontalScrollPosition property of a SubForm control is only available if the SubForm's View property is vwSingleForm. If the SubForm's View property is vwContinuousForms or vwGridOfForms, then refer to the LeftColumn , TopRow, VisibleColumns, and VisibleRows properties.

The HorizontalScrollPosition property of a SubForm control represents the x coordinate on the child form, of the top-left corner of the visible area of the form. If the width of the child form is less than or equal to the width of the SubForm control, then this will correspond to the top-left corner of the child form (ie 0), and a horizontal scroll bar will not be displayed.


HotBackColor Property

Applies to: HotButton control, DirectionalButton control
See also: BackColor Property, HotForeColor Property, HotPicture Property, HotBorderStyle Property, Property Index

The BackColor property determines the background color of the control when the mouse pointer is over the control.

Read/write at both design-time and run-time.

Type:

OLE_COLOR

Remarks:

This property has no effect if the control's BackStyle property is opTransparent.


HotBorderStyle Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: BorderStyle Property, HotBackColor Property, HotForeColor Property, HotPicture Property, Property Index

The HotBorderStyle property determines the border style of the control, when the control is enabled and the mouse pointer is over the control.

Read/write at both design-time and run-time.

Type:

ThreeDBorderConstants

Settings:

Value | Meaning
tdbEmbossed | Embossed.
tdbEtched | Etched.
tdbNone | None.
tdbRaised (default) | Raised.
tdbSolid | Solid (button shadow color is used).
tdbSunken | Sunken.


HotForeColor Property

Applies to: HotButton control, DirectionalButton control
See also: ForeColor Property, HotBackColor Property, HotBorderStyle Property, HotPicture Property, Property Index

The HotForeColor property determines the foreground color of the control, when the control is enabled, and the mouse pointer is over the control.

Read/write at both design-time and run-time.

Type:

OLE_COLOR


HotPicture Property

Applies to: HotButton control, DirectionalButton control
See also: Picture Property, DisabledPicture Property, MaskColor Property, Property Index

The HotPicture property is the picture that will be drawn in the control, when the control is enabled, and the mouse pointer is over the control.

Read/write at both design-time and run-time.

Type:

Picture

Remarks:

Setting the HotPicture property will automatically update the Picture and Disabled picture properties with a modified version of the HotPicture property.

If you want to design your own combination of Picture/DisabledPicture/HotPicture, set the HotPicture property first and the Picture and DisabledPicture properties second, so that your Picture and DisabledPicture properties overwrite the automatically generated Picture and DisabledPicture properties.

Example:

Flat Demo 3


HoverTime Property

Applies to: Subclasser object, PowerForm control, Panel control, HotButton control, DirectionalButton control
See also:

Determines the number of milliseconds between the time when the mouse pointer enters a subclassed window, or Panel, HotButton, or DirectionalButton control, and the time when the MouseHover event will be raised.

For the Subclasser object and PowerForm control, the HoverTime property also determines the number of milliseconds between the time when the mouse pointer enters a child window or control, and the time when the MouseHoverChild or MouseHoverControl event will be raised.

Read/Write at design-time or run-time.

Type:

Long


hWnd Property

Applies to: Subclasser object, PowerForm control
See also: Property Index

Returns the handle of the window that is subclassed by a Subclasser object or PowerForm control.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

In the case of a PowerForm control, the hWnd property will return the same value as the hWnd property of the form or control on which the PowerForm control is sited.


LeftColumn Property

Applies to: SubForm control
See also: TopRow Property, Columns Property, View Property

Determines the column index of the left-most visible column of forms hosted by a SubFormControl, when the SubForm's View property is vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long


MaskColor Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: HotPicture property, Picture property, DisabledPicture property, MaskColor property, Property Index

Determines which color will identify transparent regions of the control.

Read/write at both design-time and run-time.

Type:

OLE_COLOR

Remarks:

The default value for MaskColor is &HFFFFFF, which is white. That is, pixels in the bitmap used as the Picture (and and HotPicture and DisabledPicture) property will be transparent when the control is drawn.

The MaskColor is also used whenever the Picture property and DisabledPicture properties are re-generated, as a result of setting the HotPicture property.

The MaskColor property should be set to the desired value prior to setting the HotPicture property, otherwise, transparent areas of the HotPicture, will be opaque in the Picture and DisabledPicture properties.

The Picture is displayed using a transparency mask, which is generated using the MaskColor property. Note that the transparency effect does not work correctly under Windows 95, if the Picture has more than 256 colors.


MaxHorizontalScroll Property

Applies to: SubClasser object, PowerForm control
See also: MinHorizontalScroll Property, MaxVerticalScroll Property, HorizontalScroll Event, HorizontalScrollPage Property, Property Index

Determines the maximum horizontal scroll bar position for the subclassed window.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

Setting the MaxHorizontalScroll property will add a standard Win32 scroll bar to the subclassed window. If both the MaxHorizontalScroll and MaxVerticalScroll properties are set to values greater than MinHorizontalScroll and MinVerticalScroll, and the window is resizable, then the window will display one of those little corner bits in addition to both scroll bars.

The value for MaxHorizontalScroll must be greater than the value for MinHorizontalScroll. If you are setting MinHorizontalScroll to a non-zero value, then the MaxHorizontalScroll property should be set first.


MaximizedHeight Property

Applies to: SubClasser object, PowerForm control
See also: MaximizedWidth Property, MinHeight Property, Property Index

Determines the height, in pixels, of the subclassed window when maximized.

Read/Write at both design-time and run-time.

Type:

Long

Settings:

Value | Meaning
0 | The MaximizedHeight property is ignored, and the window will take up the whole height of the screen when maximized.
<>0 | When maximized, the height of the form will be as specified by the MaximizedHeight property.

Remarks:

The MaximizedHeight property is the total height of the window when maximized, including the caption bar and border if applicable.

Setting the Maximized height property to a (non-zero) value that is less than the height of the screen, will mean that the form does not take up the whole height of the screen when maximized. This will not prevent the user from manually resizing the form to a larger size.

To prevent the window from being manually resized beyond a maximum height, handle the Resizing event.

Further examples:

SubForm - Continuous Forms View


MaximizedLeft Property

Applies to: SubClasser object, PowerForm control
See also: MaximizedTop Property, MaximizedWidth Property, Property Index

Determines the X coordinate, in pixels, of the top-left corner of the subclassed window when maximized.

Read/Write at both design-time and run-time.

Type:

Long

Remarks:

Setting the MaximizedLeft property to a non-zero value, will mean that the top-left corner of the form will not be aligned with the top-left corner of the screen, when the form is maximized. This will not prevent the user from manually moving the form to another location.

To control where the window can be manually moved, handle the Moving event.


MaximizedTop Property

Applies to: SubClasser object, PowerForm control
See also: MaximizedLeft Property, MaximizedHeight Property, Property Index

Determines the Y coordinate, in pixels, of the top-left corner of the subclassed window when maximized.

Read/Write at both design-time and run-time.

Type:

Long

Remarks:

Setting the MaximizedTop property to a non-zero value, will mean that the top-left corner of the form will not be aligned with the top-left corner of the screen, when the form is maximized. This will not prevent the user from manually moving the form to another location.

To control where the window can be manually moved, handle the Moving event.


MaximizedWidth Property

Applies to: SubClasser object, PowerForm control
See also: MaximizedHeight Property, MinWidth Property, Property Index

Determines the width, in pixels, of the subclassed window when maximized.

Read/Write at both design-time and run-time.

Type:

Long

Settings:

Value | Meaning
0 | The MaximizedWidth property is ignored, and the window will take up the whole width of the screen when maximized.
<>0 | When maximized, the width of the form will be as specified by the MaximizedWidth property.

Remarks:

The MaximizedWidth property is the total height of the window when maximized, including the border if applicable.

Setting the Maximized width property to a (non-zero) value that is less than the width of the screen, will mean that the form does not take up the whole width of the screen when maximized. This will not prevent the user from manually resizing the form to a larger size.

To prevent the window from being manually resized beyond a maximum width, handle the Resizing event.


MaxVerticalScroll Property

Applies to: SubClasser object, PowerForm control
See also: MinVerticalScroll property, MaxHorizontalScroll property, VerticalScrollPage property, VerticalScroll Event, Property Index

Determines the maximum vertical scroll bar position for the subclassed window.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

Setting the MaxVerticalScroll property will add a standard Win32 scroll bar to the subclassed window. If both the MaxHorizontalScroll and MaxVerticalScroll properties are set to values greater than MinHorizontalScroll and MinVerticalScroll, and the window is resizable, then the window will display one of those little corner bits in addition to both scroll bars.

The value for MaxVerticalScroll must be greater than the value for MinVerticalScroll. If you are setting MinVerticalScroll to a non-zero value, then the MaxVerticalScroll property should be set first.

Example:

Standard Scroll Bars


MinHeight Property

Applies to: SubClasser object, PowerForm control
See also: MinWidth property, MaximizedHeight property, Property Index

Determines the minimum height (in pixels) to which the subclassed window can be manually resized.

Read/Write at both design-time and run-time.

Type:

Long

Settings:

Value | Meaning
0 | The MinHeight property is ignored. If the form is resizable, it can be resized to the height of the caption bar plus the top and bottom border (that is, the client height will be 0).
<>0 | The form cannot be manually resized to a height less than MinHeight.

Remarks:

Setting the MinHeight property to a non-zero value will prevent the user from manually resizing the window to a height less than MinHeight. This will not prevent the form from being resized to a smaller height by code.

MinHeight refers to the minimum total height of the form, including the caption bar and border if applicable.

To set a minimum height for the client area, set MinHeight to the desired minimum client height plus the CaptionHeight property plus 2 times the BorderThickness property, and adjust this value in response to the SettingChange event.


MinHorizontalScroll Property

Applies to: SubClasser object, PowerForm control
See also: MaxHorizontalScroll property, MinVerticalScroll property, HorizontalScrollPage property, HorizontalScroll event, Property Index

Determines the minimum horizontal scroll bar position for the subclassed window.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

Setting the MaxHorizontalScroll property will add a standard Win32 scroll bar to the subclassed window. If both the MaxHorizontalScroll and MaxVerticalScroll properties are set to values greater than MinHorizontalScroll and MinVerticalScroll, and the window is resizable, then the window will display one of those little corner bits in addition to both scroll bars.

The value for MaxHorizontalScroll must be greater than the value for MinHorizontalScroll. If you are setting MinHorizontalScroll to a non-zero value, then the MaxHorizontalScroll property should be set first.

Example:

Standard Scroll Bars


MinVerticalScroll Property

Applies to: SubClasser object, PowerForm control
See also: MinHorizontalScroll property, MaxVerticalScroll property, VerticalScrollPage property, VerticalScroll event, Property Index

Determines the minimum vertical scroll bar position for the subclassed window.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

Setting the MaxVerticalScroll property will add a standard Win32 scroll bar to the subclassed window. If both the MaxHorizontalScroll and MaxVerticalScroll properties are set to values greater than MinHorizontalScroll and MinVerticalScroll, and the window is resizable, then the window will display one of those little corner bits in addition to both scroll bars.

The value for MaxVerticalScroll must be greater than the value for MinVerticalScroll. If you are setting MinVerticalScroll to a non-zero value, then the MaxVerticalScroll property should be set first.

Example:

Standard Scroll Bars


MinWidth Property

Applies to: SubClasser object, PowerForm control
See also: MinHeight Property, MaximizedWidth Property, Property Index

Determines the minimum width (in pixels) to which the subclassed window can be manually resized.

Read/Write at both design-time and run-time.

Type:

Long

Settings:

Value | Meaning
0 | The MinWidth property is ignored. If the form is resizable, it have the default minimum width.
<>0 | The form cannot be manually resized to a width less than MinWidth.

Remarks:

Setting the MinWidth property to a non-zero value will prevent the user from manually resizing the window to a width less than MinWidth. This will not prevent the form from being resized to a smaller width by code.

MinWidth refers to the minimum total width of the form, including the border if applicable.

To set a minimum width for the client area, set MinWidth to the desired minimum client width plus 2 times the BorderThickness property, and adjust this value in response to the SettingChange event.


Orientation Property

Applies to: Splitter Control
See also: SplitterOffset property, Property Index

Determines the orientation of a Splitter control.

Read/Write at both design-time and run-time.

Type:

SplitterOrientation

Settings:

Value | Meaning
SplitterHorizontal | ChildForm1 will be at the top. ChildForm2 will be at the bottom.
SplitterVertical | ChildForm1 will be on the left. ChildForm2 will be on the right.

Remarks:

If the ChildForm1 property is set to Nothing, and the ChildForm2 property is not nothing, then the second child form will be resized to fill the entire splitter control. Likewise, if the ChildForm2 property is set to Nothing, and the ChildForm1 property is not nothing, then the first child form will be resized to fill the entire splitter control.

Example:

Splitter Demo 1


Parent Property

Applies to: Subclasser object, PowerForm control
See also: hWnd property, Property Index

Returns the handle of the parent window of the window that is subclassed by a Subclasser object or PowerForm control. If the subclassed window is a top-level window, then the Parent property will return 0.

Read Only at run-time, not available at design-time.

Type:

Long


Picture Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: HotPicture property, DisabledPicture property, MaskColor property, Property Index

For the Panel control, the Picture property is the picture that will be drawn in the control.

For the HotButton control, and DirectionalButton control, the Picture property is the picture that will be drawn in the control, when the control is enabled, and the mouse pointer is not over the control.

Read/write at both design-time and run-time.

Type:

Picture

Remarks:

For HotButton and DirectionalButton controls, the Picture property is automatically set to a modified version of the HotPicture, whenever the HotPicture property is set.

If you want to design your own combination of Picture/DisabledPicture/HotPicture, set the HotPicture property first and the Picture and DisabledPicture properties second, so that your Picture and DisabledPicture properties overwrite the automatically generated Picture and DisabledPicture properties.

The Picture is displayed using a transparency mask, which is generated using the MaskColor property. Note that the transparency effect does not work correctly under Windows 95, if the Picture has more than 256 colors.


PictureAlignment Property

Applies to: Panel control, HotButton control
See also: TextAlignment property, Property Index

Determines where in the control, the picture will be displayed.

Read/write at both design-time and run-time.

Type:

PictureAlignmentConstants

Settings:

Value | Meaning
paCenter (default) | The picture will be displayed in the center of the control, with the text superimposed.
paLeft | The picture will be displayed on the left of the control, with the text to the right.
paRight | The picture will be displayed on the right of the control, with text to the left.
paTop | The picture will be displayed at the top of the control, with text beneath.
paBottom | The picture will be displayed at the bottom of the control, with text above.

Remarks:

The PictureAlignment property has no effect, if the Picture property is not set.

Example:

Flat Demo 2


PreviousMouseX Property

Applies to: SubClasser object, PowerForm control
See also: DragStartX property, DragButton property, MouseMove event - Subclasser and PowerForm, property Index

Returns the X coordinate (in pixels) of the mouse pointer's previous position.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The PreviousMouseX and PreviousMouseY properties can be examined in response to the MouseMove event.


PreviousMouseY Property

Applies to: SubClasser object, PowerForm control
See also: DragStartY property, DragButton property, MouseMove event - Subclasser and PowerForm

Returns the Y coordinate (in pixels) of the mouse pointer's previous position.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The PreviousMouseX and PreviousMouseY properties can be examined in response to the MouseMove event.


Resizable Property

Applies to: SubClasser object, PowerForm control
See also: AllowSizingBottom property, AllowSizingLeft property, AllowSizingRight property, AllowSizingTop property, Property Index

Indicates whether the subclassed window is resizable.

Read only at run-time, not available at design-time.

Type:

Boolean

Return values:

Value | Meaning
True | The form has a resizable border.
False | The form does not have a resizable border.

Remarks:

The resizable property indicates whether the window is drawn with a resizable border. If the window's AllowSizingLeft, AllowSizingRight, AllowSizingTop, and AllowSizingBottom properties are set to False, the window will not be resizable, even if it has a resizable border.

For this reason, caution should be taken in setting the AllowSizingLeft, AllowSizingRight, AllowSizingTop, and AllowSizingBottom properties, as a window that appears to be resizable but isn't, or can only be resizable on certain sides may cause confusion for the user, unless there is some other indication that the window cannot be resized.


Rows Property

Applies to: SubForm control
See also: View property, ChildFormFactory property, VisibleRows property, Property Index

Determines the number of rows displayed in a SubForm whose View property is vwContinuousForms or vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long

Remarks:

The number of rows and columns can be changed at run-time.

Refer to the ChildFormFactory property, for further information.


Size Property

Applies to: DirectionalButton control
See also: PictureAlignment property, Property Index

Determines the size of the arrow displayed by the control.

Read/write at both design-time and run-time.

Type:

Long


SizeGranularityX Property

Applies to: SubClasser object, PowerForm control
See also: MinWidth property, MinHeight property, Property Index

Determines the minimum number of pixels by which the subclassed window can be resized at a time in the horizontal direction..

Read/write at both design-time and run-time.

Type:

Long

Return values:

Value | Meaning
0 | The SizeGranularityX property is ignored.
<>0 | If the form is resizable, then, when being resized horizontally, the width of the form can only be incremented or decremented by SizeGranularityX pixels at a time.


SizeGranularityY Property

Applies to: SubClasser object, PowerForm control
See also: MinWidth property, MinHeight property, Property Index

Determines the minimum number of pixels by which the subclassed window can be resized at a time in the vertical direction..

Read/write at both design-time and run-time.

Type:

Long

Return values:

Value | Meaning
0 | The SizeGranularityY property is ignored.
<>0 | If the form is resizable, then, when being resized vertically, the height of the form can only be incremented or decremented by SizeGranularityY pixels at a time.


SplitterOffset Property

Applies to: Splitter Control
See also: Orientation property, Property Index

If the Orientation of the Splitter control is SplitterVertical, then the SplitterOffset property determines the distance (in pixels) from the left edge of the Splitter control to the splitter bar.

If the Orientation of the Splitter control is SplitterHorizontal, then the SplitterOffset property determines the distance (in pixels) from the top edge of the Splitter control to the splitter bar.

Type:

Long


TextAlignment Property

Applies to: Panel control, HotButton control, DirectionalButton control
See also: PictureAlignment property, Property Index

Determines the justification used to draw the control's caption.

Read/write at both design-time and run-time.

Type:

TextAlignmentConstants

Settings:

Value | Meaning
taCenter (default) | The text will be centered.
taLeft | The text will be left justified.
taRight | The text will be right justified.


TopRow Property

Applies to: SubForm control
See also: LeftColumn property, Rows property, Property Index

Determines the row index of the top-most visible column of forms hosted by a SubFormControl, when the SubForm's View property is vwContinuousForms or vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long


VerticalScrollBarWidth Property

Applies to: SubClasser object, PowerForm control
See also: HorizontalScrollBarHeight Property, BorderThickness property, CaptionHeight property, Property Index

Either returns the width (in pixels) of a window's vertical scroll bar, or 0 if the window does not have a vertical scroll bar.

Read Only at run-time, not available at design-time.

Type:

Long

Remarks:

The width of a window's vertical scroll bar is determined by a user setting which can be updated via the Display Control Panel. If the window is a VB form, then the form's ScaleWidth property will be the width of the window's client area. If the window has a vertical scroll bar, then the ScaleWidth property will be reduced by the width of the scroll bar.


VerticalScrollPage Property

Applies to: SubClasser object, PowerForm control
See also: MinVerticalScroll property, MaxVerticalScroll property, VerticalScroll event, Property Index

Determines the increment that will be used when the subclassed window is scrolled by clicking in the area of the vertical scroll bar, between the thumb and either of the arrows.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

The VerticalScrollPage property must be set after the MaxVerticalScroll has been set.


VerticalScrollPosition Property

Applies to: SubClasser object, PowerForm control, SubForm control
See also: MinVerticalScroll Property, MaxVerticalScroll Property, Property Index

Sets or returns the position of the vertical scroll bar.

Read/Write at run-time, not available at design-time.

Type:

Long

Remarks:

The VerticalScrollPosition of a SubClasser object or PowerForm control must be between the values determined by the MinVerticalScroll and MaxVerticalScroll properties.

The VerticalScrollPosition property of a SubForm control is only available if the SubForm's View property is vwSingleForm. If the SubForm's View property is vwContinuousForms or vwGridOfForms, then refer to the LeftColumn , TopRow, VisibleColumns, and VisibleRows properties.

The VerticalScrollPosition property of a SubForm control represents the y coordinate on the child form, of the top-left corner of the visible area of the form. If the height of the child form is less than or equal to the height of the SubForm control, then this will correspond to the top-left corner of the child form (ie 0), and a vertical scroll bar will not be displayed.


View Property

Applies to: SubForm control
See also: Rows property, Columns property, ChildForm property, ChildFormFactory property

Determines a SubForm's viewing mode.

Read/Write at design-time. Not available at run-time.

Type:

SubformViewConstants

Settings:

Value | Meaning
vwSingleForm (default) | Host a single instance of a child form.
vwContinuousForms | Host multiple instances of a child form, arranged in a single column.
vwGridOfForms | Host multiple instances of a child form, arranged in a grid.

Remarks:

The View property must be set at design-time.

If the View is vwSingleForm, then the ChildForm property must be set at run-time. If the View is vwGridOfForms, the ChildFormFactory property must be set at run-time.

Examples:

SubForm - Single Form View

SubForm - Continuous Forms View

SubForm - Grid Of Forms View


VisibleColumns Property

Applies to: SubForm control
See also: VisibleRows property, Columns property, ChildFormInstance property, Property Index

Returns the number of visible columns in a SubForm control, when the SubForm's View property is vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long


VisibleRows Property

Applies to: SubForm control
See also: VisibleColumns property, Rows property, ChildFormInstance property, Property Index

Returns the number of visible rows in a SubForm control, when the SubForm's View property is vwContinuousForms or vwGridOfForms.

Read/Write at run-time. Not available at design-time.

Type:

Long


ZOrder Property

Applies to: SubClasser object, PowerForm control
See also: Property Index

Determines the ZOrder behaviour of the subclassed window.

Read/Write at both design-time and run-time.

Type:

FormZOrderConstants

Settings:

Value | Meaning
zoNormal | default behaviour
zoTopMostApp | The form will be on top of all non-topmost windows, whenever the application is active.
zoTopMostSystem | The form will be on top of all non-topmost windows, even when another application is active.


Method and Function Index

See also: Controls, Classes, Event Index, Property Index, Interfaces

ClearTrap

ControlFromHwnd

GetFormInstance

ReleaseMouse

ScrollTo

ScrollToControl

SetTrap

ShowPopupForm

Subclass

SubClassWindow

TrackMouse


ClearTrap Method

Applies to: Subclasser object, PowerForm control
See also: SetTrap event, TrapMessage event, Method and Function Index

Clears a message trap that was set by a previous call to SetTrap.

Syntax:

object.ClearTrap(Message As Long)

The ClearTrap method syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
Message | Message identifier of the message trap to be cleared.


ControlFromHwnd Function

Applies to: PowerForm control
See also: Method and Function Index

Returns a reference to a control placed in the same container as a PowerForm control.

Syntax:

Set ControlRef = object.ControlFromHwnd(hWnd As Long) As Object

The ControlFromHwnd function syntax has these parts:

Part | Description
ControlRef | The name of a variable to hold the reference returned by the function.
object | The name of an object in the Applies to list.
hWnd | Window handle of a control placed in the same container as a PowerForm control.

Remarks:

ControlFromHwnd cannot be used to find a control which was loaded at run-time.


ReleaseMouse Method

Applies to: Subclasser object, PowerForm control, Panel Control
See also: TrackMouse, MouseEnter Event, MouseLeave Event - Subclasser and PowerForm, Method and Function Index

Releases mouse input capture.

Syntax:

object.ReleaseMouse

The ReleaseMouse syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

The Subclasser object and PowerForm control automatically release mouse input capture when the mouse pointer leaves the subclassed window, so if TrackMouse is called in response to a MouseEnter event, there is no need to explicity call ReleaseMouse.


ScrollTo Method

Applies to: Subclasser object, PowerForm control, SubForm Control
See also: ScrollToControl Method, Method and Function Index

Scrolls a window to a specific point.

Syntax:

object.ScrollTo(x As Long, y As Long)

The ScrollTo syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
x | The new position for the horizontal scroll bar.
y | The new position for the vertical scroll bar.

Remarks:

If object is a SubForm control, then the ScrollTo method is only available if the SubForm's View property is vwSingleForm.

If object is a SubForm control, or if the scroll bars are set up to scroll in one pixel increments, then the point x,y will become the top-left corner of the visible area of the form.


ScrollToControl Method

Applies to: SubForm Control
See also: , Method and Function Index

Scrolls a SubForm, so that a particular control on the child form is visible.

Syntax:

object.ScrollTo(ctl As Object)

The ScrollTo syntax has these parts:

Part | Description
object | The name of an object in the Applies to list.
x | The new position for the horizontal scroll bar.
y | The new position for the vertical scroll bar.

Remarks:

The ScrollToControl method is only available if the SubForm's View property is vwSingleForm.

If the specified control is already completely visible, then ScrollToControl will have no effect.

If the specified control is partially visible, or is completely outside the visible region of the child form, then the form will be scrolled by the amount needed to bring the control into view. If the control is contained on another control, such as a Frame or PictureBox, and if the container control will fit entirely within the visible area of the child form, then an attempt will be made to scroll the entire container control into view.

Sometimes, one will want to bring two controls into view - for example, a TextBox and a Label. In these instances, ScrollToControl can be called twice: Once to scroll the Label into view, and again to scroll the TextBox into view.

ScrollToControl can only be used to scroll a windowless control, such as a Label, into view, if the control's container is the child form itself.

Example:

SubForm - Single Form View


SetTrap Method

Applies to: Subclasser object, PowerForm control
See also: ClearTrap method, TrapMessage method, Method and Function Index

Sets a message trap.

Syntax:

object.SetTrap(Message As Long)

The SetTrap method syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents in order to receive the TrapMessage event.
Message | Message identifier of the message to be trapped.

Remarks:

Setting a message trap for a particular message identifier will cause a Subclasser object or PowerForm control to raise a TrapMessage each time the subclassed window receives a message with that identifier.

A TrapMessage event will not be raised for messages which are handled by the Subclasser object or PowerForm control.

The following messages are handled by the Subclasser object and PowerForm control, and cannot be used with SetTrap:

WM_ACTIVATEAPP
WM_CAPTURECHANGED
WM_COMPACTING
WM_CTLCOLORSCROLLBAR
WM_DISPLAYCHANGE
WM_EXITSIZEMOVE
WM_GETMINMAXINFO
WM_GETTEXT
WM_HSCROLL
WM_LBUTTONDBLCLK
WM_LBUTTONDOWN
WM_LBUTTONUP
WM_MBUTTONDBLCLK
WM_MBUTTONDOWN
WM_MBUTTONUP
WM_MOUSEMOVE
WM_MOVE
WM_MOVING
WM_NCDESTROY
WM_NCHITTEST
WM_NCLBUTTONDOWN
WM_NCMBUTTONDOWN
WM_NCRBUTTONDOWN
WM_RBUTTONDBLCLK
WM_RBUTTONDOWN
WM_RBUTTONUP
WM_SETTINGCHANGE
WM_SIZE
WM_SIZING
WM_STYLECHANGED
WM_SYSCOMMAND
WM_TIMECHANGE
WM_TIMER
WM_VSCROLL


ShowPopupForm Method

Applies to: FlatController object
See also: DirectionalButton control, Method and Function Index

Displays a popup-form.

Syntax:

ShowPopupForm ByRef frm As Object, ByRef ctl As Object, ByVal Side As AkemiFlatControls.SideConstants, ByVal hWndOwner As Long

The ReleaseMouse syntax has these parts:

Part | Description
frm | The popup-form to be displayed.
ctl | A reference to a control which will be used to position the pop-up form.
Side | The side of the control, specified by ctl, on which the pop-up form will be displayed.

Remarks:

The side on which to display the pop-up form is a suggestion, and the pop-up form is not guaranteed to be shown on the specified side.

This is because the requested position may result in the pop-up form being only partially visible. The ShowPopupForm method will position the pop-form so that it will be entirely visible, provided that the pop-up form is not larger than the screen.


Subclass Function

Applies to: Subclasser object
See also: SubclassWindow Function, Method and Function Index

Unsubclasses the window currently subclassed by a Subclasser object, and then subclasses the window specified by hWnd.

Syntax:

success = object.Subclass(hWnd)

The SubClassWindow method syntax has these parts:

Part | Description
success | A variable to hole the return value of the function. A return value of True indicates success. A return value of False indicates failure.
object | A variable to hold the returned reference. Only one SubClasser is created for each window. If the same window is subclassed multiple times by the same thread, there will be multiple references to the same SubClasser object. Once all references to a SubClasser object go out of scope, that object will be terminated and the associated window will be unhooked.
hWnd | A window handle. This can be the hWnd property of a Visual Basic form, User Control, or other window owned by your application.


SubclassWindow Function

Applies to: PowerPack object
See also: Subclasser Object, Subclass Function

Subclasses a window by creating a Subclasser object, and returns a reference to the SubClasser object that is created.

Syntax:

Set object = SubClassWindow(hwnd)

The SubClassWindow method syntax has these parts:

Part | Description
object | A variable to hold the returned reference. Only one SubClasser is created for each window. If the same window is subclassed multiple times by the same thread, there will be multiple references to the same SubClasser object. Once all references to a SubClasser object go out of scope, that object will be terminated and the associated window will be unhooked.
hWnd | A window handle. This can be the hWnd property of a Visual Basic form, User Control, or other window owned by your application.

Example:

Mouse Roll Over (Hard Way)


TrackMouse Method

Applies to: Subclasser object, PowerForm control, Panel Control
See also: ReleaseMouse Method, MouseEnter Event, MouseLeave Event, Method and Function Index

Sets mouse input capture.

Syntax:

object.TrackMouse

The TrackMouse syntax has these parts:

Part | Description
object | The name of an object in the Applies to list. If object is a SubClasser object, then the object must be declared using WithEvents.

Remarks:

Call TrackMouse in response to a MouseEnter event, in order to enable the MouseHover event.

The Subclasser object and PowerForm control automatically release mouse input capture when the mouse pointer leaves the subclassed window, so if TrackMouse is called in response to a MouseEnter event, there is no need to explicity call ReleaseMouse.

To continue to receive mouse events after the mouse pointer has left the window, cancel the MouseLeave event.


Akemi Power Pack Interfaces

Interfaces

See also: Controls, Classes, Event Index, Property Index, Method and Function Index

AkemiPowerPack.DLL exposes the following interface:

IFormFactory


IFormFactory Interface

See also: SubForm Control, Rows Property, Columns Property, View Property

The IFormFactory interface has just one method, called GetFormInstance.

The IFormFactory interface can be implemented in a Form or Class module.

A form or class which implements the IFormFactory interface can be used as the ChildFormFactory property of a SubForm control with View = vwContinuousForms or View = vwGridOfForms.

An implementation of GetFormInstance must set frm to a new instance of a form. There is no requirement to always return an instance of the same form class, so a SubForm with View = vwContinuousForms or View = vwGridOfForms could contain instances of different Forms.

Forms used as child forms should have their BorderStyle property set to 0 (none) at design-time.

The following snippet is a typical class based implementation of IFormFactory. In this example, MyChildForm is assumed to have a public method called Initialize.

IFormFactory can also be implemented in either the child form or the main form, but is best implemented in either the main form or a separate class as below.

Example:

Option Explicit

Implements IFormFactory

Private Sub IFormFactory_GetFormInstance(ByVal Column As Long, ByVal Row As Long, frm As Object)
    Set frm = New MyChildForm
    frm.Initialize Column, Row
End Sub

Further examples:

SubForm - Continuous Forms View

SubForm - Grid Of Forms View


Error Index

See also: Controls, Classes, Event Index, Property Index, Method and Function Index

5103 | Attempt to pass something other than a form reference.
5104 | Number of columns must be 1 or more.
5105 | Number of rows must be 1 or more.
5106 | MinWidth cannot be < 0.
5107 | MinHeight cannot be < 0.
5108 | SizeGranularityX must be >= 1.
5109 | SizeGranularityY must be >= 1.
5110 | Attempt to get or set ChildForm when View is not vwSingleForm.
5111 | MaximizedLeft must be >= 0.
5112 | MaximizedTop must be >= 0.
5113 | MaximizedWidth must be >= 0.
5114 | MaximizedHeight must be >= 0.
5116 | MinWidth cannot be < 0.
5117 | MinHeight cannot be < 0.
5119 | Columns cannot be >1 unless View is vwGridOfForms.
5120 | Rows cannot be >1 unless View is vwContinuousForms or vwGridOfForms.
5122 | Attempt to clear a trap which has not been set.
5123 | ChildFormInstance property is only available if view is vwContinuousForms or vwGridOfForms.
5124 | Property or Method only available if view is vwSingleForm.
5125 | Attempt to pass something other than a control reference.
5127 | Cannot scroll a windowless control into view, unless the control's container is the child form itself.
5128 | Child form not set.
5129 | Attempt to pass a control which is not sited on the child form.
5200 | Popup window must have an owner.


Error 5103

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5103: Attempt to pass something other than a form reference.

Occurs in any one of the following conditions:

  • Setting the ChildForm property of a SubForm control to an object which is not a form.
  • Setting the ChildForm1 or ChildForm2 property of a Splitter control, to an object which is not a form.
  • In a class which implements IFormFactory, an implementation of GetFormInstance which returns a value for frm which is not a form.


Error 5104

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5104: Number of columns must be 1 or more.

Occurs when setting the Columns property of a SubForm control, to a value of 0 or a negative value.


Error 5105

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5105: Number of rows must be 1 or more.

Occurs when setting the Rows property of a SubForm control, to a value of 0, or a negative value.


Error 5106

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5106: MinWidth cannot be < 0.

Occurs when setting the MinWidth property of a PowerForm control or Subclasser object to a negative value.


Error 5107

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5107: MinHeight cannot be < 0.

Occurs when setting the MinHeight property of a PowerForm control or Subclasser object to a negative value.


Error 5108

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5108: SizeGranularityX must be >= 1.

Occurs when setting the SizeGranularityX property of a PowerForm Control or Subclasser Object to 0, or a negative value.


Error 5108

Error 5109

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5109: SizeGranularityY must be >= 1.

Occurs when setting the SizeGranularityY property of a PowerForm Control or Subclasser Object to 0, or a negative value.


Error 5110

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5110: Attempt to get or set ChildForm when View is not vwSingleForm.

Occurs when referencing the ChildForm property of a SubForm control, if the SubForm's View property is vwContinuousForms or vwGridOfForms.

To use the SubForm control with vwContinuousForms or vwGridOfForms views, refer to the ChildFormFactory property.


Error 5111

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5111: MaximizedLeft must be >= 0.

Occurs when setting the MaximizedLeft property of a Subclasser object or PowerForm control to a negative value.


Error 5112

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5112: MaximizedTop must be >= 0.

Occurs when setting the MaximizedTop property of a Subclasser object or PowerForm control to a negative value.


Error 5113

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5113: MaximizedWidth must be >= 0.

Occurs when setting the MaximizedWidth property of a Subclasser object or PowerForm control to a negative value.


Error 5114

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5114: MaximizedHeight must be >= 0.

Occurs when setting the MaximizedHeight property of a Subclasser object or PowerForm control to a negative value.


Error 5116

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5116: MinWidth cannot be < 0.

Occurs when setting the MinWidth property of a Subclasser object or PowerForm control to a negative value.


Error 5117

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5117: MinHeight cannot be < 0.

Occurs when setting the MinHeight property of a Subclasser object or PowerForm control to a negative value.


Error 5119

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5119: Columns cannot be >1 unless View is vwGridOfForms.

Occurs when setting the Columns property of a SubForm to a value greater than 1, if the SubForm's View property is vwSingleForm or vwContinuousForms.


Error 5120

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5120: Rows cannot be >1 unless View is vwContinuousForms or vwGridOfForms.

Occurs when setting the Rows Property property of a SubForm to a value greater than 1, if the SubForm's View property is vwSingleForm.


Error 5122

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5122: Attempt to clear a trap which has not been set.

Occurs when calling ClearTrap, if the Message parameter does not correspond to the Message parameter used in a previous call to SetTrap.


Error 5123

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5123: ChildFormInstance property is only available if view is vwContinuousForms or vwGridOfForms.

Occurs when referencing the ChildFormInstance property of a SubForm control, if the SubForm's View property is vwSingleForm.


Error 5124

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5124: Property or Method only available if view is vwSingleForm.

Occurs when referencing the HorizontalScrollPosition property, VerticalScrollPosition property, ScrollTo method, or ScrollToControl method of a SubForm control, when the SubForm control's View property is vwContinuousForms or vwGridOfForms.

If using vwContinuousForms or vwGridOfForms, a particular form instance can be brought into view by setting the LeftColumn and/or TopRow properties.


Error 5125

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5125: Attempt to pass something other than a control reference.

Occurs when passing an object which is not a Control, to the ScrollToControl method of a SubForm control.


Error 5127

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5127: Cannot scroll a windowless control into view, unless the control's container is the child form itself.

Occurs when the control passed to the ScrollToControl method of a SubForm control, is a windowless control (such as a Label) and is contained on a Frame, or a PictureBox, or some other container control, other than the child form itself.


Error 5128

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5128: Child form not set.

Occurs when calling the ScrollToControl method of a SubForm control, if the SubForm's ChildForm property is Nothing.


Error 5129

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5129: Attempt to pass a control which is not sited on the child form.

Occurs when passing a control to the ScrollToControl method of a SubForm control, if the control is located on a form other than the form referenced by the SubForm's ChildForm property.


Error 5200

See also: Error Index, Controls, Classes, Event Index, Property Index, Method and Function Index

Error 5200: Popup window must have an owner.

Occurs when calling ShowPopupForm, with an hWnd parameter of 0, or belonging to a window which has been closed.


The following E:\Documents and Settings\Adelle Hartley\My Documents\Projects\ProgramPrettiness\PowerForm\Documentation\PowerPack.hhp file(s) could not be found!
E:\Documents and Settings\Adelle Hartley\My Documents\Projects\ProgramPrettiness\PowerForm\Documentation\properties\Caption.html


AAAAAAAAAAAAAAFAAAAAG
AAAAAAAAAAAAAAFAAAAAG
@@@@AAAAAAAAAAFAAAAAG
GG@@@AAABAAAAAFAAAAAG
GGGG@@CCECCCCCECDCCCG
HGGGGG@AAAAAAAAAFAAAG
GGGGGGGAAAAAAAAAFAAAG
GGGGGGGAAAAAAAAAFAAAG
GGGGGGGGAAAAAAAAFAAAG
GGGGGGGGGGAAAAAAFAAAG
GGGGGGGGGGAAAAAAFAAAG
GGHGGGGGGGGAAAAAFAAAG
GGGGGGGGGGGAAAAAFAAAG
GGGGGGGGGGGAAAABFAAAG
GGGGGGGGGGGG@@CEECCCG
GAAA@GHGGGGGGG@AAAAAG
GAAAAGGGGGGGGGGGAAAAG
GGGAAGGGGGGGGGGGGAAAG
GGGGGGGGGGGGGGGGGGAAG
GGGGGGGGGGGGGGGGGGGAG
GGGGGGGGGGGGGGGGGGGGG