Log in

View Full Version : form event questions



gsquare567
04-16-2007, 11:25 PM
i tried using OnKeyPress and OnClose like OnClick but it didnt work =S does any1 know how to use them? i know this is a bit advanced.

me_ntal
04-16-2007, 11:42 PM
What do you want to do exactly?

gsquare567
04-17-2007, 12:39 AM
those are events in forms. i want to know the basic layout for them.

EDIT: figured it out. scar has great features.

EDIT AGAIN: well, not really. what does TCloseAction mean in procedure CloseScriptForm(Sender: TObject; var Action: TCloseAction);
for example, on close of the form i want to terminatescript, but that always brings up the runtime error on showformmodal. and with the onkeypress, i want to change the keys to stars, but what is the key char for a backspace and for a delete?

gsquare567
04-18-2007, 02:20 AM
anybody?

me_ntal
04-18-2007, 06:47 AM
Do you have like a cancel button? If not just try this


procedure FormClose2(sender: TObject; var CanClose: Boolean);
begin
CanClose := True
end;

gsquare567
04-18-2007, 05:04 PM
what does canclose do? is it an internal variable or do i need to use it somehow?