Menu
Creating a form-based application using existing files. (In this case formmenudemo will be the default). In Lazarus type Ctrl+O, navigate to the program folder then open the.lpr file (in this case MenuDemo.lpr). Select the default type of new project – Application. You can compile and run the program without further changes. Feb 18, 2013 Example: there is a empty form that has an event: another form (from. LFM-file) to be loaded instead of this form by double-clicking on old. form at run time. I tried several ways to do this, for example: 1. File - FileStream - BinStream - BinStream.ReadComponent(Form) 2.
I have big problem with StringList. I have text file with text like this: I want to import this file and show first values, before '=' in RadioGroup. Second values after '=' i want to show on Label in moment when user clicks proper value on RadioGroup.
I would like to operate on Names and Values of StrongList.
Something like this: https://i.stack.imgur.com/dkLih.png
In *.pas file I have:
On FormCreate:
I try with RadioGroup like this:
But doesn't work. What I do wrong?
P.S. Sorry for my English :)
After I ported Delphi Windows service app to FPC Linux console app I tried to port program with GUI. I installed newest Lazarus on my Windows machine and converted simple 'hello world' app. One unit has form (.dfm file in Delphi). This form was converted to .lfm and .lrs files by Lazarus. But there is problem with compiling this:
First lines of FInfo.lrs file which looks like text file (not binary as .res files):
In designer I can see and edit this form, so I think it was converted with success.Maybe there is something wrong with .lrs file? Shouldn't it be binary as .res files?What should I do to compile this form?
EDIT:
My .pas unit has this form as:
Michał Niklas
Michał NiklasMichał Niklas
1 Answer
Remove any stray {$R *.res} or {$R *.lrs} directives.
2.2.x fpc/lazarus versions transform *.res files to .lrs files that are then included as structured constants. Adding *.res independantly produces this fail if included just below the implementation point, like in Delphi. The proper *.lrs inclusion point is in the initialization section.
Only 2.4.x (RC1 is out) will have 'real' resource support base on {$R *.res}. but that will probably take a few months to trickle through (0.9.30)
Marco van de VoortMarco van de Voort