Results 1 to 14 of 14

Thread: check my CODE

  1. #1

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    check my CODE

    i want to do as follow
    when i click Command1 it has to show dropdown menu of toolbar button
    ** i have only 1 button and dropdown menu button is associated with it..**
    VB Code:
    1. Dim hell As MSComctlLib.Button
    2. Private Sub Command1_Click()
    3. 'Set hell = "Hello"          '''' Hello is the name of button on which drop menu is associated
    4. Call Toolbar1_ButtonDropDown(hell)
    5. End Sub
    6.  
    7. Private Sub Toolbar1_ButtonDropDown(ByVal Button As MSComctlLib.Button)
    8.  
    9. End Sub
    10.  
    11. Private Sub Toolbar1_ButtonMenuClick(ByVal ButtonMenu As MSComctlLib.ButtonMenu)
    12. Select Case ButtonMenu
    13. Case "kOiz"
    14. MsgBox "OK"
    15. End Select
    16. End Sub

  2. #2
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: Shouldn't that be: "check my CODE please"

    ButtonDropDown is an event which occurs when the user clicks the dropdown arrow on a toolbar button. Calling this event, as you are trying to do will not cause the dropdown menu to display (in fact it will probably cause an error).
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  3. #3

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    So what is the solution
    if I want to do it from
    command1 click

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: check my CODE

    Could you use Popupmenu?
    VB Code:
    1. 'something like
    2. Private Sub Command1_Click()
    3. PopupMenu mnuFile
    4. End Sub

  5. #5

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    is there any genuine problem with
    toolbar dropdown menu ....???

  6. #6
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: check my CODE

    Quote Originally Posted by vbPoet
    is there any genuine problem with
    toolbar dropdown menu ....???
    I tried to figure out how to get the menu to drop down in code ages ago but could never get it to work at all. Maybe there's some way, through subclassing or something to send the appropriate windows message to the button, but I don't know. Why don't you try asking in the API forum.

    Good luck & let us know if you figure it out.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  7. #7

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    because i think it is better in VB6 forum ..

  8. #8

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    Quote Originally Posted by vbPoet
    is there any genuine problem with
    toolbar dropdown menu ....???
    .....????

  9. #9
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: check my CODE

    Could it be like the equivelant of this?

    http://www.vbforums.com/showpost.php...60&postcount=4


    Has someone helped you? Then you can Rate their helpful post.

  10. #10

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    I don't think So..

  11. #11

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    i think
    sendmessage or Releasecapture API can solve this thread...

  12. #12
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: check my CODE

    Quote Originally Posted by pnish
    Why don't you try asking in the API forum.
    Quote Originally Posted by vbPoet
    because i think it is better in VB6 forum ..
    Quote Originally Posted by vbPoet
    i think sendmessage or Releasecapture API can solve this thread...
    And that's why I suggested (about two weeks ago) that you try asking your question in the API forum.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

  13. #13

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: check my CODE

    shArp
    how can i shift my thread ...?

  14. #14
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: check my CODE

    I'm not sure how to move the thread (other than ask a moderator). Just start a new thread in the API forum and maybe include a link back to this one.
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

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