-
Jan 23rd, 2015, 10:38 PM
#1
VB6 QR-Encoding+Decoding and IME-Window-Positioning
This Demo depends on vbRichClient5 (version 5.0.21 and higher), as well as the latest vbWidgets.dll.
One can download both new packages from the Download-page at: http://vbrichclient.com/#/en/Downloads.htm
(vbWidgets.dll needs to be extracted from the GitHub-Download-Zip and placed beside vbRichClient5.dll,
there's small "RegisterInPlace-Scripts" for both Dll-Binaries now).
After both dependencies were installed, one can load the below Demo-Project into the VB-IDE:
QRandIMEDemo.zip
According to the Title of this Thread, we try to show the:
Free positioning of an IME-Window:
delegating its IME_Char-Messages into free choosable Widget-controls (the Demo does
that against cwTextBox-Widgets exclusively - but could accomplish that also against cwLabels
or cwImages.
Here is the interesting part (the IME-API-Declarations and Wrapper-Functions are left out),
which is contained in the new cIME-Class (available in the Code-Download from the vbWidgets-GitHub-Repo):
Code:
'RC5-SubClasser-Handler
Private Sub SC_WindowProc(Result As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long)
Const WM_IME_SETCONTEXT = 641, WM_IME_STARTCOMPOSITION = 269, WM_IME_CHAR = 646
On Error GoTo 1
Select Case Msg
Case WM_IME_SETCONTEXT
SwitchOpenStatus wParam
Case WM_IME_STARTCOMPOSITION
HandleIMEPos
Case WM_IME_CHAR
Dim WFoc As cWidgetBase, KeyCode As Integer
Set WFoc = FocusedWidget: KeyCode = CInt("&H" & Hex(wParam And &HFFFF&))
If Not WFoc Is Nothing Then
If WFoc.Key = tmrFoc.Tag Then RaiseEvent HandleIMEChar(WFoc, KeyCode, ChrW(KeyCode))
End If
Exit Sub 'handled ourselves - so we skip the default message-handler at the end of this function
End Select
1: Result = SC.CallWindowProc(Msg, wParam, lParam)
End Sub
Private Sub tmrFoc_Timer()
HandleIMEPos
End Sub
Private Function FocusedWidget() As cWidgetBase
If Cairo.WidgetForms.Exists(hWnd) Then Set FocusedWidget = Cairo.WidgetForms(hWnd).WidgetRoot.ActiveWidget
End Function
Private Sub HandleIMEPos()
Dim WFoc As cWidgetBase, AllowIME As Boolean
On Error GoTo 1
Set WFoc = FocusedWidget
If WFoc Is Nothing Then
tmrFoc.Tag = ""
Else
RaiseEvent HandleIMEPositioning(WFoc, AllowIME)
If AllowIME Then tmrFoc.Tag = WFoc.Key
End If
1: SwitchOpenStatus AllowIME
End Sub
As one can see, this Class is (currently) only raising two Events to the outside -
received by a hosting (RC5) cWidgetForm-Class.
The elsewhere mentioned problems with "forcibly ANSIed" IME-WChars do not happen in
this Demo, because of a "full queue of W-capable APIs" (including a W-capable MessageLoop,
which is available in the RC5 per Cairo.WidgetForms.EnterMessageLoop...
The Integration of an RC5-cWidgetForm into an existing VB6-Project is relative easy (no need
to rewrite everything you have) - this Demo shows how one can accomplish that, by showing
the RC5-Form modally - starting from a normal VB-Form-CommandButton:
Here's all the code in the normal VB6-Starter-Form, which accomplishes that:
Code:
Option Explicit
Private VBFormAlreadyUnloaded As Boolean
Private Sub cmdShowRC5IMEForm_Click()
With New cfQRandIME ' instantiate the RC5-FormHosting-Class
.Form.Show , Me 'this will create and show the RC5-Form with the VB-Form as the underlying Parent
'now we enter the W-capable RC5-message-pump, which will loop "in place" till the RC5-Form gets closed again
Cairo.WidgetForms.EnterMessageLoop True, False
'the RC5-Form was closed, so let's read-out the Public Vars of its hosting cf-Class
If Not VBFormAlreadyUnloaded Then '<- ... read the comment in Form_Unload, on why we need to check this flag
Set Picture1.Picture = .QR1.QRSrf.Picture
Set Picture2.Picture = .QR2.QRSrf.Picture
End If
End With
End Sub
Private Sub Form_Unload(Cancel As Integer) 'this can happen whilst the RC5-ChildForm is showing, ...
VBFormAlreadyUnloaded = True 'so we set a Flag, to not implicitely load this VB-ParentForm again, when filling the Result-PicBoxes
End Sub
Private Sub Form_Terminate() 'the usual RC5-cleanup call (when the last VB-Form was going out of scope)
If Forms.Count = 0 Then New_c.CleanupRichClientDll
End Sub
The above Starter-Form (fMain.frm) will look this way
And pressing the CommandButton, it will produce the modal RC5-WidgetForm:
What one can see above is two (cwTextBox-based) Edit-Widgets - and the left one
is showing the free positioned IME-Window - the IME-Window (when visible), will
jump automatically, as soon as the user switches the Input-Focus to a different Widget.
To test this in a bit more extreme scenario even, I've made the two cwQRSimple-Widgets
(in the lower section of the Form) movable - and in case the IME-Window is shown
below one of them as in this ScreenShot:
... the IME-Window will follow the currently focused QR-Widget around, when it's dragged
with the Mouse...
Here's the complete code of the cfQRandIME.cls (which hosts the RC5-cWidgetForm-instance):
Code:
Option Explicit
Public WithEvents Form As cWidgetForm, WithEvents IME As cIME
Public QREnc As New cQREncode, QRDec As New cQRDecode 'the two (non-visible) QR-CodecClass-Vars
Public TB1 As cwTBoxWrap, TB2 As cwTBoxWrap 'the two TextBox-Wrapper-Classes
Public QR1 As cwQRSimple, QR2 As cwQRSimple 'the two QR-Widgets
Private Sub Class_Initialize()
Set Form = Cairo.WidgetForms.Create(vbFixedDialog, "QR-Widgets and IME-Window-Positioning", , 800, 600)
Form.IconImageKey = "QRico2"
Form.WidgetRoot.ImageKey = "bgPatForm"
Form.WidgetRoot.ImageKeyRenderBehaviour = ImgKeyRenderRepeat
Set IME = New cIME 'create the vbWidgets.cIME-instance
IME.BindToForm Form '...and bind our cWidgetForm-instance to it (IME will throw two Events at us then)
End Sub
Private Sub Form_Load() 'handle Widget-Creation and -Adding on this Form
Form.Widgets.Add(New cwSeparatorLabel, "Sep1", 11, 8, Form.ScaleWidth - 22, 42).SetCaptionAndImageKey "EditBox-DemoArea", "Edit", &H11AA66
Set TB1 = Form.Widgets.Add(New cwTBoxWrap, "TB1", 25, 60, 280, 38)
TB1.TBox.CueBannerText = "Session-Login..."
TB1.Widget.ImageKey = "session1"
Set TB2 = Form.Widgets.Add(New cwTBoxWrap, "TB2", 325, 60, 280, 38)
TB2.TBox.CueBannerText = "Place some Info here..."
TB2.Widget.ImageKey = "info1"
Form.Widgets.Add(New cwSeparatorLabel, "Sep2", 11, 155, Form.ScaleWidth - 22, 42).SetCaptionAndImageKey "QRCode-DemoArea", "Preview", &H1030EE
Set QR1 = Form.Widgets.Add(New cwQRSimple, "QR1", 25, 240, 250, 220)
Set QR2 = Form.Widgets.Add(New cwQRSimple, "QR2", 325, 280, 250, 220)
End Sub
Private Sub Form_BubblingEvent(Sender As Object, EventName As String, P1 As Variant, P2 As Variant, P3 As Variant, P4 As Variant, P5 As Variant, P6 As Variant, P7 As Variant)
If EventName = "Change" And TypeOf Sender Is cwTextBox Then 'we handle the Change-Event of the QRWidget-Child-Textboxes here
If Not (Sender Is QR1.TBox Or Sender Is QR2.TBox) Then Exit Sub
'resolve to the (TextBox-Hosting) cwQRSimple-Widget in question
Dim QR As cwQRSimple: Set QR = IIf(Sender Is QR1.TBox, QR1, QR2)
'Encode the current Text of our QR-Widget - and place the returned Pixel-Surface in QR.QRSrf
Set QR.QRSrf = QREnc.QREncode(New_c.Crypt.VBStringToUTF8(QR.Text))
'to verify, we perform a true Decoding of the QR-Text from the Pixels of the just created QR-Widgets QR-Surface
QRDec.DecodeFromSurface QR.QRSrf
'and reflect this decoded Unicode-StringResult in the Caption of the QR-Widget (so, ideally QR.Caption should match QR.Text)
If QRDec.QRDataLen(0) Then QR.Caption = New_c.Crypt.UTF8ToVBString(QRDec.QRData(0)) Else QR.Caption = ""
End If
'the QR-Widgets (cwQRSimple) are moveable - and in case they have an active IME-Window, we will move that too
If EventName = "W_Moving" And TypeOf Sender Is cwQRSimple Then IME_HandleIMEPositioning Sender.TBox.Widget, True
End Sub
Private Sub IME_HandleIMEPositioning(FocusedWidget As cWidgetBase, AllowIME As Boolean)
If TypeOf FocusedWidget.Object Is cwTextBox Then
AllowIME = True '<- here we allow IME-Windows only for cwTextBox-Widgets (but we could also allow IME on other Widget-Types)
IME.SetPosition FocusedWidget.AbsLeftPxl + 3, FocusedWidget.AbsTopPxl + FocusedWidget.ScaleHeightPxl + 4
End If
End Sub
Private Sub IME_HandleIMEChar(FocusedWidget As cWidgetBase, ByVal IMEKeyCode As Integer, IMEWChar As String)
FocusedWidget.KeyPress IMEKeyCode 'simply delegate the incoming IMEKeyCode into the Widget in question
'the above is the more generic delegation-method into any Widget (which are all derived from cWidgetBase)
'*alternatively* (for cwTextBoxes, which is the only Widget-Type we allow IME for in this Demo here)
'we could also use:
' Dim TB As cwTextBox
' Set TB = FocusedWidget.Object
' TB.SelText = IMEWChar
End Sub
Note the two blue marked EventHandlers at the bottom of the above code-section, which
make use of the two cIME-Events, which were mentioned at the top of this posting.
QR-Code Generation and Decoding:
The base QR-Encoding/Decoding-support is now included in vb_cairo_sqlite.dll (from two C-libs which are now statically contained).
And the vbWidgets.dll project contains the two Wrapper-Classes (cQREncode, cQRDecode) for these new exposed APIs.
cQREncode/cQRDecode is used in conjunction with thrown Change-Events of our cwQRSimple-Widgets
(which you saw in the ScreenShot above).
Here's the central Eventhandler which is contained in the RC5-WidgetForm-Hosting Class (cfQrandIME):
Code:
Private Sub Form_BubblingEvent(Sender As Object, EventName As String, P1, P2, P3, P4, P5, P6, P7)
If EventName = "Change" And TypeOf Sender Is cwTextBox Then 'we handle the Change-Event of the QRWidget-Child-Textboxes here
If Not (Sender Is QR1.TBox Or Sender Is QR2.TBox) Then Exit Sub
'resolve to the (TextBox-Hosting) cwQRSimple-Widget in question
Dim QR As cwQRSimple: Set QR = IIf(Sender Is QR1.TBox, QR1, QR2)
'Encode the current Text of our QR-Widget - and place the returned Pixel-Surface in QR.QRSrf
Set QR.QRSrf = QREnc.QREncode(New_c.Crypt.VBStringToUTF8(QR.Text))
'to verify, we perform a true Decoding of the QR-Text from the Pixels of the just created QR-Widgets QR-Surface
QRDec.DecodeFromSurface QR.QRSrf
'and reflect this decoded Unicode-StringResult in the Caption of the QR-Widget (so, ideally QR.Caption should match QR.Text)
If QRDec.QRDataLen(0) Then QR.Caption = New_c.Crypt.UTF8ToVBString(QRDec.QRData(0)) Else QR.Caption = ""
End If
'the QR-Widgets (cwQRSimple) are moveable - and in case they have an active IME-Window, we will move that too
If EventName = "W_Moving" And TypeOf Sender Is cwQRSimple Then IME_HandleIMEPositioning Sender.TBox.Widget, True
End Sub
So that's quite simple as far as QR-codes are concerned (because of the Bubbling-Event-mechanism of the
RC5-WidgetEngine - but also due to the quite powerful Cairo-ImageSurface-Objects, which are used in the
cQREncode/Decode-classes to transport the encoded (or to be decoded) Pixel-Information.
From a cCairoSurface it is possible, to write to PNG-, or JPG-ByteArrays or -Files at any time,
so exporting of the QR-Code-Images is not covered by this Demo - but would require only
a line of Code or two, in concrete adaptions of the above example.
Have fun,
Olaf
Last edited by Schmidt; Jan 24th, 2015 at 01:55 PM.
-
Jan 26th, 2015, 08:55 AM
#2
Addicted Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
QRSrf.WriteContentToPDFFile and QRSrf.WriteContentToSVGFile
does not seem to work (as I expected)
Code:
If Not VBFormAlreadyUnloaded Then '<- ... read the comment in Form_Unload, on why we need to check this flag
.QR1.QRSrf.WriteContentToJpgFile "test.jpg" 'OK
.QR1.QRSrf.WriteContentToPDFFile "test.pdf" 'Nothing
.QR1.QRSrf.WriteContentToPngFile "test.png" 'OK
.QR1.QRSrf.WriteContentToSVGFile "test.svg" 'Nothing
Set Picture1.Picture = .QR1.QRSrf.Picture
Set Picture2.Picture = .QR2.QRSrf.Picture
End If
-
Jan 26th, 2015, 09:38 AM
#3
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
For PDF and SVG export, you need to use a different kind of Cairo surface (PDF or SVG respectively).
The optional third parameter of the CreateSurface method in RC5 controls what kind of surface is created.
-
Jan 26th, 2015, 02:23 PM
#4
Addicted Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by jpbro
For PDF and SVG export, you need to use a different kind of Cairo surface (PDF or SVG respectively).
The optional third parameter of the CreateSurface method in RC5 controls what kind of surface is created.
okay, thanks
to Olaf:
github vbWidgets project is somehow corrupted
cUndoRedo.cls, cIME.cls, cQRDecode.cls, cQREncode.cls
is saved in unix format with LF line endings.
-
Jan 26th, 2015, 09:35 PM
#5
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by pekko
to Olaf:
github vbWidgets project is somehow corrupted
cUndoRedo.cls, cIME.cls, cQRDecode.cls, cQREncode.cls
is saved in unix format with LF line endings.
Thanks for the hint - had quite a fight, until I had it corrected at *both* ends -
the clientside Repo and the GitHub-Server...
The solution was finally a .gitattributes file, which enforced CrLf with these two text-lines:
* text=auto
* text eol=crlf
So, the Download of vbWidgets directly from the GitHub-WebPage over the
appropriate Button should now work again...
Used the occasion, to update the cQREncode-Class about a new optional Parameter,
which allows you to choose between a returned:
- Image-Surface (allowing for *.png and *.jpg Exports)
- SVG-Surface (free scalable Vector-format - useful Export-Option for WebPages)
- PDF-Surface (free scalable Vector-format - useful for "giving it into Print")
Here's a new small Demo-Project which demonstrates this new cQREncode-feature:
SVGandPDFexport.zip
And below's the appropriate ScreenShot:
What's perhaps interesting in the above shot is, that the Demo not only generates the PDF-file,
but is also capable to render the PDF-Preview in a reliable manner (directly within the VB-Form,
using a free (commercially usable) Dll-compile from Googles "PDFium"-efforts (coming under BSD-license).
So the days of fighting with the Adobe-Control (or ShellExecuting the Adobe-Reader-App, which was
also unreliable on Win7 and higher) are over as it seems.
The Demo-Zip above doesn't contain the pdfium.dll - but it can be downloaded on this GitHub-Repo:
https://github.com/pvginkel/PdfiumVi...ster/Libraries
Maybe the contained small Wrapper-Class (cPDFium) could be enhanced about the (still quite a lot)
missing API-Declares - in the fashion I've begun... (any takers?)
There's several C-Headers online, which are describing the API-Interface (the Dll is StdCallable) -
here's the page I've used for the stuff which is included thus far:
http://read.pudn.com/downloads112/do...dfview.h__.htm
Olaf
Last edited by Schmidt; Jan 26th, 2015 at 09:59 PM.
-
Jan 27th, 2015, 12:26 AM
#6
Hyperactive Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
While registering the new vbWidgets.dll my system (W7-32 bit) complains about it being 64 bit (is this even possible?). After rebuilding everything works fine.
Nice job with PDFIum, simple and efective.
-
Jan 27th, 2015, 02:52 AM
#7
Addicted Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
I can confirm what Carlos say, compiled vbWidgets.dll is not usable, you can not register it.
When you compile it by yourself everything works as expected.
-
Jan 27th, 2015, 06:08 PM
#8
Addicted Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Is that cairo_status_enm best candidate return value? (WriteContentToPngFile, WriteContentToSVGFile, WriteContentToPDFFile)
In my opinion "how many bytes is written" is better, just like in WriteContentToJpgFile.
-
Jan 28th, 2015, 12:25 PM
#9
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by pekko
Is that cairo_status_enm best candidate return value? (WriteContentToPngFile, WriteContentToSVGFile, WriteContentToPDFFile)
In my opinion "how many bytes is written" is better, just like in WriteContentToJpgFile.
I've implemented the (natively supported by the cairo-lib) formats png, svg, pdf first.
JPG came later (handled by cJPG separately) - therefore the somewhat differing returnvalues.
But, a directly returned length-info sounds fine ... (maybe in RC6).
In case you want to handle it the same in all cases, then I guess you could use the:
WritexxxToByteArray-functions - and then check the ByteArrays for their length...
(writing those ByteArrays, in case they are valid - or have a valid length - into files,
is only one line more).
Olaf
-
Jan 29th, 2015, 05:56 AM
#10
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by pekko
I can confirm what Carlos say, compiled vbWidgets.dll is not usable, you can not register it.
When you compile it by yourself everything works as expected.
Think I have it working now... (the unzipped Git-archive should now properly startup as a project - and
the contained vbWidgets.dll should also be usable again, when dragged directly from the zip for registering).
Reason for this mess?
(maybe interesting for other Git-Newcomers like me...)
The compiled binary was treated as a Text-file too - GitHub doing a vblf to vbcrlf-replace on it - so I've had to
*explicitely* add the File-Types I wanted to be treated as Text (with regards to crlf) into .gitattributes,
which looks this way now:
* text=auto
*.vbg text eol=crlf
*.vbp text eol=crlf
*.frm text eol=crlf
*.bas text eol=crlf
*.cls text eol=crlf
*.ctl text eol=crlf
Instead of the former:
* text=auto
* text eol=crlf
(which I already thought to be a sufficient solution to handle all crlf-issues)
Dunno - this all worked on my older machine, where I was using Tortoise-Git - but now using
Atlassian-SourceTree - and a few "assumed settings" have to be handled "manually" now.
Olaf
-
Jan 29th, 2015, 08:26 AM
#11
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
@Olaf - GitHub for Windows has finally matured to a point where it's quite usable. I'd recommend giving it a look, as it plays quite nice with Windows-specific Git issues (like line endings).
-
Jan 29th, 2015, 06:01 PM
#12
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by Tanner_H
@Olaf - GitHub for Windows has finally matured to a point where it's quite usable. I'd recommend giving it a look, as it plays quite nice with Windows-specific Git issues (like line endings).
Thanks Tanner, will check it out...
Olaf
-
Apr 21st, 2018, 07:42 AM
#13
New Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
friends, i am interesting in the QR coding and decoding from vb6. But SVGandPDFexport.zip doesnt contains the required 2 libraries. Please, can you share the complete project with all that is required to mess with it ?
thx in advance
-
Apr 21st, 2018, 03:16 PM
#14
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by arfgh
friends, i am interesting in the QR coding and decoding from vb6. But SVGandPDFexport.zip doesnt contains the required 2 libraries. Please, can you share the complete project with all that is required to mess with it ?
For the (placed later in this thread, in post #5) SVGandPDFexport.zip -
there's actually an extra-dependency (pdfium.dll ... to be placed in the PDFium-SubFolder after you unzipped it).
To download a recent build of the pdfium.dll (with StdCall-conventions), you will have to go now to:
https://www.nuget.org/packages/Pdfiu....no_v8-no_xfa/
And perform a "Manual Download" (you'll find that "MenuButton" to the right of the above linked page)...
After downloading the NuGet-package, you can simply rename the file-ending from *.nupkg to *.zip, to extract the contained Dll in there...
But the above hints with regards to PDFium are only relevant, in case you want to *view* the produced results (from the produced file: QR.pdf).
The other 3 formats which are produced:
- QR.jpg
- QR.png
- QR.svg
Can be opened without the pdfium-stuff (just deactivate the attempt at showing the PDFium-Viewer in fMain-Forms flsImages_DblClick).
Otherwise the Demo only depends on "the RC5-package"
(which can be downloaded from here): http://vbrichclient.com/#/en/Downloads.htm
After downloading the vbRC5BaseDlls.zip you should unpack it into "always the same place on your dev-machine"
(I use C:\RC5\ as the folder which contains the libs of the above Zip-package).
After unpacking them into your target-folder (and before starting the Demo in your VB6-IDE),
you have to ensure that the two COM-libs (vbRichClient5.dll and vbWidgets.dll) are properly
registered on your dev-machine via either:
- regsvr32.exe
- or by using the two contained "register in place"-scripts which are contained in the download
HTH, and happy QR-encoding.
Olaf
-
Apr 21st, 2018, 07:52 PM
#15
New Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
and what about to decode qr. There are a lot of dlls to encode but never to decode... which is the problem ?
-
Apr 22nd, 2018, 01:51 AM
#16
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by arfgh
and what about to decode qr. There are a lot of dlls to encode but never to decode... which is the problem ?
The Demo in the Opener-posting covers both directions
(and modMain.bas contains a small Test/Demo-Routine, independent from the GUI-code, which also shows both directions).
What problem do you have exactly?
Olaf
-
Apr 22nd, 2018, 04:30 AM
#17
New Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
well, i am looking for a way to encode a decode localy and progrmatically a qr code... like i said i have seen several programs, and dlls, etc, but they always and only encode to qr code, never can read them.. like for example the famous 'QRCodeLib.dll'.
-
Apr 23rd, 2018, 12:09 PM
#18
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by arfgh
well, i am looking for a way to encode a decode localy and progrmatically a qr code...
Originally Posted by Schmidt
The Demo in the Opener-posting covers both directions
(and modMain.bas contains a small Test/Demo-Routine, independent from the GUI-code, which also shows both directions).
What problem do you have exactly?
Olaf
.
.
.
-
Feb 14th, 2021, 10:41 PM
#19
Fanatic Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by Schmidt
For the (placed later in this thread, in post #5) SVGandPDFexport.zip -
there's actually an extra-dependency (pdfium.dll ... to be placed in the PDFium-SubFolder after you unzipped it).
To download a recent build of the pdfium.dll (with StdCall-conventions), you will have to go now to:
https://www.nuget.org/packages/Pdfiu....no_v8-no_xfa/
And perform a "Manual Download" (you'll find that "MenuButton" to the right of the above linked page)...
After downloading the NuGet-package, you can simply rename the file-ending from *.nupkg to *.zip, to extract the contained Dll in there...
But the above hints with regards to PDFium are only relevant, in case you want to *view* the produced results (from the produced file: QR.pdf).
The other 3 formats which are produced:
- QR.jpg
- QR.png
- QR.svg
Can be opened without the pdfium-stuff (just deactivate the attempt at showing the PDFium-Viewer in fMain-Forms flsImages_DblClick).
Otherwise the Demo only depends on "the RC5-package"
(which can be downloaded from here): http://vbrichclient.com/#/en/Downloads.htm
After downloading the vbRC5BaseDlls.zip you should unpack it into "always the same place on your dev-machine"
(I use C:\RC5\ as the folder which contains the libs of the above Zip-package).
After unpacking them into your target-folder (and before starting the Demo in your VB6-IDE),
you have to ensure that the two COM-libs (vbRichClient5.dll and vbWidgets.dll) are properly
registered on your dev-machine via either:
- regsvr32.exe
- or by using the two contained "register in place"-scripts which are contained in the download
HTH, and happy QR-encoding.
Olaf
can u attach your pdfium.dll last version worked with this sample?
i download all pdfium.dll version like as 2017-04-13 or 2018-01-25 or 2018-04-08 but alls not worked in this sample.
error message :
Can't find DLL entry point _FPDF_InitLibrary@4 in PDFium
-
Feb 15th, 2021, 01:40 AM
#20
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by Black_Storm
can u attach your pdfium.dll last version worked with this sample?
i download all pdfium.dll version like as 2017-04-13 or 2018-01-25 or 2018-04-08 but alls not worked in this sample.
error message :
Can't find DLL entry point _FPDF_InitLibrary@4 in PDFium
There is an article for a more recent PDFium-Binding in the codebank:
https://www.vbforums.com/showthread....-ImageExports)
You should be able, to exchange the old PDF-Viewer-part with the newer PDF-Viewer-Class from the link above.
Or alternatively, deactivate the PDF-Preview-Feature entirely in this Demo.
PDFium is only used for "viewing a PDF" (as an alternative to e.g. AdobePDF, SumatraPDF, FoxitPDF, etc.)
For PDF-generation or -construction, the RC5/RC6-lib is entirely sufficient.
Olaf
-
Feb 15th, 2021, 09:22 PM
#21
Fanatic Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
i have 2 problem with this sample and source code.
1-when i opened pdf files with persian or arabic contents and then i saved as text.all text is empty,this source can support utf-8 or ... ?
2-when i run project its work but when i maked exe and then run exe,i see this error :
file not found DIRECTCOM i used rc6 and tested with rc5 too.
i have no problem with other vbrichclient samples and i cab make exe and run theme without problem but when i want run this sample (compiled exe )it show that error to me.
-
Feb 15th, 2021, 09:40 PM
#22
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by Black_Storm
i have 2 problem with this sample and source code.
I assume you're now talking about the pdfium-based Viewer in the codebank-thread I linked below?
https://www.vbforums.com/showthread....-ImageExports)
If yes, then please re-post your questions there.
(this thread is thought to discuss problems with QR-Code-reading or -writing)
Olaf
-
Feb 17th, 2021, 12:03 AM
#23
Fanatic Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
my 2 problem is about ur post #20 but i can send my problems in that ur thread link
and check my thread here,i am still waiting for any sample source code for decode qr code without external dll (like as rc5 or rc6) or ocx or online web services.
i have a qr code image i want decode it arabic charachters and (utf-8 support).
u talked about both direction in #16 but have any sample to can decode qr image without external dll or ocx?
https://www.vbforums.com/showthread....63#post5511063
Last edited by Black_Storm; Feb 17th, 2021 at 12:08 AM.
-
Mar 15th, 2021, 02:00 AM
#24
Junior Member
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Hi Olaf I apologize if the question is irrelevant, but please kindly agree,
I studied your vb6 QR-Encoding + Decoding code and I even explore the code from modMain.bas contains a little test routine but the hardest part is:
- how to decode a QR-Encoding image using my webcam from a small vb6 + RC6 or RC6 application,
can you provide us sample test for good understanding. thank you
-
Mar 31st, 2021, 06:45 AM
#25
Re: VB6 QR-Encoding+Decoding and IME-Window-Positioning
Originally Posted by Napstore
... how to decode a QR-Encoding image using my webcam from a small vb6 + RC6 or RC6 application,
can you provide us sample test for good understanding. thank you
There's a new Codebank-entry for that:
https://www.vbforums.com/showthread....Code-Decoding)
HTH
Olaf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|