View Single Post
  #1   Spotlight this post!  
Unread 24-06-2002, 00:30
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Canvas in Delphi - Simple question

Posted by Ian.

Student on team #188 from Woburn C.I..

Posted on 11/29/2000 3:24 PM MST


In Reply to: Canvas in Delphi - Simple question posted by Hannah on 11/23/2000 8:04 AM MST:



Probably the easiest way to show some text on the screen is with the ShowMessage procedure, e.g.:

ShowMessage('Sample message');

A little box will pop up with the text you put as the parameter and an 'OK' button to close the box. If you want something more sophisticated, you could create a new form with text, graphics, etc. Before running the program, set the 'Visible' property of the second form to false. Then, when you want to show it, simply call the Show procedure, e.g.

Form2.Show;

Then, you can use Form2.Hide to hide it again (for instance, you could make the second form call its own Hide procedure when it is clicked). If you want to access labels or other components of the second form from within your main program, simply put the name of the second form in front of the name of the component, e.g.

Form2.Label1.Caption:='This is a label';
Form2.Button1.Enabled:=False;

Hope this helps!

-Ian Mackenzie
Team 188
www.team188.com


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.