FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Credit card reader
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Credit card reader
Posted: Fri Sep 05, 2008 11:46 PM

I'm testing a credit card reader. Right now I have a field on a dialog and when I swipe the card it will read the data into the field. However, I don't really wnat to show anything accept the message SWIPE CARD and then have the data read into a buffer.

I know I'm overlooking some way of doing this ... far too much on my mind. Any hints to get me on track ?

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 464
Joined: Tue May 16, 2006 07:47 AM
Credit card reader
Posted: Sat Sep 06, 2008 02:26 AM
Hi Tim

Just a thought - I can't test it here. If you can read it into a "field" - I guess you mean a TGet, can you go:

oMyGet:Hide()


to hide the TGet so user won't see the data, but hopefully it will still accept it?

(I assume TGet:Hide() or an equivalent exists in FiveWin, it does in FiveLinux)

Another possibility would be to use the PASSWORD option on the TGet.

I hope I've understood the problem.

Good luck and happy programming
Doug
(xProgrammer)
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Re: Credit card reader
Posted: Sat Sep 06, 2008 07:13 AM
Hello Tim,

TimStone wrote:I'm testing a credit card reader. Right now I have a field on a dialog and when I swipe the card it will read the data into the field. However, I don't really wnat to show anything accept the message SWIPE CARD and then have the data read into a buffer.

I know I'm overlooking some way of doing this ... far too much on my mind. Any hints to get me on track ?


Simply put the GET at -100,-100 so it is out of sight of your dialog. I use it all the time to have a hidden default (ENTER) button on a dialog. :-)

Patrick
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Credit card reader
Posted: Sat Sep 06, 2008 05:16 PM

Patrick,

>hidden default (ENTER) button on a dialog.

I am curious why you would want this? Shouldn't the users be able to see the default button?

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Credit card reader
Posted: Sat Sep 06, 2008 05:18 PM
James Bott wrote:>hidden default (ENTER) button on a dialog.

I am curious why you would want this? Shouldn't the users be able to see the default button?
In some situations? No, we don't want to let the user see the default button :-)

Patrick
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Credit card reader
Posted: Sat Sep 06, 2008 05:32 PM

Patrick,

>In some situations? No, we don't want to let the user see the default button.

I'm not sure what you are saying. In some situation you don't want them to see it, or only in some situations you do want them to see it?

It is standard window behavior for there to be two buttons on modal dialogs, OK (the default) and Cancel.

What situations would you want to hide the default button and why?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Credit card reader
Posted: Sat Sep 06, 2008 05:40 PM
James,
James Bott wrote:
>In some situations? No, we don't want to let the user see the default button.

I'm not sure what you are saying. In some situation you don't want them to see it, or only in some situations you do want them to see it?

It is standard window behavior for there to be two buttons on modal dialogs, OK (the default) and Cancel.

What situations would you want to hide the default button and why?

In some situations I don't want to show the default button. For example if I have a dialog where I have a BITMAP that acts like the default button. So, I tell my users that that image is the default button.

Like this dialog for example:


The green button is just a BITMAP placed on the dialog, but it "acts" as the default button.

Patrick
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Credit card reader
Posted: Sat Sep 06, 2008 07:25 PM
Patrick,

>The green button is just a BITMAP placed on the dialog, but it "acts" as the default button.

OK, that is a good solution.

After looking at the TBtnBmp and TButton classes, I see that the TBtnBmp class doesn't have a DEFAULT parameter. Thus, the reason you have to use to this trick. [I am assuming the green button is a bitmap button.]

Antonio, is it possible to add the DEFAULT parameter to TBtnBmp?

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Thanks
Posted: Sun Sep 07, 2008 08:29 PM

Patrick,

Thanks ... did the job

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion