<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — pop-up console window]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=727&amp;type=atom" />
	<updated>2019-12-09T21:43:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=727</id>
		<entry>
			<title type="html"><![CDATA[Re: pop-up console window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3369#p3369" />
			<content type="html"><![CDATA[<p>Jeff,<br />Thanks for the rapid response. That would be great if you can write a wrapper for an appropriate<br />system call. I hope that it is possible to run programs synchronously, as with execute_command_line.<br />I hope also, that it is possible to redirect the output from the console to a &quot;log&quot; file. <br />I will appretiate any help since I have no experience in win API programing.<br />Regards,<br />Carlos</p>]]></content>
			<author>
				<name><![CDATA[Carlos Herrera]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=407</uri>
			</author>
			<updated>2019-12-09T21:43:57Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3369#p3369</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: pop-up console window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3366#p3366" />
			<content type="html"><![CDATA[<p>Carlos,</p><p>The problem you&#039;re experiencing is highly Windows-specific.&nbsp; When you select the &quot;Windows GUI&quot; option in Project Options, the console for your program is not created.&nbsp; This also means that the program you&#039;ve written doesn&#039;t have standard input and output handles.</p><p>When you call <em>execute_command_line</em> from Fortran, it starts a Windows cmd.exe process.&nbsp; That process requires standard input and output handles.&nbsp; Because your program can&#039;t provide them, a new window is opened to provide them to the command shell.</p><p>For a solution that is Windows-specific, you could write a routine that wraps the <a href="https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa">CreateProcess API call</a>, which would allow you to call the program directly without the shell command.&nbsp; It&#039;s a complex API call, but a simple wrapper routine could be written to encapsulate its complexity.&nbsp; If that&#039;s something you&#039;d be interested in, I can write up some code for it.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2019-12-09T16:47:15Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3366#p3366</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[pop-up console window]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3362#p3362" />
			<content type="html"><![CDATA[<p>Dear Jeff,<br />I have returned to Fortran programming after quite a long hiatus and to my great pleasure <br />I find that both Modern Fortran and Simply Fortran are rapidly moving forward.<br />From now, I will definitely use AppGraphics for designing GUI interfaces for my applications.<br />In that connection, let me ask about the following problem.<br />After, for example</p><p>call execute_command_line (&quot;.\bin\png2bmp -Q -A -R .\png\data2d.png&quot;, exitstat=istat),</p><p>the command prompt window pops-up for a moment and then disappears.<br />Is it possible to avoid such flashing of command console screen? <br />The main program is, of course, compiled with &quot;Windows GUI (No console)&quot; option.<br />Regards,<br />Carlos</p>]]></content>
			<author>
				<name><![CDATA[Carlos Herrera]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=407</uri>
			</author>
			<updated>2019-12-08T15:10:30Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3362#p3362</id>
		</entry>
</feed>
