Page 1 of 2

SBUTTON vs BTNBMP

Posted: Mon Oct 25, 2021 9:18 pm
by bradmaudlin
I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
I am having to problems, one when I use BTNBMP and the other when I use SBUTTON.
1. When I use BTNBMP you can't click (touch) too fast or it will miss a character. I believe it thinks you are "double" clicking the button instead of 2 single clicks. Using SBUTTON I get every button click as fast as you can click.
Is there a way to turn off the double click functionality in the BTNBMP class?

2. When I use SBUTTON it have a memory leak. I have tested the same code with BTNBMP buttons and SBUTTON button. Watching the Task Manager my program starts out at 15.2MB for both. After only 20 transactions the BTNBMP version is at 15.6MB while the SBUTTON version is at 19.6MB. I have tried putting a Memory(0) call at the end of each transaction, but it did nothing.
Does anyone have a SBUTTON version that doesn't leak memory? The memory leak only seems to happen when the button is created. If I create the dialog and press the buttons 2 times or 200 times i get the same memory leak amount (about .2MB).

Is there a different BUTTON class that might work for me?

Thanks
Brad

Re: SBUTTON vs BTNBMP

Posted: Tue Oct 26, 2021 10:28 pm
by karinha
Good evening, we highly recommend that you remove SBUTTON from your program.
Change everything to BUTTONBMP and test. Then test only with BTNBMP or another BUTTON(RButton, for example) model of FiveWin. See \samples. Eliminate SBUTTON from your entire project, urgently!

Regards, saludos.

Re: SBUTTON vs BTNBMP

Posted: Wed Oct 27, 2021 7:14 am
by Silvio.Falconi
my cent

for the beach program I always used Sbutton at the beginning, then someone had made me a particular VControl class where the button was not an ID control but was virtual later as the class no longer worked with new versions of fwh i used btnbmp.
For example, I have a screen of a beach with 40x20 buttons or 800

Re: SBUTTON vs BTNBMP

Posted: Wed Oct 27, 2021 9:15 pm
by nageswaragunupudi
I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
I am having to problems, one when I use BTNBMP and the other when I use SBUTTON.
1. When I use BTNBMP you can't click (touch) too fast or it will miss a character. I believe it thinks you are "double" clicking the button instead of 2 single clicks. Using SBUTTON I get every button click as fast as you can click.
Is there a way to turn off the double click functionality in the BTNBMP class?


There is no double click functionality for BTNBMP. Anyway we will do extensive tests with BTNBMP on touch screen and try to improve the performance and get back to you.

Does anyone have a SBUTTON version that doesn't leak memory?

Please consult Mr. Dutch, Thailand. You will find him on these forums.

Re: SBUTTON vs BTNBMP

Posted: Fri Dec 24, 2021 2:47 am
by dutch
Dear bradmaudlin,

I test SBUTTON as your issue (touch pos). I got the same memory leak and SBUTTON display shows slowly after 10 mins and 20 mins (quite slow display).
I don't change to another button object yet.
bradmaudlin wrote:I have a Touch Screen Point of Sale program that uses a lot of pop up dialogs with a virtual pin pad (0 - 9 and a few other functions).
2. When I use SBUTTON it have a memory leak. I have tested the same code with BTNBMP buttons and SBUTTON button. Watching the Task Manager my program starts out at 15.2MB for both. After only 20 transactions the BTNBMP version is at 15.6MB while the SBUTTON version is at 19.6MB. I have tried putting a Memory(0) call at the end of each transaction, but it did nothing.
Does anyone have a SBUTTON version that doesn't leak memory? The memory leak only seems to happen when the button is created. If I create the dialog and press the buttons 2 times or 200 times i get the same memory leak amount (about .2MB).

Is there a different BUTTON class that might work for me?

Thanks
Brad

Re: SBUTTON vs BTNBMP

Posted: Sat Dec 25, 2021 9:09 am
by Antonio Linares
Do we have the source code for SBUTTON ?

We may find and fix the memory leak :-)

Re: SBUTTON vs BTNBMP

Posted: Sat Dec 25, 2021 11:01 am
by ADutheil

Re: SBUTTON vs BTNBMP

Posted: Sat Dec 25, 2021 2:42 pm
by bradmaudlin
Antonio,
Thank you very much!!
I really like the performance of SButton over Btnbmp.

Merry Christmas everyone.
Brad

Re: SBUTTON vs BTNBMP

Posted: Sat Dec 25, 2021 6:02 pm
by Otto
https://mybergland.com/fwforum/tsbutton.zip
Hello, can you please download this version?
I will remember I fixed speed and memory problems.
Can you please compare against your version?

Best regards,
Otto

PS Manuel allowed us to post the code. Please search for his email.

Re: SBUTTON vs BTNBMP

Posted: Sun Dec 26, 2021 8:04 am
by Antonio Linares
Now we have two versions and Otto's one seems to be more recent...

Re: SBUTTON vs BTNBMP

Posted: Sun Dec 26, 2021 11:51 am
by ADutheil
Otto's version is based on the 6.1 release while the other one is the latest 7.0 posted by Manuel Mercado.

Re: SBUTTON vs BTNBMP

Posted: Sun Dec 26, 2021 5:39 pm
by Antonio Linares
André,

Manuel's code is not simple.

Please use FWH function SetResDebug() as explained here:

http://wiki.fivetechsoft.com/doku.php?i ... etresdebug

http://wiki.fivetechsoft.com/doku.php?i ... ts_handles

and please let me know what you get

many thanks

Re: SBUTTON vs BTNBMP

Posted: Tue Dec 28, 2021 3:12 am
by bradmaudlin
Thanks Otto. I will try your version and let everyone know how it works.

I will probably be asking you (Otto) some questions soon. I have just installed mod harbour and have started playing with it.
I have a new project to communicate with some new Vending Machine equipment. I need to create a local web server app that will use SOAP/XML protocols and still be able to access all of my DBF files I use with my Point of Sale software. Right now I'm working on the communications side using php. Once this is done then I will need to update my databases.
Does this sound like a good use for mod harbour??

Thanks,
Brad

Re: SBUTTON vs BTNBMP

Posted: Tue Dec 28, 2021 8:43 am
by Antonio Linares
Brad,

Yes, the right tool for it.

You may test it and see what results you get :-)

Re: SBUTTON vs BTNBMP

Posted: Tue Dec 28, 2021 11:28 am
by Silvio.Falconi
Antonio Linares wrote:Brad,

Yes, the right tool for it.

You may test it and see what results you get :-)


Antonio,
that if by now I have left sbutton for just the same reason (memory loss), if you find how to fix the bug I would like to have a copy of the tsbutton class to test it with my old version of the Pos program that I had done many years ago.