?
Solved

Delphi Tbitmap

Posted on 2003-11-04
8
Medium Priority
?
1,741 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
6 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 252 total points
ID: 9678199
??

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 26

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 248 total points
ID: 9678430
Include Graphics in the uses section or make sure that it is included.

Regards,
  Tomas Helgi
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9678446
yep, thats it, thomas
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Expert Comment

by:j42
ID: 9679972
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
ID: 20633216
Init Delphi variables to prevent warning message.
0
 
LVL 2

Expert Comment

by:sdkswat
ID: 26412405
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

840 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