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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:05:32+00:00 2026-06-01T18:05:32+00:00

Currently running this code to open Business Vision (an application written by someone else

  • 0

Currently running this code to open Business Vision (an application written by someone else that i don’t have access to the code of):

ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(BusinessVisionPath);
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();

StreamReader myStreamReader = myProcess.StandardOutput;
Boolean done = false;
while (done == false)
{
    int s = myStreamReader.Read();
    Console.WriteLine(s);
    if (s == -1)
    {
        done = true;
        Process IProcess = new Process();
        ProcessStartInfo IProcessStartInfo = new ProcessStartInfo(QuickPrinterPath);
        IProcessStartInfo.WindowStyle = ProcessWindowStyle.Maximized;
        IProcess.StartInfo = IProcessStartInfo;
        IProcess.Start();
    }

}
myProcess.Close();
Console.ReadLine();

Anyways,

this code currently opens my printer program when BusinessVision closes.

Questions:

  1. How (if possible) can i open my program when a certain message box pops up within BV (“Are you sure you want to print an invoice”?)
  2. Is it possible to get any data from the application ? like raw data that i can parse through as it runs or something?
  • 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-01T18:05:33+00:00Added an answer on June 1, 2026 at 6:05 pm

    You might want to look into Microsoft’s UI Automation. It allows you to read data from the windows of other applications, and interact with other applications’ UI programmatically. I used this a couple years ago to automate a bunch of tests on an old VB6 app we had. My code would find the main window of the application, then drill down to the menus/controls/etc that I was interested in. From there I could automate clicks and keystrokes, and then scrape the text/data I wanted from the labels in various windows. I could then pull the data into my .NET app and do what I wanted with it.

    In your case you would need some always-running app (such as a Windows service) to constantly monitor the BV program and detect when the message box appears, and then react accordingly by launching your program.

    It takes a fair amount of work to understand and get working, but it’s very powerful. There are free apps out there that will make it easier to browse the visual hierarchy of windows and see what kind of information is available. Check out Microsoft’s UISpy:

    http://msdn.microsoft.com/en-us/library/ms727247.aspx

    Here are some other links to get you started:

    http://en.wikipedia.org/wiki/Microsoft_UI_Automation

    http://msdn.microsoft.com/en-us/library/ms747327.aspx

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

Sidebar

Related Questions

I have this running software that is currently being used by about 400 people.
Okay so, I'm currently running this code to move a bunch of data from
I'm running code that sometimes yields this: UInt32 current; int left, right; ... //sometimes
We're currently running with php 5.2.5. We have now encountered a bug that creates
This code is running on Blackberry JDE v4.2.1 It's in a method that makes
Currently I have a command that does this. First, upon the button click event
I am running the code below in some if/else statements, I have a weird
I have a possibly long running program that currently has 4 processes, but could
For an open-source multiplayer programming game written in Scala that loads players' bot code
We're currently running an svnserve instance as NT service. While this works, it's needlessly

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.