Solved

TBitmap and compiler errors

Posted on 2000-03-11
2
210 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
Comment Utility
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
Comment Utility
Thanks for swift response.
I had Graphics, SysUtils, Windows
everything aok now.

cheers
Chris :))
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

11 Experts available now in Live!

Get 1:1 Help Now