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 6125151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:12:52+00:00 2026-05-23T16:12:52+00:00

MyApp (.NET c#) is triggered by OtherApp (c++). When triggered my app takes over

  • 0

MyApp (.NET c#) is triggered by OtherApp (c++).

When triggered my app takes over the whole screen and gives the user two options. One option quits MyApp and returns to the OtherApp home screen. The 2nd option exits the intial screen and shows another screen for user input – after input it exits and returns to the OtherApp.

On occasion the OtherApp screen does not repaint(can only see the background, not buttons) – I can not easily replicate this (when I do it seems like a fluke), but I have seen it on a number of applications.

Is there a way that MyApp can force a screen repaint of OtherApp?

What could be causing this?

CLARIFICATION – OTHER APP IS NOT OURS. Our client uses OtherApp. MyApp is triggered by a filewatcher event. When we see a file, we process it. If this is the file we are looking for we give the user two options. OtherApp does not know MyApp exists.

  • 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-23T16:12:53+00:00Added an answer on May 23, 2026 at 4:12 pm

    Try and get the hwnd of OtherApp’s main window and invalidate the whole thing:

    [DllImport("user32.dll")]
    static extern bool InvalidateRect(IntPtr hWnd, IntPtr lpRect, bool bErase);
    
    [DllImport("user32.dll", SetLastError = true)]
    static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
    
    static void InvalidateOtherApp()
    {
      IntPtr hWnd = FindWindow(null, "OtherApp's Main Window's Title");
      if (hWnd != IntPtr.Zero)
        InvalidateRect(hWnd, IntPtr.Zero, true);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need use images in 2 .NET assemblies. One is WPF app {myApp.exe} and
There is a ASP.NET MVC 2 web app, lets call it myapp.com. I want
In a small ASP.NET 2.0 web-application, I have two ASHX handlers (one sync, one
I am building a ASP.NET MVC App that will allow a user to connect
My app (winforms .net 2.0 / vs2008) works fine on my dev machine but
I get the following Exception running my app: java.net.SocketException: Permission denied (maybe missing INTERNET
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have an azure website which is named: http://myapp.cloudapp.net Of-course this URL is kind
When an error occurs in any of my .NET assemblies the user just gets
I am working on Windows Server 2003 (IIS6), which has two asp.net sites running

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.