<![CDATA[HMGforum.com]]> http://mail.hmgforum.com Thu, 12 Mar 2026 13:30:26 +0000 Smartfeed extension for phpBB http://mail.hmgforum.com/styles/prosilver/theme/images/site_logo.svg <![CDATA[HMGforum.com]]> http://mail.hmgforum.com en-gb Thu, 12 Mar 2026 13:30:26 +0000 60 <![CDATA[HMG General Help :: Re: Printing QR code on ticketprinters :: Reply by franco]]> http://mail.hmgforum.com/viewtopic.php?f=5&t=7722&p=72095#p72095 laser or ticket printer as my above post states. Been using ticket printers for years.]]> no_email@example.com (franco) http://mail.hmgforum.com/viewtopic.php?f=5&t=7722&p=72095#p72095 Thu, 12 Feb 2026 21:57:53 +0000 http://mail.hmgforum.com/viewtopic.php?f=5&t=7722&p=72095#p72095 <![CDATA[Self Introduction :: Convertir numero a letras :: Author jorge.posadas]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72102#p72102
¿Alguno de ustedes tiene una funcion para convertir número a letras? desafortunadamente yo no encuentro uno que tenía. Mucho agradeceré la ayuda al respecto]]>
no_email@example.com (jorge.posadas) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72102#p72102 Thu, 19 Feb 2026 16:50:31 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72102#p72102
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by serge_girard]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72103#p72103
The result you have to check carefully: muchos errors ! But you will have a start.
Serge]]>
no_email@example.com (serge_girard) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72103#p72103 Fri, 20 Feb 2026 06:42:10 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72103#p72103
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by martingz]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72104#p72104
saludos
function letras(cant)
local let1:={'UN ','DOS ','TRES ','CUATRO ','CINCO ','SEIS ','SIETE ','OCHO ','NUEVE ','DIEZ ','ONCE ','DOCE ','TRECE ','CATORCE ','QUINCE ','DIECISEIS ','DIECISIETE ','DIECIOCHO ','DIECINUEVE '}
local let2:= {'DIEZ ','VEINTE ','TREINTA ','CUARENTA ','CINCUENTA ','SESENTA ','SETENTA ','OCHENTA ','NOVENTA '}
local let5:= {'DIECI','VEINTI','TREINTA Y ','CUARENTA Y ','CINCUENTA Y ','SESENTA Y ','SETENTA Y ','OCHENTA Y ','NOVENTA Y '}
local let3:= {'CIENTO ','DOSCIENTOS ','TRESCIENTOS ','CUATROCIENTOS ','QUINIENTOS ','SEISCIENTOS ','SETECIENTOS ','OCHOCIENTOS ','NOVECIENTOS '}
local let4:= {'MIL ','CIEN ','PESOS ','PESO '},LETRAS1[10],NUMERO:=0
local let6:={'MILLONES ','MILLON '}
local mlls,rmlls,cdm:=rcdm:=dmd:=rdmd:=umd:=rumd:=cd:=rcd:=dd:=rdd:=ud:=rr:=nrr1:=nrr2:=0
public cambioal:=space(200)

mlls:=int(cant/1000000)
rmlls:=cant-(mlls*1000000)

cdm:=int(rmlls/100000)
rcdm:=rmlls-(cdm*100000)

dmd:=int(rcdm/10000)
rdmd:=rcdm-(dmd*10000)

umd:=int(rdmd/1000)
rumd:=rdmd-(umd*1000)

cd:= int(rumd/100)
rcd:=rumd-(cd*100)

dd:=int(rcd/10)
rdd:=rcd-(dd*10)

ud:=int(rdd/1)
rr:=rdd-(ud*1)

nrr1:=iif(rr > 0,int(rr*100),0)

if rcd >= 1 .and. rcd <= 19
letras1[1]:=let1[rcd]
elseif dd >= 2 .and. ud = 0
letras1[1]:=let2[dd]
elseif dd >= 2 .and. ud >= 1
letras1[1]:=let5[dd]+let1[ud]
endif
if cd >= 1 .and. rcd = 0
if cd = 1
letras1[2]:=let4[2]
else
letras1[2]:=let3[cd]
endif
elseif cd >= 1 .and. rcd >= 1
letras1[2] := let3[cd]
endif
if umd = 1 .and. dmd = 0
letras1[3]:=let4[1]
elseif dmd = 0 .and. umd >= 2
letras1[3] :=let1[umd]+let4[1]
elseif dmd = 1 .and. umd >= 1
letras1[3] :=let1[umd+10]+let4[1]
elseif dmd >= 1 .and. umd = 0
letras1[3] := let2[dmd] + let4[1]
elseif dmd >= 1 .and. umd >= 1
letras1[3] := let5[dmd]+let1[umd]+let4[1]
endif
if cdm >= 1 .and. dmd = 0 .AND. umd = 0
if cdm = 1
letras1[4]:=let4[2]+let4[1]
else
letras1[4]:=let3[cdm]+let4[1]
endif
elseif CDM >= 1 .AND. ( DMD > 0 .OR. UMD > 0 )
letras1[4] :=let3[cdm]
endif
if mlls >= 1
if mlls = 1
letras1[5]:=let1[1]+let6[2]
else
letras1[5]:=let1[mlls]+let6[1]
endif
endif
if cant != 1
cambioal:=iif(letras1[5]=NIL,'',letras1[5] )+iif(letras1[4]=NIL,'',letras1[4] )+iif(letras1[3]=NIL,'',letras1[3] )+iif(letras1[2]=NIL,'',letras1[2] )+iif(letras1[1]=NIL,'',letras1[1] )+LET4[3]+RIGHT(ALLTRIM(STR(cant)),2)+'/100 M.N.'
else
cambioal:=iif(letras1[5]=NIL,'',letras1[5] )+iif(letras1[4]=NIL,'',letras1[4] )+iif(letras1[3]=NIL,'',letras1[3] )+iif(letras1[2]=NIL,'',letras1[2] )+iif(letras1[1]=NIL,'',letras1[1] )+LET4[4]+RIGHT(ALLTRIM(STR(cant)),2)+'/100 M.N.'
endif
return cambioal]]>
no_email@example.com (martingz) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72104#p72104 Fri, 20 Feb 2026 13:54:54 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72104#p72104
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by Steed]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72143#p72143

Code: Select all

// -------------------------------------------------------------------------- //
Function NumToLe( nImporte )
    Local cRes := ""
    Local nEntero := Int( nImporte )
    Local nCentavos := Round( ( nImporte - nEntero ) * 100, 0 )
    Local aGrupos := {}
    Local i, nBloque

    If nEntero == 0
        cRes := "CERO"
    Else
        // Dividimos en bloques de 3 dígitos (Unidades, Miles, Millones, Mil Millones, Billones)
        Do While nEntero > 0
            AAdd( aGrupos, nEntero % 1000 )
            nEntero := Int( nEntero / 1000 )
        EndDo

        For i := Len( aGrupos ) To 1 Step -1
            nBloque := aGrupos[i]
            If nBloque == 0 .And. i != 3 // No procesar bloques vacíos excepto lógica de millones
                Loop
            EndIf

            // Lógica para el "Mil" (i=2 o i=4 o i=6...)
            If ( i == 2 .Or. i == 4 .Or. i == 6 ) .And. nBloque == 1
                cRes += "MIL " 
            Else
                cRes += ConvertirBloque( nBloque, i )
                
                // Sufijos de Magnitud
                Do Case
                    Case i == 2 .Or. i == 4 .Or. i == 6
                        cRes += "MIL "
                    Case i == 3
                        cRes += If( nBloque == 1, "MILLON ", "MILLONES " )
                    Case i == 5
                        cRes += If( nBloque == 1, "BILLON ", "BILLONES " )
                EndCase
            EndIf
        Next
    EndIf

    // Limpieza de redundancias gramaticales
    cRes := AllTrim( cRes )
    cRes := StrTran( cRes, "MIL MILLONES", "MIL MILLONES" ) // Estándar
    
    Return cRes + " PESOS CON " + PadL( AllTrim(Str(nCentavos)), 2, "0") + "/100 M/L."

// -------------------------------------------------------------------------- //
Static Function ConvertirBloque( n, nPosicion )
    Local cText := ""
    Local nCen := Int( n / 100 )
    Local nDec := Int( ( n % 100 ) / 10 )
    Local nUni := n % 10
    
    // Centenas
    Do Case
        Case nCen == 1 ; cText += If( nDec == 0 .And. nUni == 0, "CIEN ", "CIENTO " )
        Case nCen == 2 ; cText += "DOSCIENTOS "
        Case nCen == 3 ; cText += "TRESCIENTOS "
        Case nCen == 4 ; cText += "CUATROCIENTOS "
        Case nCen == 5 ; cText += "QUINIENTOS "
        Case nCen == 6 ; cText += "SEISCIENTOS "
        Case nCen == 7 ; cText += "SETECIENTOS "
        Case nCen == 8 ; cText += "OCHOCIENTOS "
        Case nCen == 9 ; cText += "NOVECIENTOS "
    EndCase

    // Decenas y Unidades
    Do Case
        Case nDec == 1
            Do Case
                Case nUni == 0 ; cText += "DIEZ "
                Case nUni == 1 ; cText += "ONCE "
                Case nUni == 2 ; cText += "DOCE "
                Case nUni == 3 ; cText += "TRECE "
                Case nUni == 4 ; cText += "CATORCE "
                Case nUni == 5 ; cText += "QUINCE "
                Case nUni > 5  ; cText += "DIECI" + Unidades( nUni )
            EndCase
        Case nDec == 2
            cText += If( nUni == 0, "VEINTE ", "VEINTI" + Unidades( nUni ) )
        Case nDec > 2
            cText += Decenas( nDec )
            If nUni > 0 ; cText += "Y " + Unidades( nUni ) ; EndIf
        Case nDec == 0
            If nUni > 0 
                // Evitar "UN MILLONES", debe ser "UN MILLON" manejado en el sufijo
                cText += Unidades( nUni ) 
            EndIf
    EndCase

Return cText

Static Function Unidades( n )
    Local aU := { "UN ", "DOS ", "TRES ", "CUATRO ", "CINCO ", "SEIS ", "SIETE ", "OCHO ", "NUEVE " }
Return aU[n]

Static Function Decenas( n )
    Local aD := { "", "", "TREINTA ", "CUARENTA ", "CINCUENTA ", "SESENTA ", "SETENTA ", "OCHENTA ", "NOVENTA " }
Return aD[n]

]]>
no_email@example.com (Steed) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72143#p72143 Sat, 21 Feb 2026 15:30:00 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72143#p72143
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by tonton2]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72144#p72144

Code: Select all

PROCEDURE NUM_LET
set color to w/b,r/n
parameters NOMBRE,LETTRES
*--paramŠtres : NOMBRE  :nombre à convertir
*               LETTRES :resultat en toutes lettres

* -- initialisations
LETTRES=""
XLN = int(NOMBRE)  && seule la partie entiere est convertie
if NOMBRE > 1000000000
* -- debordement de capacite
return
endif

if XLN = 0
* -- cas particulier du zero
LETTRES = "ZERO"
return
endif

* -- cas general
if XLN >1000000
 XCH = str(XLN,9,0)
else
 XCH = str(XLN,6,0)
endif
XLPOS = 1
* -- boucle executee pour les milles et pour les unites
do while XLN>0
if XLN >1000000
  XLPARTIE = HB_USUBSTR(XCH,1,6)
else
  XLPARTIE = HB_USUBSTR(XCH,XLPOS,3)
  if XLPARTIE = space(3)
   XLPARTIE = HB_USUBSTR(XCH,4,3)
  endif
endif
XLCEN = HB_USUBSTR(XLPARTIE,1,1)  && centaines
XLDIZ = HB_USUBSTR(XLPARTIE,2,1)  && dizaines
XLUNI = HB_USUBSTR(XLPARTIE,3,1)  && unites
XLV = val(XLCEN)
do case                 && cas des centaines
  case XLV = 1
       LETTRES = LETTRES + " CENT "
  case XLV > 1
       LETTRES = LETTRES + XN&XLCEN + " CENT "
endcase

XLV = val(XLDIZ)
XLET = iif(XLUNI="1"," ET "," ")
do case                 && cas des dizaines et unites
  case XLV = 0
        LETTRES = LETTRES + XN&XLUNI
  case XLV = 1
        LETTRES = LETTRES + XN1&XLUNI
  case XLV = 7
        LETTRES = LETTRES + XN60 + XLET + XN1&XLUNI
  case XLV = 8
        LETTRES = LETTRES + XN80 + ' ' + XN&XLUNI
  case XLV = 9
        LETTRES = LETTRES + XN80 + XLET + XN1&XLUNI
  otherwise
        LETTRES = LETTRES + XN&XLDIZ.0 + XLET + XN&XLUNI
endcase
if XLN>=1000000
*    correction des millions
   do case
       case XLN >= 2000000
        LETTRES = LETTRES + ' MILLIONS '
       case XLN >=1000000
        LETTRES = 'UN MILLION '
  endcase
else
* -- correction des milliers
do case
       case XLN >= 2000
        LETTRES = LETTRES + ' MILLE '
       case XLN >=1000
        LETTRES = 'MILLE '
endcase
endif
 if XLN>=1000000
  XLN =XLN-(int(XLN/1000000))*1000000
  XCH = str(XLN,6,0)
 else
   XLN = int(XLN/1000)
   XLPOS = 4
 endif
enddo
store lettres to xlettres
return

Attachments

NOMBRES.rar (0.38 KiB)
]]>
no_email@example.com (tonton2) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72144#p72144 Sat, 21 Feb 2026 14:07:43 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72144#p72144
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by Steed]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72145#p72145

Code: Select all


Function SpellNumber( nMyNumber )
    Local cDollars := "", cCents := ""
    Local cTemp
    Local nDecimalPlace, nCount := 1
    Local aPlace := { "", " Thousand ", " Million ", " Billion ", " Trillion " }
    Local cStrNumber := AllTrim( Str( nMyNumber, 18, 2 ) )

    nDecimalPlace := At( ".", cStrNumber )

    // Convert cents
    If nDecimalPlace > 0
        cCents := GetTens( SubStr( cStrNumber, nDecimalPlace + 1 ) )
        cStrNumber := AllTrim( Left( cStrNumber, nDecimalPlace - 1 ) )
    EndIf

    Do While !Empty( cStrNumber )
        cTemp := GetHundreds( Right( cStrNumber, 3 ) )
        If !Empty( cTemp )
            cDollars := cTemp + aPlace[ nCount ] + cDollars
        EndIf
        
        If Len( cStrNumber ) > 3
            cStrNumber := Left( cStrNumber, Len( cStrNumber ) - 3 )
        Else
            cStrNumber := ""
        EndIf
        nCount ++
    EndDo

/*  Descomentar para dolares y centavos

    // Clean up Dollars
    Do Case
        Case Empty( cDollars ) 
			cDollars := "No Dollars"
        Case AllTrim( cDollars ) == "One"
			cDollars := "One Dollar"
        Otherwise
			cDollars := AllTrim( cDollars ) + " Dollars"
    EndCase

    // Clean up Cents
    Do Case
        Case Empty( cCents ) 
			cCents := " and No Cents"
        Case AllTrim( cCents ) == "One"
			cCents := " and One Cent"
        Otherwise 
			cCents := " and " + AllTrim( cCents ) + " Cents"
    EndCase

*/

Return cDollars + cCents

Function GetHundreds( cMyNumber )
    Local cResult := ""
    If Val( cMyNumber ) == 0 ; Return "" ; EndIf
    
    cMyNumber := PadL( AllTrim( cMyNumber ), 3, "0" )

    // Convert the hundreds place
    If SubStr( cMyNumber, 1, 1 ) != "0"
        cResult := GetDigit( SubStr( cMyNumber, 1, 1 ) ) + " Hundred "
    EndIf

    // Convert the tens and ones place
    If SubStr( cMyNumber, 2, 1 ) != "0"
        cResult += GetTens( SubStr( cMyNumber, 2 ) )
    Else
        cResult += GetDigit( SubStr( cMyNumber, 3 ) )
    EndIf
Return cResult

Function GetTens( cTensText )
    Local cResult := ""
    
    If Val( Left( cTensText, 1 ) ) == 1
        Do Case
            Case Val( cTensText ) == 10 ; cResult := "Ten"
            Case Val( cTensText ) == 11 ; cResult := "Eleven"
            Case Val( cTensText ) == 12 ; cResult := "Twelve"
            Case Val( cTensText ) == 13 ; cResult := "Thirteen"
            Case Val( cTensText ) == 14 ; cResult := "Fourteen"
            Case Val( cTensText ) == 15 ; cResult := "Fifteen"
            Case Val( cTensText ) == 16 ; cResult := "Sixteen"
            Case Val( cTensText ) == 17 ; cResult := "Seventeen"
            Case Val( cTensText ) == 18 ; cResult := "Eighteen"
            Case Val( cTensText ) == 19 ; cResult := "Nineteen"
        EndCase
    Else
        Do Case
            Case Val( Left( cTensText, 1 ) ) == 2 ; cResult := "Twenty "
            Case Val( Left( cTensText, 1 ) ) == 3 ; cResult := "Thirty "
            Case Val( Left( cTensText, 1 ) ) == 4 ; cResult := "Forty "
            Case Val( Left( cTensText, 1 ) ) == 5 ; cResult := "Fifty "
            Case Val( Left( cTensText, 1 ) ) == 6 ; cResult := "Sixty "
            Case Val( Left( cTensText, 1 ) ) == 7 ; cResult := "Seventy "
            Case Val( Left( cTensText, 1 ) ) == 8 ; cResult := "Eighty "
            Case Val( Left( cTensText, 1 ) ) == 9 ; cResult := "Ninety "
        EndCase
        cResult += GetDigit( Right( cTensText, 1 ) )
    EndIf
Return cResult

Static Function GetDigit( cDigit )
    Local aDigits := { "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" }
    Local nPos := Val( cDigit )
Return If( nPos > 0, aDigits[ nPos ], "" )

]]>
no_email@example.com (Steed) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72145#p72145 Sat, 21 Feb 2026 15:29:33 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72145#p72145
<![CDATA[Self Introduction :: Re: Convertir numero a letras :: Reply by serge_girard]]> http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72146#p72146 Input is * 100, without decimals

Code: Select all

FOR A := 9999 TO 9999999 STEP 19
   ? A, a/100, AmountToWordsBE_Cent( A )
NEXT
MSGINFO('Ready')




FUNCTION AmountToWordsBE_Cent( nCent )
/*************************************/
LOCAL lNegatief := .F.
LOCAL nEuro, nRest
LOCAL cResult

IF !HB_ISNUMERIC( nCent )
   RETURN ""
ENDIF

IF nCent < 0
   lNegatief := .T.
   nCent := ABS( nCent )
ENDIF

nEuro := INT( nCent / 100 )
nRest := nCent % 100

cResult := NumToWordsNL( nEuro ) + " euro"

IF nRest > 0
   cResult += " en " + NumToWordsNL( nRest ) + " cent"
ENDIF

IF lNegatief
   cResult := "min " + cResult
ENDIF

cResult := strtran(cResult, 'nul euro en ', '')
RETURN cResult




FUNCTION NumToWordsNL( n )
/**************************/
LOCAL aEen := { ;
"", "een", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", ;
"tien", "elf", "twaalf", "dertien", "veertien", "vijftien", ;
"zestien", "zeventien", "achttien", "negentien" }

LOCAL aTien := { ;
"", "", "twintig", "dertig", "veertig", "vijftig", ;
"zestig", "zeventig", "tachtig", "negentig" }

LOCAL c := ""
LOCAL nMil, nDui, n100, n10, n1

IF n == 0
   RETURN "nul"
ENDIF

* miljoenen
IF n >= 1000000
   nMil := INT( n / 1000000 )
   c := NumToWordsNL( nMil ) + ;
        IF( nMil == 1, " miljoen", " miljoen" )
   n := n % 1000000
   IF n > 0
      c += " " + NumToWordsNL( n )
   ENDIF
   RETURN c
ENDIF

* duizenden
IF n >= 1000
   nDui := INT( n / 1000 )
   IF nDui == 1
      c := "duizend"
   ELSE
      c := NumToWordsNL( nDui ) + " duizend"
   ENDIF
   n := n % 1000
   IF n > 0
      c += " " + NumToWordsNL( n )
   ENDIF
   RETURN c
ENDIF

* honderden
IF n >= 100
   n100 := INT( n / 100 )
   c := aEen[ n100 + 1 ] + "honderd"
   n := n % 100
   IF n > 0
      c += " " + NumToWordsNL( n )
   ENDIF
   RETURN c
ENDIF

* < 20
IF n < 20
   RETURN aEen[ n + 1 ]
ENDIF

* tientallen
n10 := INT( n / 10 )
n1  := n % 10

IF n1 == 0
   RETURN aTien[ n10 + 1 ]
ENDIF

IF n1 == 2
   c := "tweeën"
ELSEIF n1 == 3
   c := "drieën"
ELSE
   c := aEen[ n1 + 1 ] + "en"
ENDIF

RETURN c + aTien[ n10 + 1 ]

]]>
no_email@example.com (serge_girard) http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72146#p72146 Sat, 21 Feb 2026 15:04:47 +0000 http://mail.hmgforum.com/viewtopic.php?f=19&t=7730&p=72146#p72146
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by AUGE_OHR]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72091#p72091 i have never used a Modal Window but you can try "FindWindowA" an bring it ToFront

Code: Select all

Function toFront()
LOCAL cTitle  := "my Window Title"
LOCAL hWndDlg := DllCall( "User32.dll", DLL_STDCALL, "FindWindowA", 0, cTitle )
   IF !( hWndDlg == 0 )
      DllCall( "User32.dll", DLL_STDCALL, "SetForegroundWindow", hWndDlg )
      DllCall( "User32.dll", DLL_STDCALL, "BringWindowToTop", hWndDlg )
      DllCall( "User32.dll", DLL_STDCALL, "ShowWindow", hWndDlg, 1 )
      DllCall( "User32.dll", DLL_STDCALL, "UpdateWindow", hWndDlg )
   ENDIF
RETURN
]]>
no_email@example.com (AUGE_OHR) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72091#p72091 Tue, 10 Feb 2026 21:12:39 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72091#p72091
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by mol]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72092#p72092 Why not modal? I think it's better than child or standard


PS.
I found another solution... but it sauses some problems while switching to another apps:

Code: Select all

SetWindowPos( MyForm.HANDLE, -1 , 0, 0, 0, 0, hb_bitOR( SWP_NOMOVE, SWP_NOSIZE ) )
]]>
no_email@example.com (mol) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72092#p72092 Wed, 11 Feb 2026 12:19:33 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72092#p72092
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by franco]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72093#p72093 In my programs I make my starting program windows larger then any functions happening from these windows. This way a person can
see that there is a window before the window they are working in and can move the window see a window under it.
I would be nice at times like when in an invoice for a customer and wanting to know what what I sold an item to him before.
When in this situation I can start a new main program and go look then exit and come back to first program. I try to educate my users
to finish what they are doing before leaving the computer with locked files so nobody else can use them.]]>
no_email@example.com (franco) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72093#p72093 Wed, 11 Feb 2026 16:53:30 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72093#p72093
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by mol]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72097#p72097 When I bring my form to the top, after switching to another application, my form is not covered by it. It's stressful when I center my app window, and try to print something from another - printing window is undelayed and unusable...]]> no_email@example.com (mol) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72097#p72097 Mon, 16 Feb 2026 19:27:33 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72097#p72097 <![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by mol]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72098#p72098 Did someone find a way to calorize TAB control? I'm using tab control, but I have an idea to use different back color for different pages..
Is it possible?]]>
no_email@example.com (mol) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72098#p72098 Mon, 16 Feb 2026 19:31:49 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72098#p72098
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by AUGE_OHR]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72099#p72099
mol wrote: Mon Feb 16, 2026 7:31 pm Did someone find a way to calorize TAB control? I'm using tab control, but I have an idea to use different back color for different pages..
Is it possible?
YES, you need Ownerdraw (not sure how to do it in HMG) !

i made in XBase++ and Fivewin for "Dark Mode"
Image
and use Icon for "active" TAB (which can also done under HMG )

here CODE, to change "active" TAB Icon, for HMG

Code: Select all

PROCEDURE Tab_Change_Icon( cParentForm, cControlName, nNo )
LOCAL nControlHandle
LOCAL xTab, nTab, Images, i, NoTrans := .F.
LOCAL aImages        := {}

   xTab := GetProperty( cParentForm, cControlName, "Value" )
   IF VALTYPE( xTab ) = "A"
      nTab := xTab[ 1 ]
   ELSE
      nTab := xTab
   ENDIF

   IF nNo = 2 // right side
      nDimRight := LEN( Stack_Right )
      FOR i := 1 TO nDimRight
         IF i = nTab
            AADD( aImages, "GRUENPUNKT" )
         ELSE
            AADD( aImages, "MYFIXDRIVE16" )
         ENDIF
      NEXT
   ELSE 
      nDimLeft := LEN( Stack_Left )
      FOR i := 1 TO nDimLeft
         IF i = nTab
            AADD( aImages, "GRUENPUNKT" )
         ELSE
            AADD( aImages, "MYFIXDRIVE16" )
         ENDIF
      NEXT
   ENDIF

   nControlHandle := GetControlHandle( cControlName, cParentForm )
   // not sure need to Destroy "old" Imagelist before
   IMAGELIST_DESTROY( nControlHandle )
   // will create own Imagelist and set TCM_SETIMAGELIST
   ADDTABBITMAP( nControlHandle, aImages, NoTrans ) // found in \SOURCE\h_tab.prg

RETURN
p.s. as i remember right there is a Class to Ownerdraw Button under HMG.
Image]]>
no_email@example.com (AUGE_OHR) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72099#p72099 Mon, 16 Feb 2026 21:49:31 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72099#p72099
<![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by mol]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72100#p72100 no_email@example.com (mol) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72100#p72100 Mon, 16 Feb 2026 21:53:38 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72100#p72100 <![CDATA[HMG Source :: Re: Bring modal form to the top :: Reply by franco]]> http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72101#p72101 menu all programs show up. I just pick the started program I want to use. One program may be in customer file, one in inventory,
one in invoicing. Maybe this does not work for you. As I stated before I do not recommend this in a network because you could be locking
someone out of a file you have just sitting there.]]>
no_email@example.com (franco) http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72101#p72101 Tue, 17 Feb 2026 18:31:37 +0000 http://mail.hmgforum.com/viewtopic.php?f=8&t=7727&p=72101#p72101
<![CDATA[HMG Utilities :: Sobre modulo H_edit_ex.prg :: Author nelido]]> http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72105#p72105 --------------------------------------------------------------------------
I'd like to know if anyone could provide me with the latest update for the H_EDIT_EX.PRG module for HMG. I'm using a 2017 version, but it has some issues that may have already been resolved. Thanks in advance, and best regards.]]>
no_email@example.com (nelido) http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72105#p72105 Fri, 20 Feb 2026 17:22:57 +0000 http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72105#p72105
<![CDATA[HMG Utilities :: Re: Sobre modulo H_edit_ex.prg :: Reply by serge_girard]]> http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72106#p72106
S]]>
no_email@example.com (serge_girard) http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72106#p72106 Fri, 20 Feb 2026 19:52:29 +0000 http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72106#p72106
<![CDATA[HMG Utilities :: Re: Sobre modulo H_edit_ex.prg :: Reply by danielmaximiliano]]> http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72147#p72147
nelido wrote: Fri Feb 20, 2026 5:22 pm Quisiera saber si alguien me pudiera facilitar la última actualización del módulo H_EDIT_EX.PRG para HMG, estoy utilizando una versión del 2017 pero tiene algunos problemas que quizás ya estén resueltos. De antemano muy agradecido, un abrazo grande.
H_edit_ex.prg esta bien documentado y es del 2017, cual es tu inconveniente al usarlo ?]]>
no_email@example.com (danielmaximiliano) http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72147#p72147 Mon, 23 Feb 2026 00:56:27 +0000 http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72147#p72147
<![CDATA[HMG Utilities :: Re: Sobre modulo H_edit_ex.prg :: Reply by nelido]]> http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72150#p72150
* Problema al imprimir un campo Numérico seguido de otro Cadena se sobre escriben
* Problema al imprimir con el encuadre del encabezado de columnas, poco legible
* Problema al imprimir usando indice y filtro cuando el primer campo se repite
* Problema al imprimir paginado
* Problema al imprimir encabezado y pie de página cuando cambia de Vertical a Horizontal

Si su H_edit_ex.prg tiene esto resuelto le agradecería me lo enviara por esta via.

Un abrazo, hermano.]]>
no_email@example.com (nelido) http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72150#p72150 Thu, 26 Feb 2026 17:53:38 +0000 http://mail.hmgforum.com/viewtopic.php?f=10&t=7731&p=72150#p72150
<![CDATA[HMG Bug Reports :: AddColumn to GRID not working properly :: Author kjedroska]]> http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72148#p72148

Code: Select all

#include "hmg.ch"

FUNCTION Main
    LOCAL nLiczbaKryt, nLiczbaRol, x, y, cWiersz
    PRIVATE aItems, aNaglowki, aSzerokosci
    SET EXACT ON
    SET DELETED ON
    SET DATE FORMAT "dd.mm.yyyy"

    aItems := {}
    aNaglowki := {}
    aSzerokosci := {}
    nLiczbaKryt := 10
    nLiczbaRol := 10

    FOR x = 1 TO nLiczbaKryt
        AAdd( aNaglowki, ALLTRIM(STR(x)) )
        AAdd( aSzerokosci, 80 )
    NEXT

    FOR y = 1 to nLiczbaRol
        cWiersz := {}
        ASize (cWiersz, nLiczbaKryt)
        FOR x = 1 to nLiczbaKryt
            cWiersz [x] := ALLTRIM (STR (x + y))
        NEXT
        AAdd (aItems, cWiersz)
    NEXT

    Edit_criteria ()

    DoMethod("kryteria", "Activate")
RETURN Nil

PROCEDURE Edit_criteria ()
    DEFINE WINDOW kryteria AT 162 , 472 WIDTH 1137 HEIGHT 744 TITLE "Kryteria" MAIN
        DEFINE GRID Grid_1
            ROW    70
            COL    40
            WIDTH  840
            HEIGHT 420
            ITEMS aItems
            WIDTHS aSzerokosci
            HEADERS aNaglowki
            FONTNAME "Arial"
            FONTSIZE 9
        END GRID

        DEFINE BUTTON Button_11
            ROW    540
            COL    140
            WIDTH  150
            CAPTION "Dodaj kryterium"
            ACTION DodajKryterium()
        END BUTTON
    END WINDOW
RETURN

FUNCTION DodajKryterium()
    LOCAL i, nWiersze, nKolumnyNowe, aNowyWiersz
    LOCAL aNoweNaglowki := {}, aNoweSzer := {}
    LOCAL aNoweItems := {}

    nWiersze := Len(aItems)
    nKolumnyNowe := GetProperty("kryteria", "Grid_1", "ColumnCount") + 1

    FOR i := 1 TO nKolumnyNowe
        AAdd(aNoweNaglowki, ALLTRIM(STR(i)))
        AAdd(aNoweSzer, 80)
    NEXT i

    DoMethod("kryteria", "Grid_1", "AddColumnEx", nKolumnyNowe, "K" + ALLTRIM(STR(nKolumnyNowe)), 80, 0, )
 
    SetProperty("kryteria", "Grid_1", "Headers", aNoweNaglowki)
    SetProperty("kryteria", "Grid_1", "Widths", aNoweSzer)
    DoMethod ("kryteria", "Grid_1", "Refresh")

   FOR i := 1 TO nWiersze
	kryteria.Grid_1.Cell (nKolumnyNowe, i) := "New text"
   NEXT
   
    DoMethod ("kryteria", "Grid_1", "Refresh")
	
RETURN Nil
But the texts in the last column do not appear. Any idea ? Help me please.]]>
no_email@example.com (kjedroska) http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72148#p72148 Thu, 26 Feb 2026 07:45:38 +0000 http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72148#p72148
<![CDATA[HMG Bug Reports :: Re: AddColumn to GRID not working properly :: Reply by serge_girard]]> http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72149#p72149
See att.

Serge

Attachments


hmg.png (11.19 KiB)

]]>
no_email@example.com (serge_girard) http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72149#p72149 Thu, 26 Feb 2026 07:52:38 +0000 http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72149#p72149
<![CDATA[HMG Bug Reports :: Re: AddColumn to GRID not working properly :: Reply by kjedroska]]> http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72151#p72151 no_email@example.com (kjedroska) http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72151#p72151 Fri, 27 Feb 2026 08:32:41 +0000 http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72151#p72151 <![CDATA[HMG Bug Reports :: Re: AddColumn to GRID not working properly :: Reply by serge_girard]]> http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72152#p72152

Code: Select all

   FOR i := 1 TO nWiersze
	   //kryteria.Grid_1.CellEx (nKolumnyNowe, i) := "New text" 
      SetProperty('kryteria', 'Grid_1', 'CellEx', i,nKolumnyNowe , "New text" )  
   NEXT
This fills up the grid

Serge]]>
no_email@example.com (serge_girard) http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72152#p72152 Fri, 27 Feb 2026 10:20:27 +0000 http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72152#p72152
<![CDATA[HMG Bug Reports :: Re: AddColumn to GRID not working properly :: Reply by kjedroska]]> http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72153#p72153 no_email@example.com (kjedroska) http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72153#p72153 Fri, 27 Feb 2026 12:23:06 +0000 http://mail.hmgforum.com/viewtopic.php?f=20&t=7733&p=72153#p72153