Home > Code Library > SmartMenuXP > ClientToScreenY

Last Update 01 Nov 2001

 


Search:



  

Options:

   

   

   

   



SmartMenuXP Reference

ClientToScreenY Function

Converts an Y-point expressed in client twips to a screen Y-point expressed in pixels.

Syntax

object.ClientToScreenY(hWnd, Y)

The ClientToScreenY 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.
Y A numeric value that evaluates to a client Y-point expressed in Twips.

Remarks

This function is useful when it is used in conjunction with ClientToScreentX 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
 

 

 
Copyright © 2001, Andrés Pons (andres@vbsmart.com). All rights reserved.