Solved

Delphi Tbitmap

Posted on 2003-11-04
8
1,686 Views
Last Modified: 2010-01-26
I'm creating a TBitmap var Bitmap: TBitmap; begin Bitmap : =TBitmap.Create; the problem is that here I get a compiler error of 'Object or class type required'. Any ideas why?
0
Comment
Question by:LeningYang
8 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 63 total points
Comment Utility
??

thats ok:

procedure TForm1.Button1Click(Sender: TObject);
var Bitmap: TBitmap;
begin
  Bitmap :=TBitmap.Create;
  ...
end;

the problem must be on another point

meikl ;-)
0
 
LVL 24

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 62 total points
Comment Utility
Include Graphics in the uses section or make sure that it is included.

Regards,
  Tomas Helgi
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
yep, thats it, thomas
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

by:j42
Comment Utility
There are two types of TBitmap. One is a class (in Graphics.pas) the other is just a record (maybe in Windows.pas). It depends on your uses list which one will be used. You can always force Delphi to take the one you want by saying Graphics.TBitmap or Windows.TBitmap.
0
 

Expert Comment

by:sepknow
Comment Utility
Init Delphi variables to prevent warning message.
0
 
LVL 2

Expert Comment

by:sdkswat
Comment Utility
I had the same problem, j42 is definitely right. The order of user clause can cause this problem.
If you are working on a TBitmap like in a TImage object, You will have to add Windows unit before Graphics unit.

You have accepted the wrong answer mate. Answer of j42 was enough clear to solve this problem.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now