Solved

TBitmap and compiler errors

Posted on 2000-03-11
2
215 Views
Last Modified: 2010-04-04
I'm creating a TBitmap

var Bitmap: TBitmap;
begin
  Bitmap : =TBitmap.Create;
  etc etc
theproblem is that here a get a compiler error of 'Object or class type required'.
Any ideas why? I used the same piece of code in another app with no problems.

cheers
Chris

0
Comment
Question by:xpher
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 2608336
hehe hi xpher you can blame microsoft for this one .

see these 2 uses clauses:
uses
  Graphics,Windows,Messages, SysUtils...

uses
  Windows,Graphics, Messages, SysUtils...

the second is how yours should be.
tbitmap is also declared in windows.pas as microsift added a tbitmap to the windows and as it is declared in first uses clause after the graphics.tbitmap it is used instead .
therefore the error.

Regards Barry
0
 
LVL 1

Author Comment

by:xpher
ID: 2608372
Thanks for swift response.
I had Graphics, SysUtils, Windows
everything aok now.

cheers
Chris :))
0

Featured Post

Industry Leaders: 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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 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