Solved

TBitmap and compiler errors

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

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…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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