I have a form that I want to make calls from both a console app and from a GUI app. I have a statusbar on the form. Since the form itself is not visible from the console app (it could be but rather not), I want the status updates going to the screen, not the statusbar.
I was hoping the following code would work, but does not.
Help?
Roo
Delphi Rules!
I was hoping the following code would work, but does not.
Code:
procedure TQbExport2MySqlForm.UpdateStatus(Pan: integer; s: string);
begin
{$IF APPTYPE CONSOLE}
if pan = 0 then write(s + #32) else writeln(s);
{$IFELSE}
StatusBar1.Panels[Pan].Text:= s;
{$IFEND}
end;
Roo
Delphi Rules!