Solved

"Invalid class reference" error executing control panel applet

Posted on 2004-09-25
2
765 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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