Page 2 of 2
Re: Problem with valid email refresh btnbmp
Posted: Mon Apr 08, 2024 11:16 am
by karinha
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 _, funciona perfectamente en Windows 7 32 bits con HARBOUR y XHARBOUR. Pruébelo en Windows 10/11
Code: Select all | Expand
// 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.
Re: Problem with valid email refresh btnbmp
Posted: Tue Apr 09, 2024 9:41 am
by Silvio.Falconi
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 _, funciona perfectamente en Windows 7 32 bits con HARBOUR y XHARBOUR. Pruébelo en Windows 10/11
Code: Select all | Expand
// 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)
Re: Problem with valid email refresh btnbmp
Posted: Tue Apr 09, 2024 1:59 pm
by karinha
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
Intente con este nuevo modelo y comente:
Code: Select all | Expand
// 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.
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 6:03 am
by Antonio Linares
nageswaragunupudi wrote:Try
Code: Select all | Expand
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 ) ) )
working fine here
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 6:19 am
by nageswaragunupudi
Can any other friends also test this program and let us know if it is working for them.
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 6:33 am
by RAMESHBABU
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
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 6:55 am
by nageswaragunupudi
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
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 7:41 am
by richard-service
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
Re: Problem with valid email refresh btnbmp
Posted: Fri Apr 12, 2024 8:04 am
by Silvio.Falconi
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)
Re: Problem with valid email refresh btnbmp- RESOLVED
Posted: Sun Apr 14, 2024 6:44 pm
by Silvio.Falconi
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.
Re: Problem with valid email refresh btnbmp- RESOLVED
Posted: Sun Apr 14, 2024 7:49 pm
by Antonio Linares
Very good that it got solved