Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Free Pascal on 16 bit ELKS Linux
« Last post by toncho11 on Today at 08:19:43 pm »
Normally an OS provides a libc that is wrapper for all the kernel functions + some other useful libs as Math.
So one needs to bind Pascal's functions for memory allocation, file system access and console input/output to the ones provided by ELKS' libc. But of course it is a lot of work. I was inspired seeing that Free Pascal supports many platforms.
2
Databases / DBGid Title Click to sort-Quick question
« Last post by What I can do on Today at 08:12:05 pm »
OS: Microsoft Windows 10 Home Version 10.0.18363
Compiler: Lazarus 3.2 FPC:3.2.2
DataBase *.mdb
Project:  DBGrid title click sort
Why does this ...
Code: Pascal  [Select][+][-]
  1. procedure TForm1.DBGrid1TitleClick(Column: TColumn);
  2. begin
  3.  SQLCheckQurey.IndexFieldNames := Column.FieldName + ' DESC';
  4. end;
  5.  
Work perfectly but this
Code: Pascal  [Select][+][-]
  1. procedure TForm1.DBGrid1TitleClick(Column: TColumn);
  2. begin
  3.  SQLCheckQurey.IndexFieldNames := Column.FieldName + ' ASC';
  4. end;
  5.  
produce an error
'
3
Audio and Video / Re: PlaySound doesn't play sound from resource
« Last post by KodeZwerg on Today at 07:55:56 pm »
The easiest way to add a resource to an application - without any other tools - is to go to "Project" > "Project options" > "Project options" > "Resources"; click "Add", switch the file type filter to "All files (*.*)"; select the file to be added > "Open". The file is now listed in the "Resources" windows. Note the name in the "Resource" column - this is the name which you must use to open the resource in the application. To the left of it, you see "RCDATA" in the "Type" column; this is the type of the resource which you usually must specifiy when you load the resource (you must preceed the type name with an "RT_").

If you follow this, your "Bell.wav" will be in the resources as BELL of type RCDATA. In order to open it in your application as a resource stream you must write
Code: Pascal  [Select][+][-]
  1.   resStream := TResourceStream.Create(HINSTANCE, 'BELL', RT_RCDATA);

A little disadvantage of this method is that the files added to the resources must be available whenever the application is compiled. The "lazres" utility, on the other hand, allows you to create resource files independent of compilation.
or, also within this tool called Lazarus, create a new file, add
Code: Pascal  [Select][+][-]
  1. LANGUAGE 0,0
  2. #define RCDATA 10
  3. Bell RCDATA "Bell.wav"
save file as "sounds.rc" in project folder.
copy bell.wav into project folder.
inside code use "{$R 'sounds.rc'}" near under "implementation"
in theory its the same as adding by project options, since its just text its for me more comfortable.
requires a full fpc or lazarus installation, wherever the binary resource compiler is deployed with.
4
Audio and Video / Re: PlaySound doesn't play sound from resource
« Last post by shyub on Today at 07:51:44 pm »
wp, thank you very much!
5
Lazarus Extra Components / Re: Working on BGRAKnob features
« Last post by SandyG on Today at 07:28:22 pm »
Glad to give back to the community and make the acquaintance (@circular @lainz)

I just took a look at your comments, all of the suggestions seem good, commented in Github, will take another crack at the sector settings as well.

If you have a 'jcfsettings.cfg' file for the JEDI formatter that you can attach as I have changed mine so many times, I'm not sure what's good anymore and would be great to have the same as the BGRA project uses, that is of course with the exception space before and after the ' : ' ... JK ;)

Sandy


Hello SandyG,

Thank you very much for your contribution. I have reviewed the changes on the GitHub merge discussion:
https://github.com/bgrabitmap/bgracontrols/pull/175

I propose to change the way tkSector works, so that MinValue and MaxValue will still be relevant.

Regards
6
Hi,

Works now on Linux with AVX2.

It's too complicated to install an older version of OpenCV,
because some of my programs depend on a newer version and my CMake is also newer.

B->
7
Lazarus Extra Components / Re: Installing and using VampyreImaging
« Last post by wp on Today at 07:10:29 pm »
You must add the VampyreImaging package to the "Requirements" of your project: Open "Project" > "Project Inspector". In the appearing window, click on "Add" > "New requirement". Find the vampyre package in the list, select it > "OK". Then the vampyre units should be found.
8
Audio and Video / Re: PlaySound doesn't play sound from resource
« Last post by wp on Today at 07:03:31 pm »
The easiest way to add a resource to an application - without any other tools - is to go to "Project" > "Project options" > "Project options" > "Resources"; click "Add", switch the file type filter to "All files (*.*)"; select the file to be added > "Open". The file is now listed in the "Resources" windows. Note the name in the "Resource" column - this is the name which you must use to open the resource in the application. To the left of it, you see "RCDATA" in the "Type" column; this is the type of the resource which you usually must specifiy when you load the resource (you must preceed the type name with an "RT_").

If you follow this, your "Bell.wav" will be in the resources as BELL of type RCDATA. In order to open it in your application as a resource stream you must write
Code: Pascal  [Select][+][-]
  1.   resStream := TResourceStream.Create(HINSTANCE, 'BELL', RT_RCDATA);

A little disadvantage of this method is that the files added to the resources must be available whenever the application is compiled. The "lazres" utility, on the other hand, allows you to create resource files independent of compilation.
9
Audio and Video / Re: PlaySound doesn't play sound from resource
« Last post by shyub on Today at 06:34:06 pm »
I didn't formulate the question quite correctly. I have a file "Bell.wav", how can I put it in the resources instead of "ALARM02"?
10
Audio and Video / Re: PlaySound doesn't play sound from resource
« Last post by TRon on Today at 06:25:57 pm »
I get the *.LRS file using the "lazres.exe" utility with the command "lazres sound.lrs ALARM02.wav".
Please do not use that (anymore). Instead see here.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018