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

  • SEARCH
  • Home
  • 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 8277759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:46:57+00:00 2026-06-08T08:46:57+00:00

I’m trying to send a mouse left click to a sopcast mute button, in

  • 0

I’m trying to send a mouse left click to a sopcast mute button, in c#, but with no result.
Here is what I did:

  const int BN_CLICKED = 245;  
public static void mute_sopcast() 
{ 

    IntPtr hwnd = FindWindow("#32770", null); 
    IntPtr chwnd1 = FindWindowEx(hwnd, IntPtr.Zero, "AfxOleControl70su", null); 
    IntPtr chwnd2 = FindWindowEx(chwnd1, IntPtr.Zero, "#32770", null); 
    IntPtr chwnd3 = FindWindowEx(chwnd2, IntPtr.Zero, "Button", "Mute"); 

    PostMessage(chwnd3, BN_CLICKED, 0, (int)IntPtr.Zero); 

    //The code bellow I made it to see if chwnd… is zero or not.

    if (chwnd3 == new IntPtr(0)) 
    { 
        MessageBox.Show("IntPtr(0)"); 
    } 
    else if (chwnd3 == IntPtr.Zero) 
    { 
        MessageBox.Show("IntPtr.Zero"); 
    } 
    else 
    { 
        MessageBox.Show("IntPtr.Zero not empty"); 
    } 


} 

Winspector Spy gives me this:

000E036E: #32770 
    …
    00070406: AfxOleControl70su
        002C06A2: #32770
            …
            000F03A4: Button “Mute”

Can someone tell me where I’m wrong?
Thank you very much.

  • 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-06-08T08:46:59+00:00Added an answer on June 8, 2026 at 8:46 am

    using System;

    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    
    namespace automouse
    {
        public partial class Form1 : Form
        {
            public const int WM_LBUTTONDOWN = 0x0201;
            public const int WM_LBUTTONUP = 0x0202;
    
            [DllImport("user32.dll", CharSet = CharSet.Auto)]
            private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
    
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                SendMessage(button2.Handle, WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero);
                SendMessage(button2.Handle, WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero);
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                MessageBox.Show("Button2 clicked!");
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to send POST request on click event using jQuery with no luck. Here
I am trying to send a simulated mouse click to another application. I understand
I am trying to build following gesture: Click And Hold Right Mouse Button, Click
I am trying to send an email to customers with html form. here is
I am trying to send some simple mouse down/up messages to Windows Calculator using
Small toy app can be found here: http://gist.github.com/517445 I am trying to send artificial
At the moment I'm trying to use Python to detect when the left mouse
I'm trying to send a string via ftp using the code below but I'm
Trying to send an activation email for newly registered users, here's the code so
Trying to send a PHP email the easy way but I cannot work out

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.