tags:

views:

387

answers:

2

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".

+4  A: 

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.

Henk Holterman
+10  A: 

Add Forms to the uses clause of your unit. Eg:

uses Forms;
Jon Benedicto