Questions before moving on to FB

New to FreeBASIC? Post your questions here.
stephane
Posts: 6
Joined: Mar 07, 2021 13:26

Questions before moving on to FB

Post by stephane »

Hello
(my english is bad so I use google to translate)

I discovered freebasic today and I'm very pleasantly surprised me who comes from delphi and where the smallest form is 2Mo, here it's 105 ko !

But before switching to FreeBasic, I'd like to have some answers:

1 / Can we manipulate a page opened in the default browser (get/set input value, get URL and title etc) natively, with a lib, which one ? Is it cross-platform ...

2 / In delphi you can modify the value of a component in the exe (already compiled). Is it possible in FB or must we systematically recompile it ?

3 / I saw in FBEditor (very well) that there is no 'component' menu. Are there additional components ? Otherwise, if I use VisualStudio, can I take advantage of the full range of components available to us?

Thank you for your advice
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: Questions before moving on to FB

Post by Xusinboy Bekchanov »

stephane wrote: 1 / Can we manipulate a page opened in the default browser (get/set input value, get URL and title etc) natively, with a lib, which one ? Is it cross-platform ...
Is it for WebBrowser control or for another Browser in your computer?
stephane wrote: 2 / In delphi you can modify the value of a component in the exe (already compiled). Is it possible in FB or must we systematically recompile it ?
While this exe is running?
stephane wrote: 3 / I saw in FBEditor (very well) that there is no 'component' menu. Are there additional components ? Otherwise, if I use VisualStudio, can I take advantage of the full range of components available to us?

Thank you for your advice
I have not yet implemented the Additional Components function. Is VisualStudio the one from Microsoft? If so, NET classes? Then take a look at this topic:
viewtopic.php?t=14792
stephane
Posts: 6
Joined: Mar 07, 2021 13:26

Re: Questions before moving on to FB

Post by stephane »

Thank you for your interest
Is it for WebBrowser control or for another Browser in your computer?
It is for the default webbroser used on the computer (chrome, edge, Firefox etc).
While this exe is running?
No at the close,on closequery i do a copy of the exe, manipule it, save the new exe and run it to wait the initial exe is closed, the new exe delete ithe initial exe and replace it by the new exe. i hope it's clear
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Questions before moving on to FB

Post by caseih »

stephane wrote:1 / Can we manipulate a page opened in the default browser (get/set input value, get URL and title etc) natively, with a lib, which one ? Is it cross-platform ...
FB is cross platform in that you can compile and run .bas files on any supported platform, provided you use only what's provided by the FB runtime library. The runtime library provides traditional BASIC features like strings, file i/o, simple graphics, etc. Think of it as a superset of QuickBASIC. FB can do very advanced things with external, third-party libraries.

No FB cannot open a page in the default browser. You must use OS-specific function calls to do that. Other than manipulating the title of the FB graphics console window, there is no facility for creating or interacting with GUIs in any way. That is left to third-party libraries.

I think FB has more in common with a C compiler than anything like Delphi. There is nothing like the VCL that's a part of FB, although FB can work very well with some third-party GUI libraries.
2 / In delphi you can modify the value of a component in the exe (already compiled). Is it possible in FB or must we systematically recompile it ?
Not it's not possible. Must recompile or use some other method to store a value, such as a configuration file.
3 / I saw in FBEditor (very well) that there is no 'component' menu. Are there additional components ? Otherwise, if I use VisualStudio, can I take advantage of the full range of components available to us?
No. FB does not include any sort of "components." That's left to third-party libraries to do. There is no built-in GUI designer but several people have created their own tools. These are not part of the FB compiler, runtime, or language. When you download and install FB, it's just a command-line compiler. That is all. There are editors like FBEdit available, but they are all third party. The compiler, FBC, is analogous to GCC or the command-line compiler included in Visual Studio.
stephane
Posts: 6
Joined: Mar 07, 2021 13:26

Re: Questions before moving on to FB

Post by stephane »

Ok, thank you i all understood.

Is there a site with all third party libs in the same place ?
Xusinboy Bekchanov
Posts: 782
Joined: Jul 26, 2018 18:28

Re: Questions before moving on to FB

Post by Xusinboy Bekchanov »

stephane wrote:Ok, thank you i all understood.

Is there a site with all third party libs in the same place ?
You can take a look here:
viewtopic.php?t=28510
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Questions before moving on to FB

Post by dodicat »

This is a 32 bit page with some libraries.
https://sourceforge.net/projects/fbc/fi ... Libraries/
I don't think anybody has updated this third party library page in a long time.
Also, from the documentation page:
https://www.freebasic.net/wiki/ExtLibTOC
Normally for .dll files or static .a for a particular library file you have to visit pages like these.
Many of the .bi files associated with external libraries are already in place in the inc folder of freebasic.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Questions before moving on to FB

Post by srvaldez »

you can also download additional libraries for win32/64 from https://users.freebasic-portal.de/stw/builds/
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Questions before moving on to FB

Post by marcov »

(note that the postediting of Delphi EXEs is probably the embedded resources, not the generated code. Each form has its own resource that you can edit, originally mainly intended for translators to make labels and controls larger if the translated language was more verbose.

In simple db apps, SQL queries are often also stored in the forms resources)
stephane
Posts: 6
Joined: Mar 07, 2021 13:26

Re: Questions before moving on to FB

Post by stephane »

thank you.

In delphi i modify the component value like label caption etc not the algorytm... it's exact.

I will therefore search the list of libs for the one I can use to interact with the default browser
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Questions before moving on to FB

Post by MrSwiss »

stephane wrote:In delphi i modify the component value like label caption etc not the algorytm... it's exact.
For this there are 3rd party tools available that focus entirely on that type of modification.

See (for example): ResourceHacker (Portable) Windows 32/64 specific.
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Questions before moving on to FB

Post by marcov »

MrSwiss wrote:
stephane wrote:In delphi i modify the component value like label caption etc not the algorytm... it's exact.
For this there are 3rd party tools available that focus entirely on that type of modification.

See (for example): ResourceHacker (Portable) Windows 32/64 specific.
Sure, but to be able to use them, the forms actually must be in the resources.

Note: resource-hacker is written in Delphi.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Questions before moving on to FB

Post by caseih »

@stephane, perhaps FreePascal and Lazarus (with the LCL which is like the VCL) might be more appropriate for your needs than FB? Lazarus is more of a Delphi replacement and has the rapid-application-development features you are used to with Delphi. Plus it's available on Linux, Windows, and Mac.

There has been talk over the years about what FB should be, whether it should be more of an IDE, have an official GUI library baked in. But it's just a small project carried on by a few volunteers in their spare time.
stephane
Posts: 6
Joined: Mar 07, 2021 13:26

Re: Questions before moving on to FB

Post by stephane »

caseih wrote:@stephane, perhaps FreePascal and Lazarus (with the LCL which is like the VCL) might be more appropriate for your needs than FB? Lazarus is more of a Delphi replacement and has the rapid-application-development features you are used to with Delphi. Plus it's available on Linux, Windows, and Mac.
My choice (FB) is that exe are very small instead delphi exe. Lazarus exe are biggers than delphi exe...

FB may not be the right choice, I will continue my investigations. Thank you all for your answers and advice
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Questions before moving on to FB

Post by marcov »

stephane wrote:
caseih wrote:@stephane, perhaps FreePascal and Lazarus (with the LCL which is like the VCL) might be more appropriate for your needs than FB? Lazarus is more of a Delphi replacement and has the rapid-application-development features you are used to with Delphi. Plus it's available on Linux, Windows, and Mac.
My choice (FB) is that exe are very small instead delphi exe. Lazarus exe are biggers than delphi exe...
Lazarus and Delphi are only large if you use the easy and portableframeworks. if you are willing to go to the bare metal, you can perfectly do small windows GUI development on winapi level, just like in FB. IOW it is a framework vs non-framework thingy, not a language A vs Language B thingy.

One of the FPC sponsors used FPC to create router firmwares.
Post Reply