|
SmartMenuXP
Reference
Converts an X-point expressed in client twips to a screen X-point expressed in
pixels.
Syntax
object.ClientToScreenX(hWnd, X)
The ClientToScreenX function syntax
has these parts:
| Part |
Description |
| object |
An object expression that evaluates to a SmartMenuXP object. |
| hWnd |
A numeric value that evaluates to a window handle. |
| X |
A numeric value that evaluates to a client X-point expressed
in Twips. |
Remarks
This function is useful when it is used in conjunction with ClientToScreenY and
PopupMenu.
Private Sub
Form_MouseDown( _
Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
If Button <> vbRightButton
Then Exit Sub
With SmartMenuXP1
X = .ClientToScreenX(Me.hWnd, X)
Y = .ClientToScreenY(Me.hWnd, Y)
.PopupMenu
.MenuItems.Key2ID("kMenu"), X, Y, 0
End With
End Sub
|