VB6 RichTextbox mousedown/mouseup

Posted on 2011-10-11
Last Modified: 2012-05-12
Dear Experts,

I am using a hidden richtextbox in vb6. How can I programmatically trigger a mousedown/mouseup event at a specified selstart location?

Question by:ttobin333
    LVL 85

    Expert Comment

    by:Mike Tomlinson
    Why would you need to do that on a hidden RTB?...
    LVL 14

    Expert Comment

    Just call the routine and send it the parameters:

    Call rtbText_MouseUp(parameters...)

    Author Comment

    Idle Mind, It's actually behind other controls and can't be seen, but visible property = true. VBClassicGuy, I want to be able to trigger the mouseup/down without having to use X and Y coordinates, just selstart value.
    LVL 14

    Accepted Solution

    Then just feed the routine zero for x and y and don't use them. SelStart can be a "global" value for the form that is set somewhere else, and used in the MouseUp/Down routine.

    Author Closing Comment

    Thanks! Easier than I thought it would be.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now