Build proper desktop apps in B4PPC with this awesome Forms library

agraham

Expert
Licensed User
Longtime User
Well I had to get your attention somehow.

Just in time for you to play with over the weekend I have completed and packaged up my latest - and probably ultimate - library. Ultimate as in best rather than last. It requires .NET 2.0 on the desktop.

Example demo and help file included. Run it and gasp in amazement at what you can now do with Basic4PPC on the desktop! Together with my RichTextDesktop printing library you can now do wonderful things.

You can probably guess that I am "pretty chuffed" with this one. I hope you are too.

BTW - I did check with Erel in advance that this wasn't a step too far for B4PPC. He has played with a beta so he knew it was coming.

EDIT: - If you run the IDE with the "Tools -> Check for unassigned/unused variables" option ticked you will get an error in the demo app as reported by Cableguy in post #9 of this thread below. Correct the reference to B4Pobject1 in line 21 to read B4Pobject(1). Sorry!
 

Attachments

  • FormExDesktop.zip
    52.5 KB · Views: 255
Last edited:

Cableguy

Expert
Licensed User
Longtime User
I can't get it to work?!

I get the attached error message...
 

Attachments

  • erro.GIF
    erro.GIF
    11.3 KB · Views: 60

Cableguy

Expert
Licensed User
Longtime User
Hey Paulo, please extractit to a folder first :)

Dham buitl-in zip function....
It used to be so simple , if it was zipped, it didn´t open.period...
Thanks, DZT, sorry for the ridiculous error question...
 

Cableguy

Expert
Licensed User
Longtime User
Got it working but be advised, theres an error at line 21....

B4X:
Formlib1.New1("Form1",B4Pobject1)
Should be
B4X:
Formlib1.New1("Form1",B4Pobject(1))
Also, some controls background color is not the same as the form's...
 
Last edited:

agraham

Expert
Licensed User
Longtime User
Got it working but be advised, theres an error at line 21
B4X:
Formlib1.New1("Form1",B4Pobject1)
Should be
B4X:
Formlib1.New1("Form1",B4Pobject(1))
Well spotted. However it works because I don't use anything in Formlib that calls back into B4PPC so in this instance B4PObject1 is just a placeholder.
Also, some controls background color is not the same as the form's...
Come on! It's only a rough demo of capabilities not a polished app! (Actually I quite like the look) ;)
 

Cableguy

Expert
Licensed User
Longtime User
Well spotted. However it works because I don't use anything in Formlib that calls back into B4PPC so in this instance B4PObject1 is just a placeholder.
Come on! It's only a rough demo of capabilities not a polished app! (Actually I quite like the look) ;)

Didn't mean to put you down....The dll is very good....
Still there is alway rooms for improvement....

The B4PObject issue was not important, but the app refused to start before the corrected syntax, so any new user could have the same problem...

I say it again, it was NOT to put you down, it is a very good dll...
 

agraham

Expert
Licensed User
Longtime User
the app refused to start before the corrected syntax, so any new user could have the same problem
Really! Are you running version 5.80? It works fine as originally posted on my systems so I can't think what the difference could be. What error did you get?
 

Cableguy

Expert
Licensed User
Longtime User
error image attached...I'm runnung v5.80
 

Attachments

  • erro2.GIF
    erro2.GIF
    9.4 KB · Views: 28

agraham

Expert
Licensed User
Longtime User
Ah - I see now. You have the "Tools -> Check for unassigned/unused variables" option ticked and B4PPC is complaining because it thinks B4PObject1 is a variable that is never assigned to.

I normally run with this checked but somehow I must have unchecked it without noticing and missed the error. I've made an edit to the orignal post to warn people. Thanks.
 

taximania

Well-Known Member
Licensed User
Longtime User
Not sure if this means anything, but if you close a child window (x top right) in the 'Make MDI' example, close the example, then restart it, the program errors. Cannot access a disposed object.

Just thought i'd mention it. From a programming point of view, you wouldn't try to open a window you have already closed.

Just thoght i'd mention it.
 

agraham

Expert
Licensed User
Longtime User
Not sure if this means anything, but if you close a child window (x top right) in the 'Make MDI' example, close the example, then restart it, the program errors. Cannot access a disposed object.
Yes, this behaviour is documented at line 376 on the demo and also under the Closing event in the Help. Not all the windows are protected as you will see.

What is not well documented is that if you do a FormEx.Run to start the app then any code after that in App_Start is never executed.
 

BjornF

Active Member
Licensed User
Longtime User
Fantastic !

I really really like this library :sign0060:

I enjoy the simplicity of Basic4ppc and enjoy programming for my ppc but very often I do two versions of the program, one for the ppc and one for the pc (e.g. databases etc.) and I have often been annoyed at small things like the inability to minimize a form. Thanks to this library these minor annoyancies have disappeared (although I am sure I will find new ones ;) ).

Thank you for your work. Basic4ppc is very nice as it is, but the use of the different dll's really put the icing on the cake. :sign0188:

Björn
 

agraham

Expert
Licensed User
Longtime User
If you are trying to use the native CheckBox and RadioBtn on a FormEx form and are getting unhandled exceptions when trying to use their Click events then be aware that it is not your fault. Unfortunately there is a Basic4PPC internal feature that is incompatible with handling events from these two controls outside a Basic4PPC native Form. Other native controls' events should work fine on a FormEx.

Erel may fix this in the next release but in the mean time I intend to include versions of these two controls in a ControlsExDesktop library that I am presently developing. I hope to post it in less than a week from now but I have to decide on the final feature set and then get the help file written first. :(
 

agraham

Expert
Licensed User
Longtime User
A minor update - version 1.2 - attached. Only one change made. a new event added, Resize, that occurs repeatedly when the user resizes the form AND when the form is minimised, maximised and restored. I thought that ResizeEnd caught these last three events but it doesn't seem to - Resize does.
 

Attachments

  • FormExDesktop_1.2.zip
    28.8 KB · Views: 68
Top