Results 1 to 4 of 4

Thread: Flags & DefaultMenu In PopupMenu!

  1. #1

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Question Flags & DefaultMenu In PopupMenu!

    To display a menu by clicking a control in any part of the Form, one can use the PopupMenu function which has 6 parameters - Menu As Object, Flags, X, Y & DefaultMenu. The first parameter specifies the name of the menu which has to be displayed. X & Y parameters are the points from where the menu should start. What are Flags & DefaultMenu parameters for?


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  2. #2
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Flags & DefaultMenu In PopupMenu!

    Flags:

    vbPopupMenuLeftAlign 0 (Default) The left side of the pop-up menu is located at x.
    vbPopupMenuCenterAlign 4 The pop-up menu is centered at x.
    vbPopupMenuRightAlign 8 The right side of the pop-up menu is located at x.

    Default Menu:
    Name of menu to displayed in bold.

  3. #3

    Thread Starter
    Frenzied Member arpan_de's Avatar
    Join Date
    Oct 2005
    Location
    Mumbai, India
    Posts
    1,394

    Re: Flags & DefaultMenu In PopupMenu!

    Andrew, I coded the folloiwng:
    VB Code:
    1. Private Sub Label1_Click()
    2.     PopupMenu mnuPopup, 0, 1000, 950
    3. End Sub
    If I change 0 to 8, I don't see any difference in the positioning of the menu. Under both circumstances, the menu starts from the same position. So wat's the difference between the two?


    ARPAN

    IF YOU HAVE AN APPLE & I HAVE AN APPLE AND WE EXCHANGE THE APPLES, THEN YOU & I WILL STILL HAVE ONE APPLE BUT IF YOU HAVE AN IDEA & I HAVE AN IDEA AND WE EXCHANGE OUR IDEAS, THEN EACH OF US WILL HAVE TWO IDEAS!

    NOTHING IS IMPOSSIBLE IN THIS WORLD.....EVEN THE WORD IMPOSSIBLE SAYS I'M POSSIBLE!

    PRACTICE MAKES A MAN PERFECT BUT NOBODY IS PERFECT; SO WHY PRACTICE?

  4. #4
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Flags & DefaultMenu In PopupMenu!

    On mine it doesn't. You can see the difference better if you don't specifiy the x and y pos.

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