Reputation: 1983
I'm using Delphi 7. I'm trying to add a procedure with a call to "application.processmessages" in a non-VCL unit. I get the error "undeclared identifier: application".
How do I reference the TApplication class from a non-vcl unit? Where in the documentation is this described? It is hard to find due to the broad use of the term "application".
Upvotes: 1
Views: 15468
Reputation: 10582
Add Forms to the uses clause of your unit. Eg:
uses Forms;
Upvotes: 18
Reputation: 273244
Well, if you do it then your unit becomes a VCL (-dependent) unit, are you sure that's the right way to go?
Application is a global variable in the Forms unit.
Upvotes: 5