Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 286583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:38:58+00:00 2026-05-12T05:38:58+00:00

My app runs as a plugin inside another windowed app. Thus, my window often

  • 0

My app runs as a plugin inside another windowed app. Thus, my window often doesn’t have the focus. Now, if someone moves the mouse over a button/menu and clicks once, all it does is set focus to my window. Then (s)he needs to click again to get the actual button functionality.

This is a minor annoyance but I’d like to get rid of it. First I tried claiming focus whenever the mouse enters my dialog space, but this proved to be even more annoying. So what I’d like to do is repeat the mouse click, so it looks as though a single click both changed focus AND pressed the button.

Obviously I should ONLY do this when the click resulted into a SetFocus, otherwise it will run the button function twice.

Any suggestions?

Deeply and eternally indebted,
David

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:38:58+00:00Added an answer on May 12, 2026 at 5:38 am

    Mouse click simulation seems a little messy here, but you can always simulate any mouse click at any (X,Y) via the SendInput API through P/Invoke:

    [DllImport("user32.dll", SetLastError=true)]
    static extern uint SendInput(uint nInputs, INPUT [] pInputs, int cbSize);
    

    You can also fiddle around with propagating/generating WM_MOUSEXXXXX messages directly but I’ve played with this a lot and believe me when I say it’s a total kludge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 322k
  • Answers 322k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your path to the movie has to be the full… May 14, 2026 at 12:48 am
  • Editorial Team
    Editorial Team added an answer I'm sure you know how to write the function around… May 14, 2026 at 12:48 am
  • Editorial Team
    Editorial Team added an answer It's also pretty common for business logic to be placed… May 14, 2026 at 12:48 am

Related Questions

I have a simple application using netbeans for developing and maven for building et
My application (DotNET) runs as a plug-in inside a C++ standalone app that exposes
This is a dupe from SuperUser.com . Folks over there weren't smart enough or
As a two-monitor user at work, I've noticed that applications behave differently with regards

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.