PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 10
 21 
 on: December 07, 2018, 09:28:59 AM 
Started by Paul Squires - Last post by raymw
A bit different from previous versions, afaik. If I create new project, then go straight to designer, add new form, it shows designer window, with first line (pointer), then after a few seconds winfbe crashes. Ok if I create a new basic file first.

 22 
 on: December 04, 2018, 09:27:38 PM 
Started by Paul Squires - Last post by Paul Squires
The program recognize that ShowInTaskbar no longer exists in the library and not throw an error. Strange that you are still seeing it. I suggest that you manually move one of the controls on your form. This will make the form dirty and invoke the code generation. The new code generation should generate code without the reference to ShowInTaskbar.

 23 
 on: December 04, 2018, 03:12:10 PM 
Started by Paul Squires - Last post by SeaVipe
Yes, I commented it out though that line of code has been there and working (somewhat) for many versions of WinFBE. 1.8.5 is the first version that the code is in error. What should be used instead? (Just curious :)

 24 
 on: December 04, 2018, 02:59:15 PM 
Started by Paul Squires - Last post by Paul Squires
Actually, looks like the "'frmMain.ShowInTaskBar = False" is actually in your code rather than the WinFBE code generation so you simply need to remove it from your code. (frmMain is not a WinFBE code generated variable).



 25 
 on: December 04, 2018, 02:56:22 PM 
Started by Petrus Vorster - Last post by Petrus Vorster
Hi

Yes, i finally caught the error.
It took me a while to see what the heck went wrong.

This refers to my other post on Barcodes.
Turned out, that this Barcode calculation have up to 204 possible check digits. (how i read the formula)
(in pairs or in an Ascii character for that number)
This specific tool referred to CHR$(204) in a font file, and this Font i have has this omitted.

As usual, the working one is for sale.

So as soon as i hit a barcode that resulted in a ZERo for a check digit, it refers to CHR$(204) and then the barcode looks weird.

It's ok, i changed to a simpler barcode (yet longer!), but for a hobbyist trying to make his own life at work easier that will just have to do.

O, and there is actually light in the tunnel. We are getting a national systems replacement soon, THe first investment in new hardware in over 18 YEARS!!!! HURRAY!!!

 

 26 
 on: December 04, 2018, 02:47:18 PM 
Started by Petrus Vorster - Last post by Petrus Vorster
Thanks a million guys.
I am on the road this week for work, once i am back, I will compile in PB and see if i can make any progress.
Otherwise for now, i have changed to font CODE39 which is dead simple, but makes LONG barcodes.

That was why i asked about .NET earlier. VB.NEt as a ONE LINE code for creating an EAN128 Barcode.

I am so going to hit the bed now....

Thanks for everything.

-Regards Pete

 27 
 on: December 04, 2018, 02:22:14 PM 
Started by Paul Squires - Last post by SeaVipe
Version 1.8.5 (December 2, 2018)
- Changed: Removed Form property "ShowInTaskbar" as I could not implement reliable code to support it.



Hi Paul, module code frmMain.ShowInTaskBar = [True|False] now throws a compiler "error 18: Element not defined, ShowInTaskBar in 'frmMain.ShowInTaskBar = False'"


Not sure of the alternative...

 28 
 on: December 04, 2018, 01:17:48 PM 
Started by Petrus Vorster - Last post by Paul Squires
Hi Peter, I did the conversion (as best that I could). I don't have any test data to try the function with so I have no idea if it works or not.

Code: [Select]
' EAN128 Barcodes
' Translation of VB6 code to PowerBASIC
' https://www.planetsquires.com/protect/forum/index.php?topic=4250.msg32700#msg32700

' The GS1-128 is a special form of the Code 128. It's used for goods and palettes
' in commerce and industry. The name GS1-128 replaces the old name EAN/UCC 128.

Function code128( ByVal chaine As String ) As String
   ' This feature is regulated by the GNU Lesser General Public License (GNU LGPL)
   ' V 2.0.0
   ' Parameters: a chain
   ' Parameters: a string
   ' Back: * a string that, displayed with the CODE128.TTF font, gives the barcode
   ' * An empty string if parameter supplied incorrect
   ' Return : * a string which give the bar code when it is dispayed with CODE128.TTF font
   '         * an empty string if the supplied parameter is no good
   Dim i As Long, checksum As Long, mini As Long, dummy As Long, true As Long, false As Long
   Dim tableB As Long ' Boolean
   Dim sResult As String
   
   true = -1
   false = Not true
   
   If Len(chaine) > 0 Then
      ' Check for valid characters
      For i = 1 To Len(chaine)
         Select Case Asc(Mid$(chaine, i, 1))
            Case 32 To 126, 203
            Case Else
               i = 0: Exit For
         End Select
      Next

      ' Calculation of the code string with optimized use of tables B and C
      tableB = True
      If i > 0 Then
         i = 1   ' i become the string index
         Do While i <= Len(chaine)
            If tableB Then
               ' See if interesting to switch to table C
               ' yes for 4 digits at start or end, else if 6 digits
               mini = IIf(i = 1 Or i + 3 = Len(chaine), 4, 6)
               GoSub testnum
               If mini < 0 Then ' Choice of table C
                  If i = 1 Then  ' Starting with table C
                     sResult = Chr$(210)
                  Else ' Switch to table C
                     sResult = sResult & Chr$(204)
                  End If
                  tableB = False
               Else
                  If i = 1 Then sResult = Chr$(209) ' Starting with table B
               End If
            End If
   
            If Not tableB Then
               ' We are on table C, try to process 2 digits
               mini = 2
               GoSub testnum
               If mini < 0 Then ' OK for 2 digits, process it
                  dummy = Val(Mid$(chaine, i, 2))
                  dummy = IIf(dummy < 95, dummy + 32, dummy + 105)
                  sResult = sResult & Chr$(dummy)
                  i = i + 2
               Else ' We haven't 2 digits, switch to table B
                  sResult = sResult & Chr$(205)
                  tableB = True
               End If
            End If
            If tableB Then
               ' Process 1 digit with table B
               sResult = sResult & Mid$(chaine, i, 1)
               i = i + 1
            End If
         Loop
   
         ' Calculation of the checksum
         For i = 1 To Len(sResult)
            dummy = Asc(Mid$(sResult, i, 1))
            dummy = IIf(dummy < 127, dummy - 32, dummy - 105)
            If i = 1 Then checksum = dummy
            checksum = (checksum + (i - 1) * dummy) Mod 103
         Next
         ' Calculation of the checksum ASCII code
         checksum = IIf(checksum < 95, checksum + 32, checksum + 105)
         ' Add the checksum and the STOP
         sResult = sResult & Chr$(checksum) & Chr$(211)
      End If
   
   End If
   
   Function = sResult

Exit Function

testnum:
   ' if the mini characters from i are numeric, then mini=0
   mini = mini - 1
   If i + mini <= Len(chaine) Then
      Do While mini >= 0
         If Asc(Mid$(chaine, i + mini, 1)) < 48 Or Asc(Mid$(chaine, i + mini, 1)) > 57 Then Exit Do
         mini = mini - 1
      Loop
   End If
Return

End Function


Function PBMain()

' (01)01234567890128(15)051231
' 010123456789012815051231
   Dim chaine As String
   chaine = "(01)01234567890128(15)051231"

   MsgBox code128( chaine )

End Function

 29 
 on: December 03, 2018, 03:31:37 PM 
Started by Petrus Vorster - Last post by raymw
fwiw, I thought I'd see if there was a free trial of power basic out there, thought i could hack something out for the bar codes. I knew it was sort of being de-emphasized, but all I came across was loads of dead links, and criticism of what may be the current owner, if there is one. I did come across a beautiful succinct post from Jose, of this parish, with reference to marriage (on oxygen basic forum).
Maybe, Pete, you could get a job for life at your place, rewriting everything into your current language of choice.

 30 
 on: December 03, 2018, 03:18:45 PM 
Started by Petrus Vorster - Last post by raymw
Hi Pete,
In answer to your question, yes. It depends on the printer type, os, and original file. True-type fonts were an attempt to straighten it out, but if you think about it, a 24pin dot matrix printer, for example, can not produce the precise locations of dots, and even more basic, a daisy wheel can have entirely different founts to the screen. Some print drivers will allow settings different to others, in particular page boundaries, paper sizes, etc. Pdf's can print as image or as pdf encoded (not the proper terminology) but printing as image generally works OK, but slower. It is not clear to me, if you are always printing to pdf, but if you are noticing a difference in PDF prints, then it could be in the default print settings being changed when other software is printed. Also, printing to pdf, is it the adobe acrobat print driver, or something else? In the past, I've had numerous pages that wouldn't print, until I set it to print as image (or whatever it was called. (It was acrobat 5, maybe fifteen years ago? Maybe quite modern compared to the kit that you say you are forced to use... ;-)

Best wishes,
Ray

edit to add this link -https://helpx.adobe.com/acrobat/kb/quick-fix-print-pdf-image.html  But probably only if you have genuine adobe pdf/acrobat

Pages: 1 2 [3] 4 5 ... 10