onscreen barcode ?

173 views
Skip to first unread message

elch

unread,
Sep 18, 2014, 3:02:07 PM9/18/14
to harbou...@googlegroups.com
Hi,

anybody with a barcode scanner ready at hand, to check if onscreen is possible ?

( have heard some modern cellphone understand QRCode .. )

You can use GTXWC or GTQTC -- GTWVT actually draws rectangles one pixel too wide


best regards

Rolf


gfxbar.zip

Richard Acosta

unread,
Sep 18, 2014, 3:06:34 PM9/18/14
to harbou...@googlegroups.com

I scan barcode from screen with my cellphone. Is not about the phone itself, you need the software installed and then you take a picture or just point the camera to the code and the  program makes the translation over the preview.

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Maurício Ventura Faria

unread,
Sep 18, 2014, 3:23:45 PM9/18/14
to harbou...@googlegroups.com
Hi.
 
I did it in the past and it was ok.
 
But, in my experience, different scanners may not do it...
 
[[]] Mauricio Ventura Faria

elch

unread,
Sep 18, 2014, 4:02:11 PM9/18/14
to harbou...@googlegroups.com
Thanks, Mauricio, Walter

good news !

Core developers feel free to add example into contrib/hbzebra/tests if they like it.
GT but not OS dependent ..

best regards
Rolf

Qatan

unread,
Sep 19, 2014, 4:28:46 AM9/19/14
to harbou...@googlegroups.com
Hello Rolf / Pritpal,
 
 
>You can use GTXWC or GTQTC -- GTWVT actually draws rectangles one pixel too wide
 
 
Very interesting but I don’t have any barcode scanner to test it...
I tried with GTWVT and GTWVG under Win7Pro32 but the barcodes disappear if I maximize the window or try to resize it... not to count the problem with the one pixel too wide but why GTWVT/WVG do that? Is there any way to fix it?
 
I did test also with GTWVG and it showed the following differences compared to GTWVT (it may be useful to Pritpal):
 
1) The close button doesn’t work (GTWVT works fine)
2) If you maximize the window then you can not restore to the original size (GTWVT works fine)
3) Takes 4 to 5 times longer to build (I use default C compiler: MingW and Harbour 3.2.0dev (r1407111333) (GTWVT is much faster to build)
4) If you build without –gui option then it will create an extra console window when you execute it. (GTWVT doesn’t do that)
 
Thanks for the example.
Regards,
 
Qatan

elch

unread,
Sep 22, 2014, 5:04:05 PM9/22/14
to harbou...@googlegroups.com
Hi Qatan,


I tried with GTWVT and GTWVG under Win7Pro32 but the barcodes disappear if I maximize the window or try to resize it... not to count the problem with the one pixel too wide but why GTWVT/WVG do that? Is there any way to fix it?
 

is mentioned at top in source: graphics not persistent in GTWVT.

You can watch for HB_K_RESIZE, after that you have to redraw,

but it won't help if you switch to another window, grab it at the title bar,

and use this as 'cleaning rag' ;-)

Herefore you can watch for HB_K_GOTFOCUS [after lostfocus], and do the same redraw.

That will not cover the situation, if you have moved the barcode window partially outside the desktop screen ..


And my hint about one pixel too large drawn rectangle was somehow rejected ....


best regards

Rolf

Pritpal Bedi

unread,
Sep 22, 2014, 5:44:46 PM9/22/14
to harbou...@googlegroups.com
Hi Qatan

GFX primitives in (x)Harbour are not implemented as 
persistent object so every erase/refresh operation will 
erase them.

I talked in length with Giancarlo who implemented 
it in xHarbour and then ported to Harbour, about why 
cannot we introduce persistence to these objects.
His arguments at that time were something I never 
accepted. To overcome this situation I designed 
Wvg _* controls which go side-by-side with console 
implementation without the need to think deep how 
GtWVG GUI is implemented.

Look for contrib/gtwvg/tests/_cuigdlg.prg
Activation is via demowvg.exe -> Traditional -> WVG Console with GCUI.


Here is the image:


Pritpal Bedi
a student of software analysis & concepts


elch

unread,
Sep 22, 2014, 5:49:33 PM9/22/14
to harbou...@googlegroups.com
Hi Pritpal,

they are persistent in GTQTC and GTXWC, what else needed ?

best regards
Rolf

Pritpal Bedi

unread,
Sep 22, 2014, 5:58:19 PM9/22/14
to harbou...@googlegroups.com
Hi

they are persistent in GTQTC and GTXWC, what else needed ?


I have not gone through all GTs how these manage 
them to be persistent. If it can be in GtQTC there is no reason 
it cannot be in GtWVT or for the same reason in GtWVG.

Can you show me a small demo example for GtQTC where 
these behave as persistent ?

elch

unread,
Sep 22, 2014, 5:59:09 PM9/22/14
to harbou...@googlegroups.com
addendum, dear Pritpal

in these both GTs i only must watch for HB_K_RESIZE, which can be disabled for such a case.
And i believe they can be made also persistent in GTWVG

best regards
Rolf

Pritpal Bedi

unread,
Sep 22, 2014, 6:02:39 PM9/22/14
to harbou...@googlegroups.com
Hi


in these both GTs i only must watch for HB_K_RESIZE, which can be disabled for such a case.
And i believe they can be made also persistent in GTWVG


This behavior is not for what GtWVG is designed for.
HB_K_RESIZE behavior is application controlled so any GT can 
take use of it, no issues.

Anyway what happens when another window makes a trip over 
the GFX object ?


Pritpal Bedi

elch

unread,
Sep 22, 2014, 6:07:45 PM9/22/14
to harbou...@googlegroups.com
Hi Pritpal,

i have a name :-)

nothing -- window manager ! will redraw the barcodes .. i call that 'persistent'

best regards
Rolf

elch

unread,
Sep 22, 2014, 6:54:40 PM9/22/14
to harbou...@googlegroups.com
Dear Pritpal,

to drag up an old thread, when i was much more unexperienced with Harbour GTs.
Invested since then uncountable hours ...
https://groups.google.com/d/msg/harbour-users/agqNvpLAwbg/wkQhPI4r44gJ

best regards
Rolf

Qatan

unread,
Sep 22, 2014, 7:24:56 PM9/22/14
to harbou...@googlegroups.com
Hello Rolf,
 
Thanks for explaining a bit more the “mysterious” disappearance.
Regards,
 
Qatan

Qatan

unread,
Sep 22, 2014, 7:24:59 PM9/22/14
to harbou...@googlegroups.com
Hello Pritpal,
 
Thanks for taking time to help me to understand it.
Regards,
 
Qatan
 
 
Sent: Monday, September 22, 2014 11:44 PM
Subject: Re: [harbour-users] onscreen barcode ?
 

elch

unread,
Sep 22, 2014, 7:31:14 PM9/22/14
to harbou...@googlegroups.com
One minor more, Pritpal



Look for contrib/gtwvg/tests/_cuigdlg.prg
Activation is via demowvg.exe -> Traditional -> WVG Console with GCUI.


after adaption of HB_K_CLOSE into GTWVG, your interesting but stone age K_ESC based demowvg doesn't exit anymore with click on 'X' [ close window ] ..

Back to K_ESC for that click ? :-)


best regards

Rolf 'GT hacker'

Qatan

unread,
Sep 23, 2014, 3:56:20 AM9/23/14
to harbou...@googlegroups.com
Hello Rolf ‘GT hacker’
 
It’s good to have you around to test all that.
You contributed to make what was good to be even better!
Thank you
 
Qatan
Reply all
Reply to author
Forward
0 new messages