Solved

TBitmap and compiler errors

Posted on 2000-03-11
2
211 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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 demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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, f…

911 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

26 Experts available now in Live!

Get 1:1 Help Now