Results 1 to 7 of 7

Thread: XP SmartMenu > Popup?

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    XP SmartMenu > Popup?

    Using the XP SmartMenu control, how can you make it behave like a popup menu, on right click?

    Thanks

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    VB Code:
    1. With SmartMenuXP1
    2.                
    3.                 XX = .ClientToScreenX(Me.hWnd, XTEMP) + 275
    4.                 YY = .ClientToScreenY(Me.hWnd, YTEMP)
    5.                
    6.                 .PopupMenu .MenuItems.Key2ID("keyEmp"), XX, YY, 0
    7.                
    8.             End With
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Thanks, ill try now...

  4. #4

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Didnt work, i dont know where you put that code, and do i replace XX YY?

  5. #5
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    This is how I use it... a popup depending upon item selected ina listview large icon display...

    VB Code:
    1. '*******************************************************************************
    2. ' ListView1_DblClick (SUB)
    3. '
    4. ' DESCRIPTION:
    5. ' ACTION TO PERFORM ON DOUBLE-CLICK OF ICON
    6. '*******************************************************************************
    7.  
    8. Private Sub ListView1_DblClick()
    9.    
    10.     ' SINCE ALL AREAS ARE BASICALLY FOR PRINTING ENSURE THAT PRINTER INSTALLED...
    11.    
    12.     If PRINTERINSTALLED = False Then
    13.        
    14.         MsgBox "Program cannot find printer installed. You cannot access Invoice functions until this " & _
    15.             "issue is resolved.", vbCritical + vbOKOnly, "Printer Error"
    16.        
    17.         Exit Sub
    18.        
    19.     End If
    20.    
    21.     If m_CurrentItem Is Nothing Then
    22.        
    23.         MsgBox "Select a Task to Perform"
    24.        
    25.     Else
    26.        
    27.         Dim hMenu As Long, hSub As Long, ItemID As Long
    28.        
    29.         Select Case m_CurrentItem.Text
    30.            
    31.         Case "New Invoices"
    32.            
    33.             With SmartMenuXP1
    34.                
    35.                 xx = .ClientToScreenX(MDIForm1.hWnd, xTemp) + 275
    36.                 yy = .ClientToScreenY(MDIForm1.hWnd, yTemp)
    37.                
    38.                 .PopupMenu .MenuItems.Key2ID("KEYNEW"), xx, yy, 0
    39.                
    40.             End With
    41.            
    42.         Case "Existing Invoices"
    43.            
    44.             With SmartMenuXP2
    45.                
    46.                 xx = .ClientToScreenX(MDIForm1.hWnd, xTemp) + 275
    47.                 yy = .ClientToScreenY(MDIForm1.hWnd, yTemp)
    48.                
    49.                 .PopupMenu .MenuItems.Key2ID("KEYEXT"), xx, yy, 0
    50.                
    51.             End With
    52.            
    53.         End Select
    54.        
    55.     End If
    56.    
    57. End Sub
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  6. #6

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Nah, still doesnt work. Could you make a simple example for me?

    Thanks

  7. #7

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Bump

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width