<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Yes, you probably want to declare the variables in the TForm, then
you will be able to access them from any of the forms methods.
Something like the following.<br>
<br>
<tt>type<br>
TForm11 = class(TForm)<br>
Button1: TButton;<br>
procedure Button1Click(Sender: TObject);<br>
private<br>
{ Private declarations }<br>
public<br>
{ Public declarations }<br>
MyString : string;<br>
end;<br>
<br>
var<br>
Form11: TForm11;<br>
<br>
implementation<br>
<br>
{$R *.dfm}<br>
<br>
procedure TForm11.Button1Click(Sender: TObject);<br>
begin<br>
MyString := 'Hello, world!';<br>
end;</tt><br>
<br>
You can then access the MyString from any method on the form.
Depending on how you need to access MyString, you can place it in
the public or private section (or protected).<br>
<pre class="moz-signature" cols="72">Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
<a class="moz-txt-link-freetext" href="http://www.salespartner.co.nz">http://www.salespartner.co.nz</a>
PO Box 13085
Johnsonville
Wellington </pre>
<br>
On 20/01/2011 3:45 p.m., Marshland Engineering wrote:
<blockquote cite="mid:6C9B31C08A49468CA121A0FBD3637E03@Aquilo"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.18999">
<style></style>
<div><font face="Arial" size="2">Is there a way to store variables
so I can use them from one procedure to another? </font></div>
<div> </div>
<div><font face="Arial" size="2">I have been currently storing
them in hidden edit.text boxes on the form but there must be a
better way. </font></div>
<div> </div>
<div><font face="Arial" size="2">Cheers Wallace</font></div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</body>
</html>