<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — select a printer]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=592&amp;type=atom" />
	<updated>2016-11-25T16:57:01Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=592</id>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2707#p2707" />
			<content type="html"><![CDATA[<p>David, did you try it?<br />I found that the file name LPT1 is not accepted and the \\ will cause an error.<br />Of course one may give a print file any legal file name but it doesn&#039;t mean that it will be sent to a printer in Your network. You have to connect it to a specific printer.<br />Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2016-11-25T16:57:01Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2707#p2707</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2696#p2696" />
			<content type="html"><![CDATA[<p>Can you not just open a file named LPT1\\ for writing?</p>]]></content>
			<author>
				<name><![CDATA[davidb]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3463</uri>
			</author>
			<updated>2016-11-17T11:02:54Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2696#p2696</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2695#p2695" />
			<content type="html"><![CDATA[<p>Klaus,</p><p>The CVF example relies heavily on CVF&#039;s implementation and wrapping of the Windows API, which we don&#039;t support.&nbsp; In fact, their code wouldn&#039;t technically work on 64-bit machines because of their assumption that a memory pointer can be represented as an <em>INTEGER(KIND=4)</em>.&nbsp; </p><p>If I understand you correctly, you&#039;re attempting to print text to a printer directly? There are probably some drastically less complicated techniques possible, such as writing a temporary file and sending it to be printed without trying to directly use the Windows API.&nbsp; I&#039;ll see if I can think of a solution.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2016-11-16T18:19:15Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2695#p2695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2694#p2694" />
			<content type="html"><![CDATA[<p>Here more about printing in CVF:<br />There is a module in CVF6.1 called&nbsp; Fortran_Winprint.f90;<br />the comment text in the file is explaining more.<br />In general one has to use this module by the use statement in a procedure where a print order follows: <br />Use Fortran_WinPrint<br />…...&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<br />For printing one has to define a Fortran unit ; for example by my selfmade dialog:<br />call prt_nav(......)<br />If is decided to sent output to a printer, a Fortran unit has to be opened ; in my case called IO_PR<br />Next all print instructions has to be sent to that unit&nbsp; &nbsp;…...</p><p>use after all printer output the function Print_Unit from Fortran_WinPrint like : <br />istat=&nbsp; Print_Unit(IO_PR,Default_Printer=.FALSE., Font=&quot;Verdana&quot;)<br /> see there are&nbsp; more optional parameters!<br /> close (IO_PR) …...Don&#039;t forget to close (conditional) the PRN-device after all the print output is finished</p><p>The source of Fortran_Winprint.f90 is sent separately by mail and I hope that you can use it in any way</p><p>regards, Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2016-11-16T10:41:35Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2694#p2694</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2693#p2693" />
			<content type="html"><![CDATA[<p>Jeff, <br />good to hear about the dropdown list in SF3.32!</p><p>I will try to get more info for you regarding the printing procedure, may be tomorrow. <br />one has to use a CVF lib:</p><p>Use Fortran_WinPrint&nbsp; &nbsp; &nbsp; &nbsp;(May be I can send a copy of that lib...)</p><p>istat=&nbsp; Print_Unit(IO_PR,Default_Printer=.FALSE., Font=&quot;Verdana&quot;&nbsp; &nbsp;) with optionally some more parameters to open a dialog </p><p>at the end one has to close that fortran unit. </p><br /><br /><p>regards, Klaus</p><p>by the way, there is also a app called Printdlg in windows but without any description</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2016-11-15T20:54:33Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2693#p2693</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2692#p2692" />
			<content type="html"><![CDATA[<p>Klaus,</p><p>Simply Fortran 2.32, when released, will have a fixed <em>dlgrequestselection</em> function that should display a scrollbar in a dropdown list if a large number of choices are requested.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2016-11-14T20:00:01Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2692#p2692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2691#p2691" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Klaus Asmus wrote:</cite><blockquote><p>Hi, <br />Is there away to select a printer or another fortran device&nbsp; in a user dlg?<br />In CVF there was an procedure called&nbsp; prt_nav(IOunit,object) is it possible to make some similar?</p></blockquote></div><p>No, we don&#039;t have a dialog that can select an alternate output unit that is pre-built.&nbsp; You could write one that offered a list of units to the user to select, but one is not built in.&nbsp; Additionally, you might also run into issues trying to access a printer directly from Fortran.</p><p>I couldn&#039;t find any reference, however, to <em>prt_nav</em> anywhere.&nbsp; Do you have a link to the documentation for it?</p><div class="quotebox"><cite>Klaus Asmus wrote:</cite><blockquote><p>Other question: <br /> the function dlgrequestselection contains only 6 items. Is it possible to make on containing 10 or more items with a variable string length?</p></blockquote></div><p>I think I understand what you&#039;re asking here.&nbsp; Technically, the <em>dlgrequestselection</em> dialog allows unlimited items.&nbsp; However, it might not be drawing a scroll bar in all cases, which would be a bug.&nbsp; I&#039;m looking into it right now.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2016-11-09T15:19:38Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2691#p2691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[select a printer]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=2690#p2690" />
			<content type="html"><![CDATA[<p>Hi, <br />Is there away to select a printer or another fortran device&nbsp; in a user dlg?<br />In CVF there was an procedure called&nbsp; prt_nav(IOunit,object) is it possible to make some similar?</p><p>Other question: <br /> the function dlgrequestselection contains only 6 items. Is it possible to make on containing 10 or more items with a variable string length?</p><p>Regards Klaus</p>]]></content>
			<author>
				<name><![CDATA[Klaus Asmus]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3617</uri>
			</author>
			<updated>2016-11-08T09:44:55Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=2690#p2690</id>
		</entry>
</feed>
