I'm probably going about this isssue in a totally incorrect way but I tend to learn by making mistakes!
I've never previously needed to think about IP Protection but my current project will go to a third party that I don't know personally for testing & review so I thought that it was about time I incorporated some sort of 'Pass Code' to at least look as if I care

The logic of creating a number from a string of characters is no problem nor retreiving same for comparison. Nor are the issues of getting the 'user' details upon first running the program, saving those and getting them back on subsequent runs. What I can't do is get the [Pass Code] dialogue to appear and be editable on subsequent runs.
I eventually hit upon the idea to call the testing routine, as in:
procedure Get_PassCode;
begin
Form1.Test_Panel.show;
GoodToGo := false;
Repeat
Form1.Pass_Code_TestEditingDone(Nil);
until GoodToGo;
Form1.Test_Panel.Hide;
Form1.ThreadFormList.Enabled:=False;
end;
The test procedure takes the number typed into a TEdit and compares it to the known code - viz.
procedure TForm1.Pass_Code_TestEditingDone(Sender: TObject);
begin
Pass_Test := StrToFloat(Pass_Code_Test.Text);
GoodToGo := (Pass_Code-Pass_Test = 0);
If Pass_Test = 0 then
begin
Application.Terminate;
end;
If GoodToGo then
begin
Form1.Hello_Label.Caption:='Thanks';
Form1.Hello_Label.Color:=clOlive;
Form1.User_FirstName_Label.Caption:=UserName;
Form1.User_FirstName_Label.Show;
Form1.Hello_Label.Show;
Application.ProcessMessages;
Sleep(1000);
KillPanel;
Form1.Test_Panel.Hide;
Form1.ThreadFormList.Enabled:=True;
end
else
begin
Form1.Hello_Label.Caption:='ERROR';
Form1.Hello_Label.Color:=clRed;
Form1.Hello_Label.Show;
end;
end;
As you can see, the TEdit is on a TPanel which can be shown or hidden and that part works as expected. What happens is that if I 'initiallize' Pass_Code_Test.Text the panel doesn't appear for entry/editing and if I don't initiallize it then I get an 'Error: "" is an invalid float' and the panel appears after clicking [OK]
(The 'KillPanel' is just a fancy way to make it deminish in size rather than just vanish as in .Hide)