AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Delphi Glyph SpeedButton Bitmap im Sourcecode möglich?
Thema durchsuchen
Ansicht
Themen-Optionen

Glyph SpeedButton Bitmap im Sourcecode möglich?

Ein Thema von raena · begonnen am 22. Jul 2008 · letzter Beitrag vom 22. Jul 2008
 
raena

Registriert seit: 30. Dez 2007
124 Beiträge
 
#1

Glyph SpeedButton Bitmap im Sourcecode möglich?

  Alt 22. Jul 2008, 15:23
Hallo,

gibt es eine Möglichkeit, die Bitmaps für Icons im Sourcecode abzulegen?
Sprich das Icon soll angezeigt werden auch wenn die Exe Datei des Projekts
ausgefüht wird ohne, dass die Bitmap Dateien im entsprechenden Verzeichnis liegen.

Delphi-Quellcode:
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons;

type
  TForm2 = class(TForm)
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
   procedure bmp_to_button(file_bmp:string;Button:TSpeedbutton);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.bmp_to_button(file_bmp:string;Button:TSpeedbutton);
var
   bmp: TBitmap;
begin
   bmp:=TBitmap.Create;
   try
     bmp.LoadFromFile(file_bmp);
     Button.Glyph:=bmp;
   finally
     bmp.Free;
   end;
end;


procedure TForm2.FormCreate(Sender: TObject);
begin
bmp_to_button('mail_24.bmp', SpeedButton1);
bmp_to_button('new_document_24.bmp', SpeedButton2);
end;

end.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:18 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz