Results 1 to 3 of 3

Thread: Popup Menu

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Springfield
    Posts
    120

    Popup Menu

    When I right click I need a popup menu, which has Copy, and paste. But I would disable Paste before I push copy button. Can someone help me a API fuction which can disable Paste menu.

    Thanks very much
    MM

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    Before displaying your menu do a check to see if any data of a specific format is available on the Clipboard and use the result to determine whether the Paste option should be enabled, i.e.
    VB Code:
    1. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     If Button = vbRightButton Then
    3.         mnuPaste.Enabled = Clipboard.GetFormat(vbCFText)
    4.         PopupMenu mnuPopup
    5.     End If
    6. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Springfield
    Posts
    120
    Thanks, but it is not the answer. The popup menu will be something I create by Private Declare Function CreatePopupMenu Lib "user32" () As Long. I will two option Copy and Paste to this popup menu. But I would disable paste.
    MM

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