ProgressBar control

Started by Paul Squires, August 25, 2019, 12:08:15 AM

Previous topic - Next topic

Paul Squires

Just a quick note that I have now completed adding the ProgressBar control to WinFBE's visual designer.
I hope to have a new beta (beta 3) uploaded today for everyone to test.
Paul Squires
PlanetSquires Software

Bumblebee

What determines if a progressbar displays a solid or broken fill indicator?
Failed pollinator.

José Roca

The use of visual themes. If you use visual themes, it appears solid; otherwise, broken.

Paul Squires

In WinFBE, to ensure that your application is themed, you should create your forms as part of a Project. One of the project options is to automatically create a resource file and manifest file. The manifest file will activate the theming for you.
Paul Squires
PlanetSquires Software

Bumblebee

#4
So once a form module has been in a project, it retains its theme?
That would explain why registry2.exe is maintaining the solid fill, even though it was subsequently renamed, and compiled multiple times as a single file.

I prefer the solid fill theme, yet I wish to know which entry in the code enables/disables visual themes.
Failed pollinator.

Paul Squires

Quote from: Bumblebee on May 17, 2020, 05:45:48 AM
I prefer the solid fill theme, yet I wish to know which entry in the code enables/disables visual themes.

The theme is activated via the inclusion of the mainfest.xml file, which is included in your project via the resource.rc file:


//=============================================================================
// Manifest
//=============================================================================
1 24 ".\manifest.xml"



You can read all about it here:  https://docs.microsoft.com/en-us/windows/win32/controls/cookbook-overview
Paul Squires
PlanetSquires Software

Bumblebee

I created two files, outside and within a project. The sole difference is in the comment field:

' You should always include a resource file that references a valid manifest.xml
' file otherwise your application will not properly display Windows themed controls.
' Sample resource.rc and manifest.xml files can be found in the WinFBE \Settings folder.
' The following WinFBE directive includes the resource in your application. Simply
' uncomment the line.
' If you are using WinFBE's project management features then delete the following line
' because a resource file will be generated automatically.
'     '#RESOURCE "resource.rc"


If I uncomment the line, there's a syntax error.
Are you using a comment block as a switch to apply visual themes?

Consistent behavior would be: If within a project, apply manifest when compiling. If outside (single file), do not apply the manifest.
Failed pollinator.

Paul Squires

Yes, you would get a compile error if you simply uncomment the line because you need to have a "resource.rc" file exist in your folder with the file you are compiling. The comment indicates that you can get sample resource file and manifest file from the \Settings folder. Outside of a project it is entirely the programmer's responsibility to include the resource file, etc. Only from within a project are resources and manifests automated.
Paul Squires
PlanetSquires Software

Bumblebee

Those files are in my FB folder. (resource.rc and manifest.xml) They were copied there when I created a test project. All my bas files are in this folder.
Failed pollinator.

Paul Squires

If you are still getting a compile error then ensure that only one of the ' comment characters are removed:

'#RESOURCE "resource.rc"

Notice the single ' comment character. WinFBE parses for the '#RESOURCE tag.
Paul Squires
PlanetSquires Software

Bumblebee

Yes, this works. It works for bas files that have never been in a project.
Failed pollinator.

Bumblebee

Is #RESOURCE a current or future preprocessor directive?
Failed pollinator.

Paul Squires

'RESOURCE is just something that I built into WinFBE to make it a little easier for people not using Projects to be able to add a resource to their form.

There are two others

'#CONSOLE ON

'#CONSOLE OFF
Paul Squires
PlanetSquires Software

Bumblebee

I did a search for #CONSOLE and your post is the only result. Let the people know!

Sorry for being confused. If I'd seen 'Resource=False I would've assumed it wasn't meant as literal FB code.
Failed pollinator.