On 24.11.2013 03:26, Donald Ziesig wrote:
Image1.Picture.LoadFromLazarusResource('PIX2'); // Tried 'pix2' as well
Lazarus Resources FPC Resources
Lazarus Resources where the resources that were used before FPC
supported resources itself. So kick out the LResources unit and change
Hi All!
I have been trying to use a resource file (mydata.rc) to include some
bitmap images in an app but with no success. For simplicity, I have
pared the rc file to a single line:
pix2 BITMAP /home/mydir/Desktop/myapp/2.bmp
I have the following lines in my main unit:
{$R *.lfm} //
{$R} (FPC style) resources are not the same as Lazarus resources. See:
http://wiki.freepascal.org/Lazarus_Resources
--
View this message in context:
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Resources-tp4034456p4034457.html
Sent from the Free Pascal - Lazarus mailing list archive
I`ve make a very easy lazarus resource file, is annexed:
unEdit_Add_Rem.lrs
Description: Binary data
, with two png files insides, and i`m using like this:
btnAdd.Glyph.LoadFromLazarusResource('edit_add');
initialization
{$I unEdit_Add_Rem.lrs}
Generates this error:
Exception Class:
Each class can only read 1 format.
btnAdd.Glyph is a TBitmap and therefore reads only bitmaps. But you
can first read to a PNG and then use Assign to convert to a bitmap.
Try doing it like this:
var
MyPNG: TPortableNetworkGraphic;
begin
MyPNG := TPortableNetworkGraphic;
Thanks!
Em 07/02/2012, às 12:32, Felipe Monteiro de Carvalho escreveu:
Each class can only read 1 format.
btnAdd.Glyph is a TBitmap and therefore reads only bitmaps. But you
can first read to a PNG and then use Assign to convert to a bitmap.
Try doing it like this:
var
MyPNG:
On Thu, Jul 29, 2010 at 13:10, Paul Ishenin i...@kmiac.ru wrote:
29.07.2010 8:08, Alexander Klenin wrote:
However, my question is -- is this yet another incompatible change
made without any warning? Or did I miss it?
I wrote about this change here:
30.07.2010 9:07, Alexander Klenin wrote:
No, Project Options - OK did not change .lpr file in any way.
.res file did not appear either.
This means that you have no resources: no manifest, no icon, no version
information.
Remove the old rc and manifest files if they are present and add a
On 28 Jul 2010, at 06:56 AM, Paul Ishenin i...@kmiac.ru wrote:
26.07.2010 19:59, Mattias Gärtner wrote:
Can you add some links or paragraphs on
http://wiki.lazarus.freepascal.org/Lazarus_Resources
about the new resources?
Done.
Oh brilliant, thanks so much. The article has a lot more
29.07.2010 8:08, Alexander Klenin wrote:
However, my question is -- is this yet another incompatible change
made without any warning? Or did I miss it?
I wrote about this change here:
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html
The problem is that previosly
26.07.2010 19:59, Mattias Gärtner wrote:
Can you add some links or paragraphs on
http://wiki.lazarus.freepascal.org/Lazarus_Resources
about the new resources?
Done.
Best regards,
Paul Ishenin.
--
___
Lazarus mailing list
From: Josh Lee [mailto:frozen-drago...@hotmail.com]
Sent: 25 July 2010 12:11
You can add files as User-Defined resource types, or use RCDATA for
raw
(binary) data. See MSDN Resource Definition Statements,
User-Defined
Resources
Thank you, I read up on them.
Do you know where I can find a
the source is very educational. I love the idea
that they implemented Pascal in it, so you can make custom scripts! It's like a
non-GUI Lazarus ;)
But isn't Delphi resources set out different from Lazarus resources?
The first thing I'm going to do when I fully understand Lazarus resources is
write
different from Lazarus resources?
Delphi uses Windows resources though the Windows API
Lazarus supports 2 kinds of resources: Windows resources (RC files)
and Lazarus resources (LRS files) using FPC/Lazarus APIs
In that sense looking at the Inno Setup source code probably won't
help much
26.07.2010 18:23, Felipe Monteiro de Carvalho wrote:
In that sense looking at the Inno Setup source code probably won't
help much as it will probably be using Windows API which aren't
portable.
FPC resources api is compatible with windows.
Best regards,
Paul Ishenin.
--
Zitat von Paul Ishenin webpi...@mail.ru:
26.07.2010 18:23, Felipe Monteiro de Carvalho wrote:
In that sense looking at the Inno Setup source code probably won't
help much as it will probably be using Windows API which aren't
portable.
FPC resources api is compatible with windows.
Can you
Josh,
You can store a resource file on your exe by compiling a resource from
a file via this tool ( http://lazarusbrasil.org/Resources.zip ) and
adding the line {$R ResName.res} to your project.
Then you can call the resource by name so:
var
ResStr :TResourceStream;
begin
ResStr :=
On 26 Jul 2010, at 01:20 PM, Antônio antoniog12...@gmail.com wrote:
Josh,
You can store a resource file on your exe by compiling a resource from
a file via this tool ( http://lazarusbrasil.org/Resources.zip ) and
adding the line {$R ResName.res} to your project.
Then you can call the
I am now very confused. I have been told by someone on Lazarus Forums that to
write an installer, I would need to use Resources. I have done some research
into resources, and got this:Resource (Windows)From Wikipedia, the free
encyclopedia
In Microsoft Windows, resources are read-only data
On Sun, 25 Jul 2010 09:52:08 +0100
Josh Lee frozen-drago...@hotmail.com wrote:
I am now very confused. I have been told by someone on Lazarus Forums that to
write an installer, I would need to use Resources. I have done some research
into resources, and got this:Resource (Windows)From
Josh Lee
Programmer - Owner of JLSoftware
On 25 Jul 2010, at 10:05 AM, Mattias Gaertner nc-gaert...@netcologne.de wrote:
On Sun, 25 Jul 2010 09:52:08 +0100
Josh Lee frozen-drago...@hotmail.com wrote:
I am now very confused. I have been told by someone on Lazarus Forums that
to write
Josh Lee schrieb:
Each resource has a type and a name, both being either numeric
identifiers or strings.
[...]
So it seems that I cannot store a FILE in a resource.
You can add files as User-Defined resource types, or use RCDATA for raw
(binary) data. See MSDN Resource Definition
You can add files as User-Defined resource types, or use RCDATA for raw
(binary) data. See MSDN Resource Definition Statements, User-Defined
ResourcesThank you, I read up on them.Do you know where I can find a step by
step tutorial on how to create a stand alone program that installs
Josh Lee schrieb:
Do you know where I can find a step by step tutorial on how to create a
stand alone program that installs something on the hard disk?
No sorry. Details depend on what you want to install (files only,
registry settings...), if you want to add an uninstall option as well,
I know these look like spam, I'm not that familiar with mailing lists...
Could someone please give me a description and documented code explaining on
how Lazarus Resources works and how to use it to make a stand alone .exe that
transfers files to the hard drive? I really need to know, as I wish
On Tue, 20 Jul 2010 18:24:36 +0100
Josh Lee frozen-drago...@hotmail.com wrote:
Hello people.
I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I
think!), and I'm trying to make a (useless) stand-alone program that takes
the cmd.exe from the resource and places it
John, I run Vista.
Yes, there is error messages, I simply do not know the syntax to achieve it.
- Josh
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Josh Lee wrote:
John, I run Vista.
Yes, there is error messages, I simply do not know the syntax to achieve it.
- Josh
Oh well, as you can see error messages, you can type them here?
John
--
___
Lazarus mailing list
Hey, people.
I'm quite a novice Lazarus programmer, and I would like a bit of help, please.
How do I use Lazarus resources?
I think I know what they are, files that can be compiled into the binary?
I'm not sure, but it was suggested to me when I asked how an installer works.
Problem is, I can't
use Lazarus resources?
I think I know what they are, files that can be compiled into the binary?
I'm not sure, but it was suggested to me when I asked how an installer works.
Problem is, I can't find 'New Resource' in Lazarus, and I have no idea how to
use it anyway. I Googled it but can't find
Hello people.
I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I
think!), and I'm trying to make a (useless) stand-alone program that takes the
cmd.exe from the resource and places it in C:\.
I've tried, and failed, and the Lazarus wiki doesn't explain it very well.
Josh, I don't know much about resources, but:
- What OS? In Win Vista or 7 you may not be allowed to write to C:\
- Is there an error message?
John
Josh Lee wrote:
Hello people.
I've managed to compile a Lazarus resource, test.lrs. It has cmd.exe in it (I think!), and I'm trying to make a
32 matches
Mail list logo