Using the XP SmartMenu control, how can you make it behave like a popup menu, on right click?
Thanks
Printable View
Using the XP SmartMenu control, how can you make it behave like a popup menu, on right click?
Thanks
VB Code:
With SmartMenuXP1 XX = .ClientToScreenX(Me.hWnd, XTEMP) + 275 YY = .ClientToScreenY(Me.hWnd, YTEMP) .PopupMenu .MenuItems.Key2ID("keyEmp"), XX, YY, 0 End With
Thanks, ill try now...;)
Didnt work, i dont know where you put that code, and do i replace XX YY?:confused:
This is how I use it... a popup depending upon item selected ina listview large icon display...
VB Code:
'******************************************************************************* ' ListView1_DblClick (SUB) ' ' DESCRIPTION: ' ACTION TO PERFORM ON DOUBLE-CLICK OF ICON '******************************************************************************* Private Sub ListView1_DblClick() ' SINCE ALL AREAS ARE BASICALLY FOR PRINTING ENSURE THAT PRINTER INSTALLED... If PRINTERINSTALLED = False Then MsgBox "Program cannot find printer installed. You cannot access Invoice functions until this " & _ "issue is resolved.", vbCritical + vbOKOnly, "Printer Error" Exit Sub End If If m_CurrentItem Is Nothing Then MsgBox "Select a Task to Perform" Else Dim hMenu As Long, hSub As Long, ItemID As Long Select Case m_CurrentItem.Text Case "New Invoices" With SmartMenuXP1 xx = .ClientToScreenX(MDIForm1.hWnd, xTemp) + 275 yy = .ClientToScreenY(MDIForm1.hWnd, yTemp) .PopupMenu .MenuItems.Key2ID("KEYNEW"), xx, yy, 0 End With Case "Existing Invoices" With SmartMenuXP2 xx = .ClientToScreenX(MDIForm1.hWnd, xTemp) + 275 yy = .ClientToScreenY(MDIForm1.hWnd, yTemp) .PopupMenu .MenuItems.Key2ID("KEYEXT"), xx, yy, 0 End With End Select End If End Sub
Nah, still doesnt work. Could you make a simple example for me?
Thanks;)
Bump