Results 1 to 6 of 6

Thread: custom menu

  1. #1
    Guest

    Question

    Hey all,

    At http://www.vb-world.net/tips/tip131.html it tells you how to disable the default popupmenu for the text box. In the code, theres comment that says: 'Do nothing
    'Or popup you own menu

    So I tried to put my own popupmenu (PopupMenu name) and I get variable not defined. Is this because the popupmenu method is in a module so it can't be object specific? Whats a way around this?

    Thanks,
    Sunny

  2. #2
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116

    Wink

    To popup your own menu , u have to use

    popupmenu formname.menuname

    where the menu is creted.
    YC Sim
    Teenage Programmer
    UIN 37903254



  3. #3
    Guest
    I have also tried that as well. But since the code is in a module, referring to "form1" will be object specific. Then using popupmenu form1.menuname I got a sub or variable not defined

    Sunny

  4. #4
    Guest
    yes...that is the code i used.

    Sunny

  5. #5
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116

    oops

    i am sure this will work

    form.popupmenu form.menuname

    sorrie for the previous errors...
    YC Sim
    Teenage Programmer
    UIN 37903254



  6. #6
    Lively Member
    Join Date
    Apr 2000
    Location
    Hell
    Posts
    89

    Lightbulb

    Y'all are missing the point here.
    "FormName" doesnt exist as an object in the module, but as a data type. What you have to do is, when you subclass the window, add a window property, and use PtrFromObject/ObjectFromPtr.
    - Steve

    Real programmers use COPY CON PROGRAM.EXE

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