Solved

"Invalid class reference" error executing control panel applet

Posted on 2004-09-25
2
762 Views
Last Modified: 2010-04-16
Started a Control Panel Application in Delphi 7, setting icon, title and description. Created a Form window and set unit1(applet module) to use unit2 (Form). Runs the following code on applet activation:

with TForm2.Create(nil) do
try
  ShowModal
finally
  Free
end;

Installed the applet and launched Control Panel which produces 3 identical application errors:

Exception EAppletException in module Project1.cpl at 00022DD2.
Invalid class reference for TAppletApplication.

Double-clicking the applet icon from control panel produces the error once more before displaying form2 successfully. I don't think I'm trying to do anything special here, so hopefully I am missing something really obvious!

Thanks, J.
0
Comment
Question by:seizures
2 Comments
 
LVL 6

Accepted Solution

by:
vadim_ti earned 250 total points
ID: 12152318
Your Form2 is autocreated in your Project file (DPR)
delete or comment  string

 Application.CreateForm(TForm2, Form2);

in your .DPR file
0
 

Author Comment

by:seizures
ID: 12153948
That did the trick. It was driving me mad so thank you very much.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question