<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-NZ;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-NZ" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">+1 for what the others said.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have you also included the procedure declaration in the interface section so it is visible to the child forms ?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
D<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="357" valign="top" style="width:267.65pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F">David Moorhouse (BCom)</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F"> |
<b>Principal Software Engineer - HealthOne</b><br>
Pegasus Health (Charitable) Ltd </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F">P: 03 353 0871 | W: </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://www.pegasus.org.nz/"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F">www.pegasus.org.nz</span></a></span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F"> <br>
E: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D"><a href="mailto:david.moorhouse@pegasus.org.nz">david.moorhouse@pegasus.org.nz</a></span><u><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F"><br>
</span></u><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#47678F">PO Box 741, Christchurch 8140<br>
160 Bealey Ave, Christchurch 8014</span><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#47678F;mso-fareast-language:EN-US"><o:p></o:p></span></b></p>
</td>
<td width="259" valign="top" style="width:194.45pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img border="0" width="240" height="76" id="Picture_x0020_1" src="cid:image001.jpg@01D2246B.89932C30" alt="cid:image003.jpg@01CEE516.6F544D00"></span><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#47678F;mso-fareast-language:EN-US"><o:p></o:p></span></b></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> delphi-bounces@listserver.123.net.nz [mailto:delphi-bounces@listserver.123.net.nz]
<b>On Behalf Of </b>Barry Neale<br>
<b>Sent:</b> Wednesday, 12 October 2016 9:11 a.m.<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> Re: [DUG] Procedure run from main program<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Wallace it appears that all the procedure is completely self contained, in that it only references passed parameters.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Why not just put it in it's own unit (or a common utilities unit) and include it in any form that needs it, rather than having it in the mainform unit<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Oct 11, 2016 at 5:26 PM, Marshland Engineering <<a href="mailto:marshland@marshland.co.nz" target="_blank">marshland@marshland.co.nz</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">I'm back on the window page scaling for various forms in my project. This code<br>
works quite well. It needs to reside in the main form. I can't get the syntax<br>
right to be able to call it from a child form.<br>
<br>
Any suggestions?<br>
<br>
procedure FormScale (rHeiScale:real; rWidScale:real; sForm:tForm);<br>
var<br>
i:integer;<br>
rWidth,rHeight:real;<br>
begin<br>
with sForm do begin<br>
rHeight:=rHeiScale*(Screen.Height/Height); // Scale form<br>
rWidth:=rWidScale*(Screen.Width/Width);<br>
Height:=Round(Height*rHeight);<br>
Width:=Round(Width*rWidth);<br>
Left:=Round((Screen.Width-Width)/2); // Center form<br>
Top:=Round((Screen.Height-Height)/2);<br>
for i:=0 to componentcount-1 do<br>
if Components[i] is TControl then begin<br>
TControl(Components[i]).Top :=<br>
Round(TControl(Components[i]).Top*rHeight);<br>
TControl(Components[i]).Width :=<br>
Round(TControl(Components[i]).Width*rWidth);<br>
TControl(Components[i]).Height :=<br>
Round(TControl(Components[i]).Height*rHeight);<br>
TControl(Components[i]).Left :=<br>
Round(TControl(Components[i]).Left*rWidth);<br>
end;<br>
end;<br>
end;<br>
<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@listserver.123.net.nz">delphi@listserver.123.net.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@listserver.123.net.nz">
delphi-request@listserver.123.net.nz</a> with Subject: unsubscribe<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<img src="http://snow.pegasus.org.nz/wp-content/uploads/2016/10/moving_footer.jpg">
<P><FONT color=#47678f size=2
face=Arial>*****************************************************</FONT></P>
<P><FONT color=#47678f size=2 face=Arial>This email or attachment(s) may contain
confidential or legally privileged information intended for the sole use of the
addressee(s). Any use, redistribution, disclosure, or reproduction of this
message, except as intended, is prohibited. If you received this email in error,
please notify the sender and erase all copies of the message, including any
attachments.</FONT></P>
<P><FONT color=#47678f size=2 face=Arial>Any views or opinions expressed in this
email (unless otherwise stated) may not represent those of Pegasus Health
Ltd.</FONT></P>
<P><FONT color=#47678f size=2
face=Arial>**********************************************************</FONT></P>
</body>
</html>