Credit card reader

Credit card reader

Postby TimStone » 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
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Postby xProgrammer » Sat Sep 06, 2008 2: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:

Code: Select all  Expand view  RUN
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)
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: Credit card reader

Postby Patrick Mast » Sat Sep 06, 2008 7: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
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby James Bott » Sat Sep 06, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Patrick Mast » Sat Sep 06, 2008 5: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
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby James Bott » Sat Sep 06, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Patrick Mast » Sat Sep 06, 2008 5: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:
Image

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

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby James Bott » Sat Sep 06, 2008 7: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Thanks

Postby TimStone » Sun Sep 07, 2008 8: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
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests