Problem with valid email refresh btnbmp- RESOLVED

Re: Problem with valid email refresh btnbmp

Postby karinha » Mon Apr 08, 2024 11:16 am

Silvio, Master Nages' model, with few changes, works perfectly on Windows 7 32 bits with HARBOUR and XHARBOUR. Test it on Windows 10/11.

Silvio, el modelo del Maestro Nages, con pocos cambios, funciona perfectamente en Windows 7 32 bits con HARBOUR y XHARBOUR. Pruébelo en Windows 10/11

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\NAGESMAI.PRG

#include "FiveWin.ch"
#include "HbCompat.ch"

STATIC preCompiled

FUNCTION SilviBtnBmp()

   LOCAL oDlg, oGet, oBtn, oFont, oSalida, oSay, cSay, cTitle, oIco
   LOCAL cEmail := Space( 40 )

   SetGetColorFocus()

   cSay   := "INGRESE UN CORREO VÁLIDO:"
   cTitle := "FIVEWIN: VALIDAR EMAIL BY SILVIO FALCONI ->" + Version()

   DEFINE ICON oIco  FILE "..\icons\sendmail.ico"
   DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 24

   DEFINE DIALOG oDlg SIZE 600, 300 PIXEL TRUEPIXEL TITLE cTitle FONT oFont  ;
      TRANSPARENT ICON oIco

   oDlg:lHelpIcon := .F.

   // Silvio: Intente ahora con Windows 10/11 En Windows 7 funciona bien.
   @ 38, 40 GET oSay VAR cSay SIZE 400, 40 PIXEL PICTURE "@K!" OF oDlg       ;
      FONT oFont UPDATE COLOR CLR_WHITE, CLR_BLACK NOBORDER WHEN( .F. )

   oSay:lBtnTransparent := .T.       // transparent button get oSay
   oSay:lAdjustBtn      := .T.       // Button Get Adjust Witdh oSay
   oSay:lDisColors      := .F.       // Deactive disable color
   oSay:nClrTextDis     := CLR_WHITE // Color text disable status
   oSay:nClrPaneDis     := CLR_BLACK // Color Pane disable status

   @  80, 40 GET oGet VAR cEmail SIZE 400, 40 PIXEL OF oDlg ;
      ON CHANGE ( oDlg:AEvalWhen(), oDlg:Update() )

   @ 200, 40 BTNBMP oBtn PROMPT "Account Invio" LEFT ;
      FILE "..\bitmaps\alphabmp\gmail.bmp", "",      ;
      "..\bitmaps\alphabmp\question.bmp", ""         ;
      SIZE 220, 60 PIXEL OF oDlg FLAT                ;
      ACTION MsgInfo( LOWER( cEmail ) )              ;
      WHEN ValidaEmail( cEmail )

   @ 200, 350 BTNBMP oSalida PROMPT "Salida" LEFT FONT oFont                 ;
      FILE "..\bitmaps\Exit.bmp" SIZE 220, 60 PIXEL OF oDlg FLAT 2007 GDIP   ;
      COLOR CLR_WHITE, CLR_BLACK ACTION( oDlg:End() )

   oSalida:cToolTip := "Salida - Exit - Cancelar"

   oSalida:bClrGrad := { |lInvert| If( lInvert, 0x60FFA54A, nARGB( 64, 0, 192, 0 ) ) }

   WITH OBJECT oSalida
      :nClrBorder := { |lInvert| If( lInvert, 0x80FFA54A, nARGB( 54, 0, 192, 0 ) ) } // CLR_BLACK //  border color
      :bColorMap  := { || { { CLR_YELLOW, CLR_BLACK } } }  // image color
   END

   oSalida:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

RETURN NIL

FUNCTION ValidaEmail( cEmail )

   DEFAULT preCompiled := hb_regexComp( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$" )

RETURN .NOT. EMPTY( hb_regex( preCompiled, AllTrim( cEmail ) ) )

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with valid email refresh btnbmp

Postby Silvio.Falconi » Tue Apr 09, 2024 9:41 am

karinha wrote:Silvio, Master Nages' model, with few changes, works perfectly on Windows 7 32 bits with HARBOUR and XHARBOUR. Test it on Windows 10/11.

Silvio, el modelo del Maestro Nages, con pocos cambios, funciona perfectamente en Windows 7 32 bits con HARBOUR y XHARBOUR. Pruébelo en Windows 10/11

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\NAGESMAI.PRG

#include "FiveWin.ch"
#include "HbCompat.ch"

STATIC preCompiled

FUNCTION SilviBtnBmp()

   LOCAL oDlg, oGet, oBtn, oFont, oSalida, oSay, cSay, cTitle, oIco
   LOCAL cEmail := Space( 40 )

   SetGetColorFocus()

   cSay   := "INGRESE UN CORREO VÁLIDO:"
   cTitle := "FIVEWIN: VALIDAR EMAIL BY SILVIO FALCONI ->" + Version()

   DEFINE ICON oIco  FILE "..\icons\sendmail.ico"
   DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 24

   DEFINE DIALOG oDlg SIZE 600, 300 PIXEL TRUEPIXEL TITLE cTitle FONT oFont  ;
      TRANSPARENT ICON oIco

   oDlg:lHelpIcon := .F.

   // Silvio: Intente ahora con Windows 10/11 En Windows 7 funciona bien.
   @ 38, 40 GET oSay VAR cSay SIZE 400, 40 PIXEL PICTURE "@K!" OF oDlg       ;
      FONT oFont UPDATE COLOR CLR_WHITE, CLR_BLACK NOBORDER WHEN( .F. )

   oSay:lBtnTransparent := .T.       // transparent button get oSay
   oSay:lAdjustBtn      := .T.       // Button Get Adjust Witdh oSay
   oSay:lDisColors      := .F.       // Deactive disable color
   oSay:nClrTextDis     := CLR_WHITE // Color text disable status
   oSay:nClrPaneDis     := CLR_BLACK // Color Pane disable status

   @  80, 40 GET oGet VAR cEmail SIZE 400, 40 PIXEL OF oDlg ;
      ON CHANGE ( oDlg:AEvalWhen(), oDlg:Update() )

   @ 200, 40 BTNBMP oBtn PROMPT "Account Invio" LEFT ;
      FILE "..\bitmaps\alphabmp\gmail.bmp", "",      ;
      "..\bitmaps\alphabmp\question.bmp", ""         ;
      SIZE 220, 60 PIXEL OF oDlg FLAT                ;
      ACTION MsgInfo( LOWER( cEmail ) )              ;
      WHEN ValidaEmail( cEmail )

   @ 200, 350 BTNBMP oSalida PROMPT "Salida" LEFT FONT oFont                 ;
      FILE "..\bitmaps\Exit.bmp" SIZE 220, 60 PIXEL OF oDlg FLAT 2007 GDIP   ;
      COLOR CLR_WHITE, CLR_BLACK ACTION( oDlg:End() )

   oSalida:cToolTip := "Salida - Exit - Cancelar"

   oSalida:bClrGrad := { |lInvert| If( lInvert, 0x60FFA54A, nARGB( 64, 0, 192, 0 ) ) }

   WITH OBJECT oSalida
      :nClrBorder := { |lInvert| If( lInvert, 0x80FFA54A, nARGB( 54, 0, 192, 0 ) ) } // CLR_BLACK //  border color
      :bColorMap  := { || { { CLR_YELLOW, CLR_BLACK } } }  // image color
   END

   oSalida:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

RETURN NIL

FUNCTION ValidaEmail( cEmail )

   DEFAULT preCompiled := hb_regexComp( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$" )

RETURN .NOT. EMPTY( hb_regex( preCompiled, AllTrim( cEmail ) ) )

// FIN / END
 


Regards, saludos.



NOT RUN

harbour + LAST FWH + BCC7.70

Intel(R) Xeon(R) CPU E3-1225 V2 @ 3.20GHz 3.20 GHz
Windows 10 Pro 19045.4170
Windows Feature Experience Pack 1000.19054.1000.0
ram 4,00 GB (3,88 GB utilizzabile)


Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with valid email refresh btnbmp

Postby karinha » Tue Apr 09, 2024 1:59 pm

Sílvio, there is something wrong with your HARBOUR or FIVEWIN, check with the FiveTech team or Enrico Maria Giordano. See image of what it should look like:

Sílvio, hay algún problema con tu HARBOUR o FIVEWIN, consulta con el equipo de FiveTech o con Enrico Maria Giordano. Vea imagen de cómo debería verse:

https://imgur.com/Q94QYG4

Image

Intente con este nuevo modelo y comente:

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\NAGESMAI.PRG

#include "FiveWin.ch"
#include "HbCompat.ch"

STATIC preCompiled
STATIC lIsValid := .F.

FUNCTION SilviBtnBmp()

   LOCAL oDlg, oGet, oBtn, oFont, oSalida, oSay, cSay, cTitle, oIco
   LOCAL cEmail := Space( 40 )

   SetGetColorFocus()

   cSay   := "INGRESE UN CORREO VÁLIDO:"
   cTitle := "FIVEWIN: VALIDAR EMAIL BY SILVIO FALCONI ->" + Version()

   DEFINE ICON oIco  FILE "..\icons\sendmail.ico"
   DEFINE FONT oFont NAME "Segoe UI" SIZE 0, - 24

   DEFINE DIALOG oDlg SIZE 600, 300 PIXEL TRUEPIXEL TITLE cTitle FONT oFont  ;
      TRANSPARENT ICON oIco

   oDlg:lHelpIcon := .F.

   // Silvio: Intente ahora con Windows 10/11 En Windows 7 funciona bien.
   @ 38, 40 GET oSay VAR cSay SIZE 400, 40 PIXEL PICTURE "@K!" OF oDlg       ;
      FONT oFont UPDATE COLOR CLR_WHITE, CLR_BLACK NOBORDER WHEN( .F. )

   oSay:lBtnTransparent := .T.       // transparent button get oSay
   oSay:lAdjustBtn      := .T.       // Button Get Adjust Witdh oSay
   oSay:lDisColors      := .F.       // Deactive disable color
   oSay:nClrTextDis     := CLR_WHITE // Color text disable status
   oSay:nClrPaneDis     := CLR_BLACK // Color Pane disable status

   @  80, 40 GET oGet VAR cEmail SIZE 400, 40 PIXEL OF oDlg ;
      ON CHANGE ( oDlg:AEvalWhen(), oDlg:Update() )

   @ 200, 40 BTNBMP oBtn PROMPT "Account Invio" LEFT ;
      FILE "..\bitmaps\alphabmp\gmail.bmp", "",      ;
      "..\bitmaps\alphabmp\question.bmp", ""         ;
      SIZE 220, 60 PIXEL OF oDlg FLAT                ;
      ACTION MsgInfo( LOWER( cEmail ) )              ;
      WHEN ValidaEmail( cEmail )

   oBtn:cToolTip := "Account Invio"

   @ 200, 350 BTNBMP oSalida PROMPT "Salida" LEFT FONT oFont                 ;
      FILE "..\bitmaps\Exit.bmp" SIZE 220, 60 PIXEL OF oDlg FLAT 2007 GDIP   ;
      COLOR CLR_WHITE, CLR_BLACK ACTION( oDlg:End() )

   oSalida:cToolTip := "Salida - Exit - Cancelar"

   oSalida:bClrGrad := { |lInvert| If( lInvert, 0x60FFA54A, nARGB( 64, 0, 192, 0 ) ) }

   WITH OBJECT oSalida
      :nClrBorder := { |lInvert| If( lInvert, 0x80FFA54A, nARGB( 54, 0, 192, 0 ) ) } // CLR_BLACK //  border color
      :bColorMap  := { || { { CLR_YELLOW, CLR_BLACK } } }  // image color
   END

   oSalida:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

   RELEASE FONT oFont

RETURN NIL

FUNCTION ValidaEmail( cEmail )

   // DEFAULT preCompiled := hb_regexComp( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$" )
   // LOCAL cRegEx := "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"
   LOCAL cRegEx := "^[a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$"
   // LOCAL cRegEx := hb_regexComp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$")
   // LOCAL cRegEx := "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"
   LOCAL cEmailSivio

   cEmailSivio := cEmail

   IF GETASYNCKEY( VK_UP )
      RETURN( .F. )
   ENDIF

   IF EMPTY( cEmailSivio )
      RETURN( .F. )
   ENDIF

   #IFDEF __XHARBOUR__

   // XHARBOUR
   IF ( ALLTRIM(LOWER( cEmailSivio ) ) LIKE cRegEx )

   #ELSE

   // HARBOUR:
   IF ( HB_REGEXLIKE( ( cRegEx ), ( ALLTRIM(LOWER( cEmailSivio ) ) ) ) )

   #ENDIF

      lIsValid := .T.

   ENDIF

   IF( lIsValid )

      RETURN .NOT. EMPTY( hb_regex( cRegEx, AllTrim( cEmail ) ) )

   ENDIF

RETURN( lIsValid )

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7832
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Problem with valid email refresh btnbmp

Postby Antonio Linares » Fri Apr 12, 2024 6:03 am

nageswaragunupudi wrote:Try
Code: Select all  Expand view  RUN
function SilviBtnBmp()

   local oDlg, oGet, oBtn, oFont
   local cEmail      := Space( 40 )

   SetGetColorFocus()

   DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-24
   DEFINE DIALOG oDlg SIZE 600,300 PIXEL TRUEPIXEL FONT oFont

   @  40,40 GET oGet VAR cEmail SIZE 400,40 PIXEL OF oDlg ;
      ON CHANGE ( oDlg:AEvalWhen(), oDlg:Update() )

   @ 120,40 BTNBMP oBtn PROMPT "Account Invio" LEFT ;
      FILE "..\bitmaps\alphabmp\gmail.bmp", "", ;
           "..\bitmaps\alphabmp\question.bmp", "" ;
      SIZE 220,60 PIXEL OF oDlg FLAT ;
      ACTION MsgInfo( cEmail ) ;
      WHEN ValidaEmail( cEmail )

//   oBtn:lDisColor := .f.

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil

function validaEmail(cEmail)

   static preCompiled

   DEFAULT preCompiled := hb_regexComp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$")

return !Empty( hb_regex( preCompiled, alltrim( cEmail ) ) )


Image


working fine here
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem with valid email refresh btnbmp

Postby nageswaragunupudi » Fri Apr 12, 2024 6:19 am

Can any other friends also test this program and let us know if it is working for them.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with valid email refresh btnbmp

Postby RAMESHBABU » Fri Apr 12, 2024 6:33 am

Hi Friends,

I have tested the Antonio's above code with:

Win11,
FWH 2310,
xHarbour 1.3.1 Lastest Build,
BCC760

And it is working as intended.

-Ramesh Babu
User avatar
RAMESHBABU
 
Posts: 625
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: Problem with valid email refresh btnbmp

Postby nageswaragunupudi » Fri Apr 12, 2024 6:55 am

Just now, I requested Mr. Anser KK also to help testing.
He tested with FWH2307 and informed that the program is NOT working with FWH2307

So, Mr. Silvio
Let me test with FWH2307 and get back to you.
Also let me know the FWH version you are using.
Thanks
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with valid email refresh btnbmp

Postby richard-service » Fri Apr 12, 2024 7:41 am

nageswaragunupudi wrote:Can any other friends also test this program and let us know if it is working for them.


Dear Rao,

Test code from Antonio.
working fine for 32bit.
    Win11 home/pro
    FWH2402
    Harbour 3.2
    Bcc77
Last edited by richard-service on Fri Apr 12, 2024 8:07 am, edited 1 time in total.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Problem with valid email refresh btnbmp

Postby Silvio.Falconi » Fri Apr 12, 2024 8:04 am

nageswaragunupudi wrote:Just now, I requested Mr. Anser KK also to help testing.
He tested with FWH2307 and informed that the program is NOT working with FWH2307

So, Mr. Silvio
Let me test with FWH2307 and get back to you.
Also let me know the FWH version you are using.
Thanks



Dear Rao,

I'using the last fwh release "FWH 24.02" (FW_VersionNo 24021)

Harbour Compiler version: Harbour 3.2.0dev (r2403071241)
C compiler version: Borland/Embarcadero C++ 7.7 (32-bit)
Windows 10 64 Bits, version: 6.2, Build 9200


I'allready tested with
#define FWVERSION "FWH 23.10"
#define FW_VersionNo 23101
Compiler version: Harbour 3.2.0dev (r2008190002)
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with valid email refresh btnbmp- RESOLVED

Postby Silvio.Falconi » Sun Apr 14, 2024 6:44 pm

After raising awareness of Antonio Linares and Nageswarao, after I went crazy thinking what it could be, i.e. why the Nageswarao test worked well for everyone and not on my computers, I remembered that many years ago I had the same problem but with the hb_regxxxxxxxx functions, I went to look for the test and I saw that a library was missing, I was hoping that this was the error and in fact it was for that library that was missing and I immediately notified Antonio Linares and I hope that Nageswarao reads this message.
The missing library was hb_pCre.lib as can be seen from the figure below.

Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with valid email refresh btnbmp- RESOLVED

Postby Antonio Linares » Sun Apr 14, 2024 7:49 pm

Very good that it got solved :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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