E2297 'this' can only be used within a member function (C++)

From RAD Studio