Results 1 to 14 of 14

Thread: I want when I click inside the combo a message appears to the user?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2021
    Posts
    75

    Question I want when I click inside the combo a message appears to the user?

    hi
    I want when I click inside the combo a message appears to the user?
    Attached Images Attached Images  

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,764

    Re: I want when I click inside the combo a message appears to the user?

    You can try the GotFocus() event.
    And ignore this when the DropDown event has fired first.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2021
    Posts
    75

    Re: I want when I click inside the combo a message appears to the user?

    hi
    I want when I click inside comox ??

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,764

    Re: I want when I click inside the combo a message appears to the user?

    The ComboBox doesn't have any Mouse events, so I think you need to subclass or setting a hook to get additional information.
    https://www.google.com/search?q=vb6+combobox+mousedown

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,071

    Re: I want when I click inside the combo a message appears to the user?

    Why?
    Why not put a label right above (or below or beside) the combobox with whatever message you want for the user. (saves a lot of headaches using the combobox for its intended purpose)
    Sam I am (as well as Confused at times).

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2021
    Posts
    75

    Re: I want when I click inside the combo a message appears to the user?

    Thanks everyone for the help

  7. #7
    PowerPoster
    Join Date
    Feb 2017
    Posts
    3,522

    Re: I want when I click inside the combo a message appears to the user?

    The built-in VB's ComboBox does not provide mouse events, but you can use a replacement which does.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Sep 2021
    Posts
    75

    Re: I want when I click inside the combo a message appears to the user?

    Thank you from the bottom of my heart for this effort

  9. #9
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    275

    Re: I want when I click inside the combo a message appears to the user?

    I use ComboBox1_Click() all the time.

    To try it, place a new ComboBox on your Form, then click it and you will see the following appear on your coding sheet automatically


    Private Sub Combo1_Click()

    End Sub
    Last edited by Brenker; Oct 22nd, 2021 at 11:24 PM.

  10. #10
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    8,071

    Re: I want when I click inside the combo a message appears to the user?

    huh?

    I'm afraid you totally missed the point!
    Sam I am (as well as Confused at times).

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,680

    Re: I want when I click inside the combo a message appears to the user?

    Yep, I think what the OP is after, is more like a "CueBanner"-Text ...
    (as seen with advanced TextBox-Controls, just adapted to the EditArea of a ComboBox).

    I've outlined a simple solution (for VBs intrinsic TextBox) already here (in #4):
    https://www.vbforums.com/showthread....=1#post4794335

    And the adaptions within the little UserControl-wrapper (to make it work with a ComboBox instead) should be marginal.

    HTH

    Olaf

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,948

    Re: I want when I click inside the combo a message appears to the user?

    ComboBox already supports CueBanners when the process selects the version 6 Common Controls assembly. You have to call SendMessage() since the VB6 wrapper control lacks a property for CueBanner text, but no big deal. No need for additional wrappers.

    Beyond that we also have "F1 Help" and "What's This? Help" going back to Win95.

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,948

    Re: I want when I click inside the combo a message appears to the user?

    Oh yeah, we always have ToolTipText too.

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Sep 2021
    Posts
    75

    Re: I want when I click inside the combo a message appears to the user?

    Thanks everyone for trying to help

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