Quantcast
Channel: NodeXL: Network Overview, Discovery and Exploration for Excel
Viewing all articles
Browse latest Browse all 4386

New Post: GraphMetricCalculator Class showing SnapGraphMetrics.exe command prompt on top of window application

$
0
0
I don't know why that's happening. Here is the code that calls the SNAP executable:
protected Boolean
TryCallSnapGraphMetricCalculator
(
    SnapGraphMetrics eSnapGraphMetrics,
    String sArguments,
    out String sStandardError
)
{
    ProcessStartInfo oProcessStartInfo = new ProcessStartInfo(
        GetSnapGraphMetricCalculatorPath(eSnapGraphMetrics), sArguments);

    oProcessStartInfo.UseShellExecute = false;
    oProcessStartInfo.RedirectStandardError = true;
    oProcessStartInfo.CreateNoWindow = true;

    Process oProcess = new Process();
    oProcess.StartInfo = oProcessStartInfo;
    oProcess.Start();
    sStandardError = oProcess.StandardError.ReadToEnd();
    oProcess.WaitForExit();

    return (sStandardError.Length == 0);
}
Note that "CreateNoWindow" gets set to true, which prevents (or is supposed to prevent) a command window from opening. A command window does not open in our own Excel Template application, so this is working as expected for us.

Are you 100% certain that the window you're seeing is the SNAP executable window?

-- Tony

Viewing all articles
Browse latest Browse all 4386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>