Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.05.02;
Скачать: CL | DM;

Вниз

ICO to BMP   Найти похожие ветки 

 
Dentist ©   (2004-04-16 10:00) [0]

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Registry, WinProcs, StdCtrls, ExtDlgs, CoolTrayIcon, ComObj, ShlObj, Menus;

type
 TForm1 = class(TForm)
   Button1: TButton;
   procedure Button1Click(Sender: TObject);
 private
   { Private declarations }
 public
   { Public declarations }
 end;

var
 Form1: TForm1;

procedure Button1Click(Sender: TObject);

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
 TheIcon: TIcon;
 TheBitmap: TBitmap;
begin
 TheIcon := TIcon.Create;
 TheIcon.LoadFromFile("c:\1.ico");
 TheBitmap := TBitmap.Create; - говорит Object or class type required
 TheBitmap.Height := TheIcon.Height;
 TheBitmap.Width := TheIcon.Width;
 TheBitmap.Canvas.Draw(0, 0, TheIcon);
 Form1.Canvas.Draw(10, 10, TheBitmap);
 TheBitmap.Free;
 TheIcon.Free;
end;
end.

Какой класс или объект ему надо?


 
Dentist ©   (2004-04-16 10:02) [1]

А потом еще:
[Error] Unit1.pas(36): Undeclared identifier: "Height"
[Error] Unit1.pas(37): Undeclared identifier: "Width"
[Error] Unit1.pas(38): Undeclared identifier: "Canvas"
[Error] Unit1.pas(39): Incompatible types: "TGraphic" and "tagBITMAP"
[Error] Unit1.pas(40): Undeclared identifier: "Free"
[Error] Unit1.pas(22): Unsatisfied forward or external declaration: "Button1Click"


 
han_malign ©   (2004-04-16 10:15) [2]

замени TBitmap - Graphics.TBitmap - и будет тебе щастье

З.Ы. В каком то модуле, прописанном после Graphics, перекрыт тип TBitmap и нужно либо явно указать модуль, либо передвинуть Graphics в конец uses...


 
han_malign ©   (2004-04-16 10:17) [3]

И здается мне, что это WinProcs...



Страницы: 1 вся ветка

Текущий архив: 2004.05.02;
Скачать: CL | DM;

Наверх




Память: 0.45 MB
Время: 0.033 c
14-1081088912
Гаврила
2004-04-04 18:28
2004.05.02
Постоянная работа для программера в Москве


4-1079030059
BaDeVlad
2004-03-11 21:34
2004.05.02
Как сделать многоуровневую отмену в Richedit?


1-1082026825
К.С.
2004-04-15 15:00
2004.05.02
Как узнать если в ресурсах bitmap?


9-1068326761
DDS
2003-11-09 00:26
2004.05.02
OpenGL: Как повернуть сцену относительно определенной точки?


1-1081788628
c1
2004-04-12 20:50
2004.05.02
Как сделать чтобы hint над button не исчезал





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский