<![CDATA[HMGforum.com]]> http://hmgforum.com Sat, 27 Apr 2024 03:42:39 -0500 Smartfeed extension for phpBB http://hmgforum.com/styles/prosilver/theme/images/site_logo.svg <![CDATA[HMGforum.com]]> http://hmgforum.com en-gb Sat, 27 Apr 2024 03:42:39 -0500 60 <![CDATA[HMG General Help :: Re: FROM XML TO DBF :: Reply by mjaviergutierrez]]> http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70944#p70944 Gracias, saludos.]]> no_email@example.com (mjaviergutierrez) http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70944#p70944 Thu, 28 Mar 2024 15:26:38 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70944#p70944 <![CDATA[HMG General Help :: Re: FROM XML TO DBF :: Reply by dragancesu]]> http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70965#p70965
This is some of my solutions on how to export data from xml to a dbf file

step 1 : select xml file (analyse)
step 2 : mark which fields you want to overwrite in dbf
note: you have to mark one field as key, group, top level, I don't know what exactly it is called in the xml spec
step 3 : generate the program that will do it (build)
step 4 : compile it

XML is a powerful structure, so it can have the same field (by name) in several levels, such fields will appear only once, practically only the last appearance will be written

xml_fnc.prg contain one function need for generated program (program.prg)

Attachments

xml2dbf.zip (1614.05 KiB)
]]>
no_email@example.com (dragancesu) http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70965#p70965 Fri, 05 Apr 2024 06:40:41 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7361&p=70965#p70965
<![CDATA[HMG General Help :: how to get date and time from internet :: Author fouednoomen]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70954#p70954
Hello, I need to know how I can get the date and time from the internet

Best regads
Foued Noomen]]>
no_email@example.com (fouednoomen) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70954#p70954 Wed, 03 Apr 2024 03:39:18 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70954#p70954
<![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70955#p70955
fouednoomen wrote: Wed Apr 03, 2024 8:39 am Hello, I need to know how I can get the date and time from the internet
Hello Foued,

Thanks for your request :!:

It is possible with the following source code:

Code: Select all

#include "minigui.ch"

function Main()

   MsgInfo( Now() )

return nil

#pragma BEGINDUMP

#ifdef _CRT_SECURE_NO_WARNINGS
#undef _CRT_SECURE_NO_WARNINGS
#endif
#define _CRT_SECURE_NO_WARNINGS 1

#include <hbapi.h>

#ifdef __BORLANDC__
   #define _WIN32_WINNT 0x0502
#endif

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#ifdef __BORLANDC__
   #include <winsock2.h>
#endif

#include <ws2tcpip.h>

HB_FUNC( NOW )
{
    struct addrinfo hints;
    struct addrinfo *result;
    int sockfd;
    int rv;
    char buf[ 64 ];
    time_t now = time(NULL);
    char str[ 26 ];
    WSADATA wsaData;  

    WSAStartup(MAKEWORD(2,2), &wsaData);

    memset(&hints, 0, sizeof(struct addrinfo));
    hints.ai_family = AF_INET; /* Allow IPv4 */
    hints.ai_socktype = SOCK_STREAM; /* Stream socket */
    hints.ai_flags = AI_CANONNAME; /* Return canonical name */
   
    rv = getaddrinfo("www.google.com", "http", &hints, &result);
    if (rv != 0) {
        fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
        exit(1);
    }
   
    /* Create socket */
    sockfd = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
    if (sockfd == -1) {
        perror("socket");
        exit(1);
    }
   
    /* Connect */
    if (connect(sockfd, result->ai_addr, result->ai_addrlen) == -1) {
        perror("connect");
        exit(1);
    }
   
    /* Get time */
    snprintf(buf, sizeof(buf), "GET / HTTP/1.0\r\n\r\n");
    send(sockfd, buf, strlen(buf), 0);
    recv(sockfd, buf, sizeof(buf), 0);
    ctime_s( str, 26, &now );
    snprintf(buf, sizeof( buf ), "Current time: %s", str );
   
    closesocket(sockfd);
    freeaddrinfo(result);
   
    hb_retc( buf );
}

#pragma ENDDUMP
You can see the result in the picture below:
image.png
Hope this is helpful 8-)

Attachments


image.png (5.24 KiB)

]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70955#p70955 Wed, 03 Apr 2024 04:38:47 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70955#p70955
<![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by ASESORMIX]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70956#p70956 if i change date and time of my pc,
this rutine shows the date and time of mi pc.]]>
no_email@example.com (ASESORMIX) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70956#p70956 Wed, 03 Apr 2024 12:00:51 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70956#p70956
<![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by edk]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70957#p70957
In the aServersNTP variable, define the addresses of the NTP servers from which you want to get the time. To get the shortest latency times possible, it is best to use local servers.

Code: Select all

/* Copyright 2013-2014 Viktor Szakats (vszakats.net/harbour) */
#include "hmg.ch"
#include "hbsocket.ch"
#include "hbver.ch"

PROCEDURE MAIN

   Set( _SET_DATEFORMAT, "yyyy.mm.dd" )

	DEFINE WINDOW Win_1 ;
		AT 0,0 ;
		WIDTH 400 ;
		HEIGHT 400 ;
		TITLE 'NTP DEMO' ;
		MAIN 

	@ 70,70 BUTTON Button_1 CAPTION 'NTP Network Time Protocol' ACTION GetTime() WIDTH 250

	END WINDOW

	CENTER WINDOW Win_1 

	ACTIVATE WINDOW Win_1 

Return

Function GetTime ()

   LOCAL tTime, i := 0, tSystemTime, tLocalTime, tOffset, cNewTime
   LOCAL aServersNTP := { "0.africa.pool.ntp.org", "0.pl.pool.ntp.org" ,"1.pl.pool.ntp.org" ,"2.pl.pool.ntp.org" ,"3.pl.pool.ntp.org" , "tempus1.gum.gov.pl", "tempus2.gum.gov.pl", "ntp.task.gda.pl", "0.europe.pool.ntp.org" }

   DO WHILE i < Len( aServersNTP )
	i ++
        WAIT WINDOW "Connecting with " + aServersNTP [i] + ".... " NOWAIT
   	tTime := hb_ntp_GetTimeUTC( aServersNTP [i], /* port 123 */ , 3000 /* 3 sec */ ) 
	tSystemTime := hb_DateTime()
	tLocalTime := tTime + hb_UTCOffset() / 86400
	IF !EMPTY(tTime)
		EXIT
	ENDIF
        WAIT WINDOW "Connecting with " + aServersNTP [i] + " no response!" NOWAIT
   ENDDO

   WAIT CLEAR 

   IF EMPTY(tTime)
	MsgStop ( "Network not available. Check Fire-Wall" )
	RETURN
   ENDIF

   tOffset := tSystemTime - tLocalTime

   MsgInfo ( "UTC    time: " + hb_valToStr ( tTime ) + " by " + aServersNTP [i] + CRLF + ;
             "Local  time: " + hb_valToStr ( tLocalTime ) + CRLF + ;
             "System time: " + hb_valToStr ( tSystemTime ) + CRLF + ;
             "Offset time: " + RoznicaCzasu ( tOffset ) )

RETURN

Function RoznicaCzasu ( tDiff )
Local tRoznica := ABS ( tDiff )
Local cGodzin := Alltrim( Str (INT( hb_NToHour (tRoznica) ), 0, 0) )
Local cMinut  := StrZero (INT( hb_NToMin (tRoznica) ) % 60, 2, 0)
Local cSekund := StrZero (INT( hb_NToSec (tRoznica) ) % 60, 2, 0)
Local cMSek   := StrZero (( hb_NToMSec (tRoznica) ) % 1000, 3, 0)
RETURN IF( tDiff < 0, "-", "" ) + cGodzin + ":" + cMinut + ":" + cSekund + "." +cMsek


/*
 * NTP functions
 *
 * Copyright 2013 Viktor Szakats (vszakats.net/harbour)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file LICENSE.txt.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA (or visit https://www.gnu.org/licenses/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */


FUNCTION hb_ntp_GetTimeUTC( cServer, nPort, nTimeOut )

   LOCAL tTime := hb_SToT( "" )
   LOCAL hSocket, cBuffer

   IF HB_ISSTRING( cServer ) .AND. ! cServer == "" .AND. ;
      ! Empty( hSocket := hb_socketOpen( , HB_SOCKET_PT_DGRAM ) )
      cBuffer := hb_BChar( 8 ) + Replicate( hb_BChar( 0 ), 47 )
      IF hb_socketSendTo( hSocket, cBuffer,,, { HB_SOCKET_AF_INET, hb_socketResolveAddr( cServer ), hb_defaultValue( nPort, 123 ) } ) == hb_BLen( cBuffer )
         cBuffer := Space( 12 * 4 )
         IF hb_socketRecvFrom( hSocket, @cBuffer,,,, hb_defaultValue( nTimeOut, 10000 /* 10s */ ) ) == hb_BLen( cBuffer )
            tTime := hb_SToT( "19000101" ) + ;
               Bin2U( ntohl( hb_BSubStr( cBuffer, 10 * 4 + 1, 4 ) ) ) / 86400 + ;
               ( Bin2U( ntohl( hb_BSubStr( cBuffer, 11 * 4 + 1, 4 ) ) ) / ( 2 ^ 32 ) ) / 86400
         ENDIF
      ENDIF
      hb_socketClose( hSocket )
   ENDIF

   RETURN tTime

STATIC FUNCTION ntohl( c )

   IF hb_Version( HB_VERSION_ENDIANNESS ) == HB_VERSION_ENDIAN_LITTLE
      RETURN ;
         hb_BSubStr( c, 4, 1 ) + ;
         hb_BSubStr( c, 3, 1 ) + ;
         hb_BSubStr( c, 2, 1 ) + ;
         hb_BSubStr( c, 1, 1 )
   ENDIF

   RETURN c

STATIC FUNCTION Bin2U( c )

   LOCAL l := Bin2L( c )

   RETURN iif( l < 0, l + ( 2 ^ 32 ), l ) 
   
]]>
no_email@example.com (edk) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70957#p70957 Wed, 03 Apr 2024 13:36:23 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70957#p70957
<![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70961#p70961 no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70961#p70961 Thu, 04 Apr 2024 01:45:49 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70961#p70961 <![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by RPC]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70963#p70963
edk wrote: Wed Apr 03, 2024 6:36 pm NTP demo.

In the aServersNTP variable, define the addresses of the NTP servers from which you want to get the time. To get the shortest latency times possible, it is best to use local servers.
...

Thanks Edward.
]]>
no_email@example.com (RPC) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70963#p70963 Fri, 05 Apr 2024 05:23:55 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70963#p70963
<![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by fouednoomen]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70964#p70964 no_email@example.com (fouednoomen) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70964#p70964 Fri, 05 Apr 2024 06:07:44 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70964#p70964 <![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by Red2]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70967#p70967 no_email@example.com (Red2) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70967#p70967 Sat, 06 Apr 2024 10:24:16 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70967#p70967 <![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by franco]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70971#p70971 no_email@example.com (franco) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70971#p70971 Wed, 10 Apr 2024 10:49:21 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70971#p70971 <![CDATA[HMG General Help :: Re: how to get date and time from internet :: Reply by ASESORMIX]]> http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70972#p70972 no_email@example.com (ASESORMIX) http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70972#p70972 Thu, 11 Apr 2024 14:04:52 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7532&p=70972#p70972 <![CDATA[HMG General Help :: Unsurpassed Сasual Dating - Verified Ladies :: Author jortega]]> http://hmgforum.com/viewtopic.php?f=5&t=7537&p=70976#p70976 Real Women
Prime Сasual Dating]]>
no_email@example.com (jortega) http://hmgforum.com/viewtopic.php?f=5&t=7537&p=70976#p70976 Tue, 16 Apr 2024 06:12:35 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7537&p=70976#p70976
<![CDATA[HMG General Help :: DEFINE TAB :: Author jorge_riv]]> http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70980#p70980 Y tambien se pueda hacer mas grande el FONT en el TOOLTIP??
Alguien sabe??
Gracias
-----------------------------
How can I make the FONT Arial Bold?
And can the FONT in the TOOLTIP be made larger?
Someone knows??
Thank you]]>
no_email@example.com (jorge_riv) http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70980#p70980 Wed, 17 Apr 2024 23:10:22 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70980#p70980
<![CDATA[HMG General Help :: Re: DEFINE TAB :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70981#p70981
jorge_riv wrote: Thu Apr 18, 2024 4:10 am How can I make the FONT Arial Bold?
And can the FONT in the TOOLTIP be made larger?
Someone knows??
Hello Jorge,

This is possible with the ownerdraw TAB control in the MiniGUI Ex (look at the picture below). :arrow:
image.png
Hope that is helpful. :idea:

Attachments


image.png (8.01 KiB)

]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70981#p70981 Thu, 18 Apr 2024 03:37:54 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70981#p70981
<![CDATA[HMG General Help :: Re: DEFINE TAB :: Reply by jorge_riv]]> http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70983#p70983 PS: Every time they update the version of Minigui, I download it and update my programs.]]> no_email@example.com (jorge_riv) http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70983#p70983 Thu, 18 Apr 2024 13:29:49 -0500 http://hmgforum.com/viewtopic.php?f=5&t=7539&p=70983#p70983 <![CDATA[HMG General Help :: Re: Print preview in HMG Console mode :: Reply by mol]]> http://hmgforum.com/viewtopic.php?f=5&t=1633&p=70996#p70996
Strange, but in 2024 I need to call some forms (hmg window) from console mode.
Do someone working solution of this problem?
When I call window form, some of controls don't work and application hangs up]]>
no_email@example.com (mol) http://hmgforum.com/viewtopic.php?f=5&t=1633&p=70996#p70996 Wed, 24 Apr 2024 10:01:37 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1633&p=70996#p70996
<![CDATA[HMG General Help :: Re: Print preview in HMG Console mode :: Reply by edk]]> http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71000#p71000

Code: Select all

#include "hmg.ch"

REQUEST HB_GT_WIN_DEFAULT
*----------------------------------------------------------------------------------*
Function Main
*----------------------------------------------------------------------------------*

DEFINE WINDOW startCons AT 0 , 0 WIDTH 0 HEIGHT 0 TITLE "" MAIN;
   ON INIT Console();
   NOSHOW; 
   NOMINIMIZE; 
   NOMAXIMIZE; 
   NOSIZE; 
   NOSYSMENU; 
   ICON Nil;
   BACKCOLOR Nil;
   NOCAPTION
END WINDOW
ACTIVATE WINDOW startCons
Return Nil

**************************** MAIN *****************************
Procedure Console
Public cons_hwnd := GETCONSOLEWINDOW()
SETCONSOLETITLE ( "New console title" )

SETMODE(25,80)
@0,0 CLEA

DO WHILE .T.
	@2,2 SAY 'PRESS F10 TO CALL FORM 1'
	@4,2 SAY 'PRESS F11 TO HIDE CONSOLE AND CALL FORM 1'
	@6,2 SAY 'PRESS ESC TO EXIT'
	INKEY(0)
	IF LASTKEY()=27
		QUIT
	ENDIF
	IF LASTKEY()=-9
		Form1()
		SetForegroundWindow(cons_hwnd)
	ENDIF
	IF LASTKEY()=-40
		HideConsole(cons_hwnd)
		Form1()
		ShowConsole(cons_hwnd)
	ENDIF
	KEYBOARD ""
ENDDO
RETURN


**********************************************************
FUNCTION Form1()

DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 800 HEIGHT 600 ;
      TITLE 'FORM 1'
      
      ON KEY Escape ACTION ThisWindow.Release
   
    DEFINE TEXTBOX Text_1
        ROW    50
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        VALUE "hello!"
    END TEXTBOX

    DEFINE TEXTBOX Text_2
        ROW    90
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        NUMERIC .T. 
        VALUE 100
    END TEXTBOX

    DEFINE TEXTBOX Text_3
        ROW    130
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        DATE .T. 
        VALUE ctod('01/01/01')
    END TEXTBOX

    DEFINE LABEL Label_1
        ROW    50
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_1"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    DEFINE LABEL Label_2
        ROW    90
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_2"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    DEFINE LABEL Label_3
        ROW    130
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_3"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    DEFINE FRAME Frame_1
        ROW    10
        COL    30
        WIDTH  310
        HEIGHT 170
        FONTNAME "Arial"
        FONTSIZE 9
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        CAPTION "Frame_1"
        BACKCOLOR NIL
        FONTCOLOR NIL
        OPAQUE .T.
    END FRAME

    DEFINE FRAME Frame_2
        ROW    190
        COL    30
        WIDTH  310
        HEIGHT 170
        FONTNAME "Arial"
        FONTSIZE 9
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        CAPTION "Frame_2"
        BACKCOLOR NIL
        FONTCOLOR NIL
        OPAQUE .T.
    END FRAME

    DEFINE TEXTBOX Text_4
        ROW    230
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        VALUE ""
    END TEXTBOX

    DEFINE TEXTBOX Text_5
        ROW    270
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        NUMERIC .T. 
        VALUE Nil
    END TEXTBOX

    DEFINE TEXTBOX Text_6
        ROW    310
        COL    190
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Nil
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
        INPUTMASK Nil
        FORMAT Nil
        VALUE ""
    END TEXTBOX

    DEFINE LABEL Label_4
        ROW    230
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_4"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    DEFINE LABEL Label_5
        ROW    270
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_5"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    DEFINE LABEL Label_6
        ROW    310
        COL    60
        WIDTH  120
        HEIGHT 24
        VALUE "Label_6"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        HELPID Nil
        VISIBLE .T.
        TRANSPARENT .F.
        ACTION Nil
        AUTOSIZE .F.
        BACKCOLOR NIL
        FONTCOLOR NIL
    END LABEL

    
END WINDOW

SetForegroundWindow ( Form_1.Handle )

CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1

RETURN

#pragma BEGINDUMP
#include "hbapi.h"
#include "hbapiitm.h"
#include <windows.h>

// doesn't work with win32 function GetConsoleWindow()
HWND GetConWin()
{
HWND hwnd;
AllocConsole();
hwnd = FindWindowA("ConsoleWindowClass",NULL);
return hwnd;
}

HB_FUNC( GETCONSOLEWINDOW )
{
hb_retnl((long) GetConWin() );
}

HB_FUNC(HIDECONSOLE )
{
long h = hb_parnl(1);
if (h==NULL)
	h = GetConWin();
ShowWindow(h,SW_HIDE); // SW_HIDE
}

HB_FUNC(SHOWCONSOLE )
{
long h = hb_parnl(1);
if (h==NULL)
	h = GetConWin();
ShowWindow(h,SW_SHOW); // because 1'st time console stays minimized
ShowWindow(h,SW_RESTORE); //SW_SHOW
SetFocus(h);
SetForegroundWindow(h);
}


HB_FUNC(SETCONSOLETITLE)
{ char * szTitle=hb_parc(1);
SetConsoleTitle(szTitle);
}

#pragma ENDDUMP
]]>
no_email@example.com (edk) http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71000#p71000 Wed, 24 Apr 2024 16:40:20 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71000#p71000
<![CDATA[HMG General Help :: Re: Print preview in HMG Console mode :: Reply by mol]]> http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71001#p71001 no_email@example.com (mol) http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71001#p71001 Thu, 25 Apr 2024 01:29:51 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1633&p=71001#p71001 <![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by RPC]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70978#p70978
mol wrote: Wed Feb 10, 2010 7:59 am Try to change some code in my app:

Code: Select all


#define CRLF Chr( 13 ) + Chr( 10 )

#include "minigui.ch"

PROCEDURE MAIN()


Hi Mol
Thanks for this program to convert excel file to DBF file.
Can you provide the sample of Excel and DBF files referred to in the program.
Thanks
rpc]]>
no_email@example.com (RPC) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70978#p70978 Wed, 17 Apr 2024 13:03:23 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70978#p70978
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by AUGE_OHR]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70979#p70979 i use ADO to work with EXCEL Files
ADO can be used also for many other DBMS include SQL]]>
no_email@example.com (AUGE_OHR) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70979#p70979 Wed, 17 Apr 2024 15:55:54 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70979#p70979
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by RPC]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70984#p70984 I have never used ADO and would like to stick with DBF
rpc]]>
no_email@example.com (RPC) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70984#p70984 Fri, 19 Apr 2024 01:36:54 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70984#p70984
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by AUGE_OHR]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70985#p70985 i´m at Hospital so i will answer later]]> no_email@example.com (AUGE_OHR) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70985#p70985 Fri, 19 Apr 2024 14:25:55 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70985#p70985 <![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by RPC]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70986#p70986
AUGE_OHR wrote: Fri Apr 19, 2024 7:25 pm hi
i´m at Hospital so i will answer later
Hope nothing serious.
Get well soon.
Thanks]]>
no_email@example.com (RPC) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70986#p70986 Sat, 20 Apr 2024 00:56:03 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70986#p70986
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70987#p70987 no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70987#p70987 Sat, 20 Apr 2024 04:22:58 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=70987#p70987 <![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by AUGE_OHR]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71002#p71002
RPC wrote: Sat Apr 20, 2024 5:56 am Hope nothing serious.
Get well soon.
hi,
I had a stroke, so it was heavy

back again at work

you can download ADO here
Microsoft Access Database Engine 2016 Redistributable
https://www.microsoft.com/en-us/downloa ... x?id=54920

you can read full story in HMG Forum here https://www.hmgforum.com/viewtopic.php?f=5&t=6285
there is a ADORDD for xHarbour here https://github.com/AHFERREIRA/adordd]]>
no_email@example.com (AUGE_OHR) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71002#p71002 Thu, 25 Apr 2024 01:31:14 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71002#p71002
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71003#p71003
Stroke is heavy so be careful!

Serge]]>
no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71003#p71003 Thu, 25 Apr 2024 02:10:08 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71003#p71003
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71004#p71004
AUGE_OHR wrote: Thu Apr 25, 2024 6:31 am hi,
I had a stroke, so it was heavy
Hi Jimmy,

I wish you a speedy recovery as soon as possible. :roll:

Thank you for your help on both the HMG and Fivewin forums :!:]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71004#p71004 Thu, 25 Apr 2024 02:35:23 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71004#p71004
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by mol]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71005#p71005 no_email@example.com (mol) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71005#p71005 Thu, 25 Apr 2024 04:37:13 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71005#p71005 <![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by AUGE_OHR]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71006#p71006 Thank you everyone for the well wishes.

What bothers me most is that I forgot things like passwords]]>
no_email@example.com (AUGE_OHR) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71006#p71006 Thu, 25 Apr 2024 04:50:57 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71006#p71006
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by edk]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71008#p71008 no_email@example.com (edk) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71008#p71008 Thu, 25 Apr 2024 08:52:41 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71008#p71008 <![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by EduardoLuis]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71009#p71009 You will be fine soon.-
With regards]]>
no_email@example.com (EduardoLuis) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71009#p71009 Thu, 25 Apr 2024 18:32:51 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71009#p71009
<![CDATA[HMG General Help :: Re: IMPORT EXCEL FILE TO DBF :: Reply by RPC]]> http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71010#p71010
AUGE_OHR wrote: Thu Apr 25, 2024 6:31 am
RPC wrote: Sat Apr 20, 2024 5:56 am Hope nothing serious.
Get well soon.
hi,
I had a stroke, so it was heavy
Thanks Jimmy for the links.
Right now I am busy with some other work
I will try to learn it as soon as possible.

Your perseverance and dedication to this forum is really commendable.
People like you, edk, Grigory, Serge and others are real assets to this group.
Someone else would have easily taken days to answer, but you are on the forum
immediately after such a big medical emergency.
I pray that you fully recover your memory and remember passwords which you seem to have forgotten.
I think memory loss is temporary.
Best wishes for your health and hope you have full and speedy recovery.
Thanks once again.
rpc]]>
no_email@example.com (RPC) http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71010#p71010 Fri, 26 Apr 2024 01:34:03 -0500 http://hmgforum.com/viewtopic.php?f=5&t=1155&p=71010#p71010
<![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70948#p70948
gfilatov wrote: Tue Nov 28, 2023 5:28 pm Hi,

I tested a pre-release version of MinGW GNU C 14.0 (64-bit) to build the Harbour compiler. :arrow:
Hi Friends,

Today I've tested the upcoming MinGW 14.0 (64-bit) with a snapshot of GCC 14.0.1 from 2024-03-24 (packaged on 2024-03-30) :arrow:
Harbour Build Info
---------------------------
Version: Harbour 3.2.0dev (r2403071241)
Compiler: MinGW GNU C 14.0.1 (64-bit)
Platform: Windows 10 10.0
PCode version: 0.3
ChangeLog last entry: 2024-03-07 13:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
ChangeLog ID: e1736f5706949f000201813e77bb407d3a2d3b38
Built on: Mar 31 2024 15:40:48
Extra Harbour compiler options: -gc0
Extra C compiler options: -DHB_GUI -DHB_NO_TRACE -DHB_MEMO_SAFELOCK
Build options: (Clipper 5.3b) (Clipper 5.x undoc)
The MiniGUI build works fine with the above snapshot of GCC 8-)]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70948#p70948 Sun, 31 Mar 2024 12:32:00 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70948#p70948
<![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70949#p70949 no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70949#p70949 Sun, 31 Mar 2024 15:02:15 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70949#p70949 <![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by mol]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70950#p70950 no_email@example.com (mol) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70950#p70950 Mon, 01 Apr 2024 07:21:55 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70950#p70950 <![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70951#p70951
mol wrote: Mon Apr 01, 2024 12:21 pm Are you planning to include this MinGW to HMG?
Hi Marek,

Thanks for your request :!:

I believe this is possible once the stable build of MinGW 14.1 is published. 8-)

I'll wait for suggestions from Rathi, as before when preparing HMG 3.6 (64-bit). :arrow:]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70951#p70951 Mon, 01 Apr 2024 09:51:36 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70951#p70951
<![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by Red2]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70952#p70952 no_email@example.com (Red2) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70952#p70952 Mon, 01 Apr 2024 09:16:42 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70952#p70952 <![CDATA[Harbour, MingW updates & releases :: Re: GCC 14 Shifts From Feature Development To "General Bugfixing" Mode :: Reply by mol]]> http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70953#p70953 no_email@example.com (mol) http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70953#p70953 Tue, 02 Apr 2024 11:19:40 -0500 http://hmgforum.com/viewtopic.php?f=7&t=7486&p=70953#p70953 <![CDATA[General :: Re: ACCEDER AL NAVEGADOR :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=6725&p=70945#p70945
Con Ud estoy aprendiendo mucho, le estoy muy agradecido ...

Casualmente andaba buscando cómo abrir una página web desde un comando HMG y como siempre su aporte es magnífico.

Estoy haciendo otro jueguito de entretenimiento familiar y ahí puse su código sencillo pero eficaz !

Déjeme hacer unos últimos ajustes de apariencia y lo compartiré con todos Ustedes.

Saludos.
Louis

P.D.- De todos Uds. Amigos Programadores, he aprendido y sigo aprendiendo mucho, cuidado se me ponen celosos :lol:]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=6725&p=70945#p70945 Thu, 28 Mar 2024 20:22:13 -0500 http://hmgforum.com/viewtopic.php?f=24&t=6725&p=70945#p70945
<![CDATA[General :: Crear un archivo CVS :: Author jorge.posadas]]> http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70959#p70959
¿Cómo puedo crear un archivo CVS desde mi aplicación? no tengo la menor idea de CÓMO hacerlo]]>
no_email@example.com (jorge.posadas) http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70959#p70959 Wed, 03 Apr 2024 21:00:33 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70959#p70959
<![CDATA[General :: Re: Crear un archivo CVS :: Reply by martingz]]> http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70960#p70960
nomfile:='Reporte de pagos ' + armes[month(main.datepicker_1.value)] + ' ' + str(year(main.datepicker_1.value)) + '.csv'
delete file &nomfile
set printer to &nomfile
set device to print
set printer on
setprc(0,0)
@ prow(),0 say 'Fecha,Concepto,Loc.,Nombre,Recargos,Rezago,Mensual,Iva,Total'
for y = 1 to main.grid_1.ItemCount
aValues:=main.grid_1.Item(y)
@ prow() + 1,0 say dtoc(aValues[1]) + ',' + alltrim(aValues[2]) + ',' + alltrim(aValues[3]) + ',' + strtran(alltrim(aValues[4]),',','') + ;
+ ',' + transform(aValues[5],'999999999.99') + ',' + transform(aValues[6],'999999999.99') + ',' + ;
transform(aValues[7],'999999999.99') + ',' + transform(aValues[8],'999999999.99') + ',' + transform(aValues[9],'999999999.99')
next
set device to screen
set printer off
set printer to

espero te sirva

saludos]]>
no_email@example.com (martingz) http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70960#p70960 Wed, 03 Apr 2024 21:35:28 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7533&p=70960#p70960
<![CDATA[General :: Re: Error al bajar HMG 3.5 :: Reply by jorge.posadas]]> http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70958#p70958
Desafortunadamente tuve la necesidad de formatear mi equipo y ahi perdi todo (claro excepto mis PRG)]]>
no_email@example.com (jorge.posadas) http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70958#p70958 Wed, 03 Apr 2024 20:58:57 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70958#p70958
<![CDATA[General :: Re: Error al bajar HMG 3.5 :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70966#p70966
jorge.posadas wrote: Thu Apr 04, 2024 1:58 am Gracias Max

Desafortunadamente tuve la necesidad de formatear mi equipo y ahi perdi todo (claro excepto mis PRG)
Hi Jorge,

I've already uploaded a setup of HMG 3.5 to the following link :arrow:

https://we.tl/t-LukpkUMce6

This link expires on April 12, 2024. :roll:

Good luck :!:]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70966#p70966 Fri, 05 Apr 2024 10:10:25 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7531&p=70966#p70966
<![CDATA[General :: Re: Enviar correo con cuenta SSL/TLS :: Reply by edufloriv]]> http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70943#p70943
Comentarles que tire la toalla con hb_SendMail(), hice 50 pruebas con todas las indicaciones dadas en las diversas publicaciones de danielmaximiliano (por cierto gracias por tu respuesta) y nada.

El tiempo de entrega me gana así que no me quedo de otra que crearme una aplicación de consola en C#, la nombre SendMail.exe y acomodé mi .prg así:

Code: Select all

*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------

PROC MailCPE(cCorreo,nOperId,cDocumento)

LOCAL cSubject   := SIS_COMER + " - COMPROBANTE DE PAGO "+cDocumento
LOCAL aEnlaces   := {}
LOCAL cRespuesta := "ERROR: No se pudo enviar el correo a "+cCorreo
LOCAL cParametros:= ""
LOCAL nTrys      := 0
LOCAL cBody      := ""
LOCAL hJson      := { => }

   NubeFact_CPECons( "V" , nOperId , "generada" ) //<- consulto al PSE el estado del comprobante
   aEnlaces := GetEnlaces( cDocumento ) //<- extraigo los enlaces que proporciona el PSE para los documentos generados

   IF LEN(aEnlaces) > 0

      DELETE FILE ("sendmail.txt")

      hJson["SmtpServer"]  := "mail.corporacionemanuelfarma.com"
      hJson["SmtpPort"]    := 587 //con el puerto 465 no funciona
      hJson["EmailFrom"]   := "facturacion@corporacionemanuelfarma.com"
      hJson["EmailTo"]     := ALLTRIM(cCorreo)
      hJson["Subject"]     := cSubject
      hJson["Username"]    := "facturacion@corporacionemanuelfarma.com"
      hJson["Password"]    := "xxxxxxxxxx"
      hJson["Attachments"] := {}
      strfile( hb_jsonEncode( hJson , .t. ) , "sendmail.json" )

      cBody := ;
      "<html><body>"+;
      "<h1>Se emiti&oacute; el comprobante de pago electr&oacute;nico "+cDocumento+"</h1>"+;
      "<br />"+;
      "Puede descargarlo de los siguientes enlaces:<br />"+;
      "<br />"+;
      aEnlaces[1]+"<br /><br />"+;
      aEnlaces[2]+"<br />"+;
      REPL("<br />",8)+;
      SIS_COMER+"<br />"+;
      SIS_RUC+"<br />"+;
      "</body></html>"
      strfile( cBody , "sendbody.txt"  )

      IF FILE("sendmail.json") .AND. FILE("sendbody.txt")

         cParametros:= " sendmail.json sendbody.txt"

         ShellExecute( 0 , "open" , "SendMail.exe" , cParametros )
         DO WHILE .NOT. FILE("sendmail.txt")
            nTrys++
            IF nTrys > 5000000
               EXIT
            ENDIF
         ENDDO
         IF FILE("sendmail.txt")
            cRespuesta := hb_memoread("sendmail.txt")
         ENDIF

      ENDIF

      DELETE FILE ("sendmail.json")
      DELETE FILE ("sendbody.txt")

   ELSE

      cRespuesta := "Este documento no ha sido aceptado por Nubefact."

   ENDIF

RETURN(cRespuesta)


* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------

FUNC GetEnlaces( cDocNum )

LOCAL aLinks    := {}
LOCAL aData     := {}
LOCAL cResp     := ""
LOCAL cRespFile := SYS_PSECNS + cDocNum + '_R' + '.json'

   IF FILE( cRespFile )
      cResp := hb_memoread( cRespFile )
      IF "enlace" $ cResp
         hb_jsondecode( cResp , @aData )
         aLinks := { aData["enlace"] , aData["enlace_del_pdf"] }
      ENDIF
   ENDIF

RETURN( aLinks )
SendMail.exe recibe dos parametros:
1. el nombre del archivo .json que contiene todos los campos con la configuración para el correo.
2. el nombre del archivo .txt que contiene el cuerpo del correo en formato html.

Cuando ha terminado, SendMail.exe me genera un archivo sendmail.txt con el resultado del envío. (Si se envío o no el correo).

Sin embargo debo acotar lo siguiente, incluso cuando uso con esta aplicación el puerto 465 NO ENVÍA. Es rarísimo. Solo me funciona cuando uso el puerto 587, que es el puerto que mi proveedor de hosting me indica es SIN SEGURIDAD.
correo_sendmail.png
Al parecer se trata de como esta configurado el correo en el servidor del hosting, ya he revisado el cpanel y no he encontrado nada al respecto como para poder cambiarlo.

Debo mencionar también que hb_SendMail() me funciona sin ningún problema con otro host que tengo y que usa el puerto 25, sin embargo con este host, así use el puerto 587 no funciona. Así que de momento me quedaré con esta solución ya que me permite enviar los mensajes en formato html, cosa que no puedo hacer con hb_SendMail().

Espero les sirva a los que han tenido el mismo problema. Saludos y gracias.

Attachments


correo_sendmail.png (113.49 KiB)

]]>
no_email@example.com (edufloriv) http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70943#p70943 Thu, 28 Mar 2024 13:05:53 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70943#p70943
<![CDATA[General :: Re: Enviar correo con cuenta SSL/TLS :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70946#p70946
I used Harbours hb_SendMail() but always troubles. Now I send emails via Thunderbird bat (one at the time):
After clicking you have option to send or ignore email. And it is saved in 'send items'. Thunderbird will do all the work!

Code: Select all

cTO = 'emailaddress@emailaddress.xxx'

@ 350,10 BUTTON Bt_SEND2;
	Caption 'Thunderbird';
	PICTURE 'MAIL' ;
	FONT 'Arial' SIZE 9		;
	HEIGHT 86 ;	 
	WIDTH  72 ;
	ACTION Thunderbird('BO', '', cLOCAL_FILE, '', '', cTO ) 




FUNCTION Thunderbird(cSOORT, cFAK_NR, cPDF_File, cFA_DATUM, cFA_TEBETDT, cTO)
/*****************************************************************************/
LOCAL cBAT, aFILES, cFILEX, A, cTABLE 
LOCAL cHTML, cTXT  

PUBLIC cZAKENKANTOOR  := 'zakenb@host.be'

aFILES := {}
AADD(aFILES , 'c:\Progra~1\Mozill~1\thunderbird.exe' )
AADD(aFILES , 'c:\Progra~1\Mozill~2\thunderbird.exe' )
AADD(aFILES , 'c:\Progra~2\Mozill~1\thunderbird.exe' )
AADD(aFILES , 'c:\Progra~2\Mozill~2\thunderbird.exe' )
cFILEX := ''
FOR A := 1 TO LEN(aFILES)
   IF FILE(aFILES [A])
      cFILEX := aFILES [A]
      cFILEX := STRTRAN(cFILEX, '.exe' , '')   
      EXIT
   ENDIF
NEXT

 
cHTML   := 'c:\zakenb\bo.html'
SET PRINTER TO &cHTML
SET PRINTER ON 
SET CONSOLE OFF
 
?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'
?'<html>'
?'<head>'
?'<title>Some title</title>'
?'<meta name="Generator" content="zakenb">'
?'<meta name="Author" content="">'
?'<meta name="Keywords" content="">'
?'<meta name="Description" content="">'
?'</head>'
?'<body>'
?'Some messages<br>'
?'<br>'
?'Reagrds,<br><br>'
?'zakenb B.V.<br>'
?'Street 11 <br>'
?'1234 City<br><br>'
?'www.mysite.com     <br>'
?'Tel: 012- 34 56 78           <br>'
?'Fax: 012- 34 56 79           <br>'
?'<br><br>'
?'<b>zakenb@host.be</b><br>'
?'</body>'
?'</html>'
SET PRINTER OFF
SET PRINTER TO
SET CONSOLE ON



cBAT    := 'c:\zakenb\bo.bat'


cTXT     := cFILEX + " -compose " + '"' + "to='" + cTO + "',subject='Subject title ',format='html',body='bla',message='" + cHTML + "',attachment='" + cPDF_File + "'" + '"'
//        between item use a COMMA before and after and NO SPACES!
 

SET PRINTER TO &cBAT
SET PRINTER ON 
SET CONSOLE OFF
? cTXT
SET PRINTER OFF
SET PRINTER TO
SET CONSOLE ON
EXECUTE FILE cBAT 
RETURN
Hope this can help!]]>
no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70946#p70946 Fri, 29 Mar 2024 03:06:54 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70946#p70946
<![CDATA[General :: Re: Enviar correo con cuenta SSL/TLS :: Reply by edk]]> http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70947#p70947 https://www.hmgforum.com/viewtopic.php? ... e67#p66777]]> no_email@example.com (edk) http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70947#p70947 Sat, 30 Mar 2024 07:52:17 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70947#p70947 <![CDATA[General :: Re: Enviar correo con cuenta SSL/TLS :: Reply by danielmaximiliano]]> http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70969#p70969 estos dias busque en mis viejos SSD backups el .bat para compilar de nuevo la libreria hbssl y como no lo encontre volvi a hacer de nuevo ese batch.

Code: Select all

@echo off
SET backup=%path%
set HB_WITH_OPENSSL=C:\OpenSSL-Win64\include
SET HMGPATH=c:\hmg.3.5
SET PATH=%HMGPATH%\harbour\bin;%HMGPATH%\mingw\bin;%PATH%

hbmk2 hbssl.hbp -i%hmgpath%\include
set path=%backup%
set backup=
pause
primero antes de todo descargar OpenSsl 64 bits (version completa desde) https://slproweb.com/download/Win64OpenSSL-3_2_1.exe
instalar en
"C:\OpenSSL-Win64"
y los binarios tambien en dicha carpeta.

Nota: los archivos SSLeay32.dll y Libeay32.dll no vienen incluidos en la distribución asi que hay que copiarlos manualmente a
C:\OpenSSL-Win64
y se encuentrar aqui -->
OpenSSL-Win64.rar
la libreria contrib Hbssl se encuentra aqui si no la quieren descargar
hbssl.rar
ya que se necesita descargar el Harbour Core desde https://github.com/harbour/core/archive ... master.zip
una vez ejecutado el batch (Build64.bat) se crean las librerias para usar con hbtip (hbsendmail). estas libs.a se deben copiar a
C:\HMG.3.5\LIB-64

Si se genera error al intentar compilar con dichas librerias hay que modificar
"C:\HMG.3.5\hmg64.hbc"
y agregarlas manualmente a partir de la linea 52

cualquier cosa estoy a sus ordenes

Attachments

OpenSSL-Win64.rar (682.67 KiB)
hbssl.rar (71 KiB)
]]>
no_email@example.com (danielmaximiliano) http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70969#p70969 Tue, 09 Apr 2024 22:17:58 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70969#p70969
<![CDATA[General :: Re: Enviar correo con cuenta SSL/TLS :: Reply by franco]]> http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70970#p70970 liked doing, but it worked. Now Google has 2 step verification and it works well. You have 2 pass words, one for the account and one that google
sends you when setting up an App Password within the Gmail account. The app is registered with Google and it works.
When setting up the app you add in new app entry field c:\myfolder\myprogram.exe and they send a odd looking password that you use in the
program. Example: YWEGHYUHERGAG. I just copy and paste it into my sending password field.]]>
no_email@example.com (franco) http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70970#p70970 Wed, 10 Apr 2024 10:44:31 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7530&p=70970#p70970
<![CDATA[General :: VOCAL CON TILDE :: Author LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70977#p70977
Por aquí con un problemilla que no sé cómo resolver :oops:

En el campo de una DBF tengo escrito palabras, de las cuales extraigo vocales y consonantes las veces que existan o se repitan
por ejemplo si tengo la frase UNA NOCHE CON BAILE y pulso para extraer la N ... tendría N N N (3 veces N)
y si pulso para extraer la O ... tendría O O (2 veces O)
y si pulso para extraer la A ... tendría A A (2 veces A)

El problema es cuando la vocal lleva tilde, como por ejemplo ESA MÁSCARA ES OK ... si pulso para extraer la letra A sólo me sale A A A (3 veces A)
es decir no me toma en cuenta la Á con tilde, ya que con esta deberían salir ---> A Á A A (4 veces A) que es lo correcto y que necesito.

Hay alguna forma de hacerlo ?
De antemano muchas gracias a quien responda.

Adjunto el código...

Code: Select all

#include "HMG.CH"

FUNCTION MAIN()
DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN
   FRASE='ESA MÁSCARA ES OK'
   LETRA='A'
   LARGO=LEN(FRASE)
   X=1
   Y=1
   DO WHILE LARGO>0
      PISO=SUBSTR(FRASE,X,1)		&& CADA LETRA
      POSI2='C'+ALLTRIM(STR(X))		&& LABEL
      IF PISO=LETRA
         IF X<25
            @ 86,X*50 LABEL &POSI2 VALUE PISO WIDTH 50 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD
          ELSE
            IF X=25
               @ 186,50 LABEL &POSI2 VALUE PISO WIDTH 50 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD
               Y=Y+1
             ELSE
               @ 186,Y*50 LABEL &POSI2 VALUE PISO WIDTH 50 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD
               Y=Y+1
            ENDIF
         ENDIF
       ELSE
         IF X>=25
            Y=Y+1
         ENDIF
      ENDIF
      X=X+1
      LARGO=LARGO-1
   ENDDO   
   ON KEY ESCAPE ACTION UNO.RELEASE
END WINDOW
UNO.MAXIMIZE
UNO.ACTIVATE
RETURN
]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70977#p70977 Tue, 16 Apr 2024 11:41:10 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70977#p70977
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by franco]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70989#p70989 You may have to set filter to A .or. Á. And the same for every other letter that has a tilde.
A = chr(65)
Á = chr165) I think.
You could try when needing all letter types set your filter to chr(65) .or. > chr(159) .and. < chr(170).
Check out character map in windows 10 or google character map.]]>
no_email@example.com (franco) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70989#p70989 Sun, 21 Apr 2024 11:07:36 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70989#p70989
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70990#p70990
Thanks for your answer.

Sorry for my bad english :oops: ... Using chr(), i see what number 195 is same for 5 vocals con tilde :shock:

Attach new code for this case and one picture, where i see what vowels with accents look ugly in screen :!:

Code: Select all

#include "HMG.CH"

FUNCTION MAIN()
DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN

//1
   LETRA='Á'
   IF LETRA=CHR(195)		// NUMBER IS SAME, WHY ?
      @ 80*1,250 LABEL A VALUE 'ESTO ES LETRA -A- CON TILDE ---> '+LETRA WIDTH 999 HEIGHT 50 FONT "TAHOMA" SIZE 24 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF

//2
   LETRA='É'
   IF LETRA=CHR(195)		// NUMBER IS SAME, WHY ?
      @ 80*2,250 LABEL E VALUE 'ESTO ES LETRA -E- CON TILDE ---> '+LETRA WIDTH 999 HEIGHT 50 FONT "TAHOMA" SIZE 24 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF

//3
   LETRA='Í'
   IF LETRA=CHR(195)		// NUMBER IS SAME, WHY ?
      @ 80*3,250 LABEL I VALUE 'ESTO ES LETRA -I- CON TILDE ---> '+LETRA WIDTH 999 HEIGHT 50 FONT "TAHOMA" SIZE 24 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF

//4
   LETRA='Ó'
   IF LETRA=CHR(195)		// NUMBER IS SAME, WHY ?
      @ 80*4,250 LABEL O VALUE 'ESTO ES LETRA -O- CON TILDE ---> '+LETRA WIDTH 999 HEIGHT 50 FONT "TAHOMA" SIZE 24 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF

//5
   LETRA='Ú'
   IF LETRA=CHR(195)		// NUMBER IS SAME, WHY ?
      @ 80*5,250 LABEL U VALUE 'ESTO ES LETRA -U- CON TILDE ---> '+LETRA WIDTH 999 HEIGHT 50 FONT "TAHOMA" SIZE 24 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF

   ON KEY ESCAPE ACTION UNO.RELEASE
END WINDOW

UNO.MAXIMIZE
UNO.ACTIVATE
RETURN

Attachments


VOCALES CON TILDE.jpg (76.34 KiB)

]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70990#p70990 Mon, 22 Apr 2024 07:11:38 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70990#p70990
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by mustafa]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70991#p70991 El fichero.prg tienes que salvarlo en UTF-8 no en ANSI
y coloca esto:

Code: Select all


#include "HMG.CH"
FUNCTION MAIN()
SET CODEPAGE TO UNICODE   //<----
SET LANGUAGE TO SPANISH   //<---

DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN

Saludos
Mustafa :D

Attachments


Imagen2.jpg (56.19 KiB)

]]>
no_email@example.com (mustafa) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70991#p70991 Mon, 22 Apr 2024 08:52:42 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70991#p70991
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by franco]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70992#p70992 In English we do not use Á as a letter.
My way you are looking for all the A`s in ascii system. chr(65), chr(160), chr(161, 162, 163, 164, 165, 166, 167, 168, 169.
To confusing, Not just tilde.]]>
no_email@example.com (franco) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70992#p70992 Mon, 22 Apr 2024 10:50:13 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70992#p70992
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70993#p70993
Gracias por responder ...
Efectivamente sí me salió idéntico a su corrección, las 5 vocales tildadas !

Ahora pude mostrar la vocal A con o sin tilde, todas a la vez ...
Veré como lo adapto al programa principal y si no me da problema lo volveré a subir modificado.

Gracias nuevamente Sr. Mustafa

Saludos
Louis.

Code: Select all

#include "HMG.CH"

FUNCTION MAIN()
SET CODEPAGE TO UNICODE
SET LANGUAGE TO SPANISH

DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN

   FRASE='ESA MÁSCARA ES OK'
   LETRA='A'			// VOCAL SIN TILDE A BUSCAR EN LA FRASE Y MOSTRARLA

LETRA2='Ñ'		// comodín

   LARGO=LEN(FRASE)
   X=1
   Y=1
   DO WHILE LARGO>0
      LETT=SUBSTR(FRASE,X,1)		// CADA LETRA
      LABE='L'+ALLTRIM(STR(X))		// LABEL

      IF LETT=LETRA
         @ 99,X*50 LABEL &LABE VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
      ENDIF

      IF LETT=CHR(65)		// vocal sin tilde
         LETRA2='Á'		// forsa a buscar con tilde también
      ENDIF
      IF LETT=CHR(195) .AND. LETRA='A'
         @ 99,X*50 LABEL &LABE VALUE LETRA2 WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
      ENDIF

      X=X+1
      LARGO=LARGO-1
   ENDDO   
   ON KEY ESCAPE ACTION UNO.RELEASE
END WINDOW
UNO.MAXIMIZE
UNO.ACTIVATE
RETURN

Attachments


VOCAL CON Y SIN TILDE.jpg (9.54 KiB)

]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70993#p70993 Mon, 22 Apr 2024 13:25:08 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70993#p70993
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70994#p70994
Saben, parece que hay un error en el código, ya que ahora sí sale la vocal A con y sin tilde, pero la ubicación en la frase, al mostrar en pantalla, noto que después de la Á se crea un espacio de más ...créanme que le he dado vuelta y vuelta al código y no logro encontrar el error :oops:

Por eso recurro una vez más a uds, si alguien quisiera ayudarme, muchas gracias.

Louis

Code: Select all

#include "HMG.CH"

FUNCTION MAIN()
SET CODEPAGE TO UNICODE
SET LANGUAGE TO SPANISH

DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN
   FRASE='ESA MÁSCARA CAUSA CÁNCER'
   LETRA='A'			// LETRA A BUSCAR EN LA FRASE Y MOSTRARLA

   LARGO=LEN(FRASE)
   X=1
   Y=1
   P=0
DO WHILE LARGO>0
   LETT=SUBSTR(FRASE,X,1)		// CADA LETRA
   LABE1='L'+ALLTRIM(STR(X))		// LABEL1
   LABE2='M'+ALLTRIM(STR(X))		// LABEL2
   IF P=0
      IF LETT=LETRA
         @ 99,X*50 LABEL &LABE1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
       ELSE				// PINTA LAS DEMÁS LETRAS
         @ 99,X*50 LABEL &LABE1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
      ENDIF
    ELSE				// POSICIÓN DESPUÉS DE LA LETRA CON TILDE
      IF LETT=LETRA
         @ 99,X*50 LABEL &LABE1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
       ELSE
         @ 99,X*50 LABEL &LABE1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
      ENDIF
      P=0
   ENDIF

   IF LETT=CHR(195) .AND. LETRA='A'
      P=1
      LETRA2='Á'
      @ 99,X*50 LABEL &LABE2 VALUE LETRA2 WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
   ENDIF
   X=X+1
   LARGO=LARGO-1
ENDDO   
ON KEY ESCAPE ACTION UNO.RELEASE

END WINDOW
UNO.MAXIMIZE
UNO.ACTIVATE
RETURN

Attachments


VOCAL CON Y SIN TILDE.jpg (37.88 KiB)

]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70994#p70994 Tue, 23 Apr 2024 10:36:07 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70994#p70994
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by jorge_riv]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70995#p70995 ---------------------------------
REQUEST HB_LANG_ES
HB_LANGSELECT("ES")

SET LANGUAGE TO SPANISH
SET CODEPAGE TO UNICODE

REQUEST HB_CODEPAGE_ESWIN // <=== Muy importante
HB_SETCODEPAGE("ESWIN") // <=== Muy importante
------------------------
Tambien usar hb_ucode()
*-------------------------
* HB_UCHAR(225) <= á
* HB_UCHAR(233) <= é
* HB_UCHAR(237) <= í
* HB_UCHAR(243) <= ó
* HB_UCHAR(250) <= ú
* HB_UCHAR(209) <= Ñ
* HB_UCHAR(241) <= ñ
* HB_UCHAR(193) <= é
* HB_UCHAR(201) <= É
* HB_UCHAR(204) <= Í
* HB_UCHAR(211) <= Ó
* HB_UCHAR(08364) <= €

Tomo el valor Unicode de: https://unicode-table.com/es/
Esto podría ser util? http://www.ssec.wisc.edu/~tomw/java/unicode.html#x2500

Y aquí varias tablas Unicodes:
http://www.ssec.wisc.edu/~tomw/java/unicode.html

Espero te sirva.]]>
no_email@example.com (jorge_riv) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70995#p70995 Tue, 23 Apr 2024 13:34:04 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70995#p70995
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70998#p70998
Gracias Jorge_Riv por contestar, pero creo que ya estàn esos pasos, porque ya aparece en screen las letras con tilde.

Les ruego me disculpen, pero no puedo encontrar el error en el código :oops:
Hice los pasos que me recomendó el Sr Mustafa para que muestre las letras con tilde y compilé con IDE no Ansi y todo OK, el problema es un espacio que se crea y no sé de dónde, después de mostrar precisamente la vocal con tilde.

Así está el último código:

Code: Select all

#include "HMG.CH"

FUNCTION MAIN()
SET CODEPAGE TO UNICODE
SET LANGUAGE TO SPANISH

DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN
   FRASE="ESA MÁSCARA CAUSA CÁNCER"
   LETRA='A'			// LETRA A BUSCAR EN LA FRASE Y MOSTRARLA

   LARGO=LEN(ALLTRIM(FRASE))
   X=1
   Y=1
DO WHILE LARGO>0
   LETT=SUBSTR(FRASE,X,1)		// CADA LETRA
   L1='L'+ALLTRIM(STR(X))		// LABEL PARA MOSTRAR TODAS LAS LETRAS MENOS LA Á (INCLUYE ESPACIOS)
   L2='M'+ALLTRIM(STR(X))		// LABEL PARA LLEVAR NUMERACIÓN DE X
 
   L3='N'+ALLTRIM(STR(Y))		// LABEL PARA A CON TILDE
   L4='O'+ALLTRIM(STR(Y))		// LABEL PARA LLEVAR NUMERACIÓN A LA PAR CON X

   NUMERO = ASC(LETT)			// PARA SABER EL # CHR

   IF LETT=CHR(195) .AND. LETRA='A'		// PINTA LAS Á
      LETRA2='Á'
      @ 099,Y*50 LABEL &L3 VALUE ALLTRIM(LETRA2) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR GREEN BACKCOLOR {0,125,250}
      @ 200,Y*50 LABEL &L4 VALUE STR(X,2,0) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 20 BOLD FONTCOLOR GREEN BACKCOLOR {0,125,250}
    ELSE
      IF LETT='A' .AND. NUMERO<>195		// PINTA LAS A
         @ 099,X*50 LABEL &L1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR YELLOW BACKCOLOR {0,125,250}
         @ 200,X*50 LABEL &L2 VALUE STR(X,2,0) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 20 BOLD FONTCOLOR YELLOW BACKCOLOR {0,125,250}
       ELSE
         IF NUMERO=32		// ESPACIO EN BLANCO
            @ 099,X*50 LABEL &L1 VALUE '_' WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR BROWN BACKCOLOR {0,125,250}
            @ 200,X*50 LABEL &L2 VALUE STR(X,2,0) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 20 BOLD FONTCOLOR BROWN BACKCOLOR {0,125,250}
          ELSE			// LAS DEMÁS LETRAS
            @ 099,X*50 LABEL &L1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
            @ 200,X*50 LABEL &L2 VALUE STR(X,2,0) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 20 BOLD FONTCOLOR WHITE BACKCOLOR {0,125,250}
         ENDIF
      ENDIF
   ENDIF
   X=X+1
   Y=Y+1
   LARGO=LARGO-1
ENDDO   
ON KEY ESCAPE ACTION UNO.RELEASE
END WINDOW
UNO.MAXIMIZE
UNO.ACTIVATE
RETURN
Saludos
Louis

P.D.- Adjunto imagen donde se muestra toda la frase y con su número de ubicación.

Attachments


VOCAL CON Y SIN TILDE.jpg (148.85 KiB)

]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70998#p70998 Wed, 24 Apr 2024 10:43:08 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70998#p70998
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by franco]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70999#p70999 no_email@example.com (franco) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70999#p70999 Wed, 24 Apr 2024 12:25:11 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=70999#p70999 <![CDATA[General :: Re: VOCAL CON TILDE :: Reply by edk]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71007#p71007

Code: Select all

#include "HMG.CH"


FUNCTION MAIN()

SET CODEPAGE TO UNICODE
SET LANGUAGE TO SPANISH

DEFINE WINDOW UNO AT 0,0 WIDTH 0 HEIGHT 0 BACKCOLOR {0,125,250} NOCAPTION MAIN
   FRASE := "ESA MÁSCARA CAUSA CÁNCER"
   LETRA := { 'A', 'Á' } 			// LETRA A BUSCAR EN LA FRASE Y MOSTRARLA

   LARGO := hb_ULen(ALLTRIM(FRASE))
   X := 1
   Y := 1

DO WHILE LARGO > 0
   LETT := hb_USubStr(FRASE,X,1)		// CADA LETRA
   L1 := 'L'+ALLTRIM(STR(X))		// LABEL PARA MOSTRAR TODAS LAS LETRAS MENOS LA Á (INCLUYE ESPACIOS)
   L2 := 'M'+ALLTRIM(STR(X))		// LABEL PARA LLEVAR NUMERACIÓN DE X
 
   DO CASE
	CASE ASCAN ( LETRA, LETT ) = 2			//LETT = "Á"
		aColor := {   0 , 255 ,   0 }		//GREEN

	CASE ASCAN ( LETRA, LETT ) = 1			//LETT = "A"
		aColor := { 255 , 255 ,   0 }		//YELLOW

	CASE LETT = " "
		LETT := "_"
		aColor := { 128 ,  64 ,  64 }		//BROWN
	OTHER
		aColor := { 255 , 255 , 255 }		//WHITE
   ENDCASE

   @ 099,X*50 LABEL &L1 VALUE LETT WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 48 BOLD FONTCOLOR aColor BACKCOLOR {0,125,250}
   @ 200,X*50 LABEL &L2 VALUE STR(X,2,0) WIDTH 99 HEIGHT 70 FONT "TAHOMA" SIZE 20 BOLD FONTCOLOR aColor BACKCOLOR {0,125,250}

   X++
   Y++
   LARGO--

ENDDO   
ON KEY ESCAPE ACTION UNO.RELEASE
END WINDOW
UNO.MAXIMIZE
UNO.ACTIVATE
RETURN
When operating on strings of characters encoded in Unicode, you should use functions dedicated to this encoding:

https://github.com/Petewg/harbour-core/wiki/Strings

hb_UAt( <cSubString>, <cString>, [<nFrom>], [<nTo>] ) ➜ nAt
Unicode counterpart of 'hb_At()'.

hb_UCode( <cText> ) ➜ nCode
return Unicode value of 1-st character (not byte) in given string. Similar to 'hb_UTF8Asc()'.

hb_ULen( <cText> ) ➜ nChars
returns the length of unicode string <cText>, in characters.

hb_ULeft( <cString>, <nCount> ) ➜ cSubstring
same as 'Left()' but applicable to UTF8 encoded text.

hb_UPadC(<exp>, <nLength>, [<cFillChar>]) ➜ cPaddedString
same as 'PadC()' but Unicode oriented.

hb_UPadL(<exp>, <nLength>, [<cFillChar>]) ➜ cPaddedString same as 'PadL()' but Unicode oriented.

hb_UPadR(<exp>, <nLength>, [<cFillChar>]) ➜ cPaddedString
same as 'PadR()' but Unicode oriented.

hb_UPeek( <cText>, <n> ) ➜ nCode
return unicode value of <n>-th character in given string

hb_UPoke( [@]<cText>, <n>, <nVal> ) ➜ cText
change <n>-th character in given string to unicode <nVal> one and return modified text.

hb_URight( <cString>, <nCount> ) ➜ cSubstring

hb_UStuff( <cString>, <nAt>, <nDel>, <cIns> ) ➜ cResult
Unicode counterpart of 'Staff()'.

hb_USubStr( <cString>, <nStart>, <nCount> ) ➜ cSubstring
Unicode counterpart of 'SubStr()'.

hb_utf8Asc( <cExp> ) ➜ nUTF8CharCode
same as 'Asc()' but applicable to UTF8 encoded text. Similar to 'hb_UCode()'.

hb_utf8At(<...>) ➜ nPos
same as hb_At() but applicable to UTF8 encoded text.

hb_utf8Chr( <n> ) ➜ cUTF8Char
same as 'Chr()' but applicable to UTF8 encoded text.

hb_utf8Left(...) ➜ cString
same as 'Left()' but applicable to UTF8 encoded text.

hb_utf8Len(`' ) ➜ nLen same as 'Len()' but applicable to UTF8 encoded text.

hb_utf8Peek( <cText>, <n> ) ➜ nCode
return UTF8 value of <n>-th character in given string.

hb_utf8Poke( [@]<cText>, <n>, <nVal> ) ➜ cText
replace <n>-th character in given string to UTF8 <nVal> one and return modified text.

hb_utf8RAt() ➜ nPos
same as 'hb_RAt()' but applicable to UTF8 encoded text.

hb_utf8Right() ➜ nPos
same as 'Right()' but applicable to UTF8 encoded text.

hb_utf8StrTran() ➜ cString
same as 'StrTran()' but applicable to UTF8 encoded text.

hb_utf8Stuff() ➜ cString
same as 'Stuff()' but applicable to UTF8 encoded text.

hb_utf8SubStr() ➜ cString
same as 'SubStr()' but applicable to UTF8 encoded text.

hb_utf8ToStr( <cUTF8Str> [, <cCPID>] ) ➜ cStr
it performs "translation" from UTF-8 to <cCPID> Harbour codepage id, f.e.: "EN", "ES", "ESWIN" etc.
<cUTF8Str> supposed to be a UTF-8 encoded string.
When <cCPID> is not given then the default HVM codepage (i.e. that set by hb_cdpSelect()) is used.]]>
no_email@example.com (edk) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71007#p71007 Thu, 25 Apr 2024 08:39:54 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71007#p71007
<![CDATA[General :: Re: VOCAL CON TILDE :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71011#p71011
Believe me, I thank you very much for sharing your knowledge.

You are very kind.

Sincerely.

Louis

Attachments


VOCAL CON Y SIN TILDE.jpg (61.72 KiB)

]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71011#p71011 Fri, 26 Apr 2024 16:07:48 -0500 http://hmgforum.com/viewtopic.php?f=24&t=7538&p=71011#p71011
<![CDATA[My HMG Projects :: HMG Extended Edition version 24.04 is published :: Author gfilatov]]> http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70973#p70973
The MiniGUI team is pleased to announce the release of the latest version of Harbour MiniGUI Extended Edition.

Here's a breakdown of some of the modifications in the build 24.04.
For the full list, please see the changelog.
* Fixed: Program crash at the exit from a Preview window in a graph printing
module at using of xHarbour compiler (introduced in the build 17.06).

* Fixed: Problem with button's focus at a window activation when this button
was defined with the DEFAULT clause (introduced in the build 18.11).

* Modified: MiniGUI core has been updated for correct compiling with the new
Pelles C 12.0 and xHarbour compiler.

* Updated: Header file i_pseudofunc.ch for compatibility with xHarbour.

* Updated: hbmk2 utility is thread-aware during compilation in MT mode.
(see source code in folder \harbour\utils\hbmk2) [PRO VERSION]

* New: 'C source code reformatter GreatCode' utility by Christophe Beaudet
(see in folder \Utils\GreatCode) [PRO VERSION]

* Updated the TSBrowse, hbVpdf, HMG_HPDF and SQLite3 libraries.

* Updated some Basic and Advanced samples.
It is a regularly scheduled maintenance release.

The installation file for the standard build of Borland C++ 5.8.2 is published at:

https://hmgextended.com/files/CONTRIB/h ... -setup.exe

A password-protected 7z archive of the professional build for Borland C++ 5.8.2 is published at:

https://hmgextended.com/files/CONTRIB/hmg-24.04-pro.7z

The PRO version password is available only to donors.

This release is considered stable and ready for production use.

Upgrading to this build is recommended.

I wish everyone to enjoy programming in HMG.

--
Best wishes,
Grigory Filatov
[MiniGUI Team]]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70973#p70973 Mon, 15 Apr 2024 02:02:37 -0500 http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70973#p70973
<![CDATA[My HMG Projects :: Re: HMG Extended Edition version 24.04 is published :: Reply by gfilatov]]> http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70974#p70974
Please notice that there are also the private MiniGUI builds
for the MinGW C-compiler (32-bit and 64-bit):

MinGW GNU C 13.2.0 (packaged on 2024-04-12). ;)

Code: Select all

                Components versions: 
                -------------------- 
   
Harbour MiniGUI Extended Edition 24.04 (Release)  
   
Harbour 3.2.0dev (r2403071241)
   
Harbour Make (hbmk2) 3.2.0dev (r2024-03-07 12:41)
-------------------------------------------------
The above distributions have the updated SQLRDD library and MySQL server support
(using the example of "MySql Client"), and they are available to all donors.

Thanks for your attention. 8-)]]>
no_email@example.com (gfilatov) http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70974#p70974 Mon, 15 Apr 2024 08:20:20 -0500 http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70974#p70974
<![CDATA[My HMG Projects :: Re: HMG Extended Edition version 24.04 is published :: Reply by serge_girard]]> http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70975#p70975 no_email@example.com (serge_girard) http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70975#p70975 Tue, 16 Apr 2024 01:31:06 -0500 http://hmgforum.com/viewtopic.php?f=15&t=7536&p=70975#p70975 <![CDATA[My HMG Projects :: Re: BUSCA LA FRASE OCULTA :: Reply by LOUIS]]> http://hmgforum.com/viewtopic.php?f=15&t=7275&p=70988#p70988
Ya mejoré este jueguito que subí hace tiempo ya ...

Ya pude quitar el color negro con fondo blanco que salía en cada letra que se pulsaba, para ir armando la frase oculta.

Los pasos para jugar son así:

1) se pide a un jugador (el que empieza el juego) que diga un # del 1 al 99
quien maneje el pc o laptop, hará clic en dicho # solicitado.
si le pidieron el # 8 hará clic en el 8 y aparecerá en color blanco y
luego pulsará el botón BUSCAR FRASE
SI LE PIDIERON EL # 65 hará clic primero en el #6 y luego en el #5 y
aparecerá en color blanco, primero el #6 y luego el #5, formando así el
#65 solicitado, luego pulsará el botón BUSCAR FRASE.
Los números sólo pueden ser pedidos una sola vez (dentro de un día), si alguien
pide un número que ya se ha jugado, se escuchará un audio diciendo que dicho
número ya fue solicitado !

2) inmediatamente saldrán unas rayitas verdes, sobre las cuales irán después apareciendo
las letras solicitadas por el jugador.

3) se le pedirá al jugador que diga una letra de la A a la Z (que están en pantalla), y el
que maneje el pc hará clic en dicha letra pedida y si esta existe en la frase,
aparecerá las veces que se repita.
Cuando una letra ya ha sido pedida y la vuelven a pedir, se escuchará un audio
diciendo que dicha letra ya fue solicitada !

4) cuando a algún jugador le toque el turno de pedir una letra, si ya sabe lo que dice la
frase, no debe pedir letra, sino más bien decir la frase ... se pulsará el botón
MOSTRAR FRASE y esta aparecerá, y si la frase que dijo el jugador, es la correcta,
el jugador ganará el premio que previamente se había apostado, caso contrario, el
premio se acumula para el siguiente juego.
El programa permanecerá 9 segundos para que todos lean la frase, se escuchará unos
aplausos y luego se cerrará.
Cuando en una frase hay vocales tildadas, estas vocales saldrán tildadas al ver la
respuesta con el botón MOSTRAR FRASE.

Saludos
Louis

NOTA.- En la DBF hay un campo que se llama PREMIO marcado con un *. Esto sólo está en ciertas
frases a las cuales consideré especiales (si uds. no las consideran así, pueden eliminar
dicho *). Cuando se llama a un # que tiene ese * aparecerá en la esquina superior derecha
un cuadro rojo que dice DOBLE y exigirá a los participantes duplicar la apuesta.
Si desean pueden cambiar las frases de la DBF y en vuestro idioma.
El narrador está por default. Si alguien quiere modificar el programa, lo puede hacer.

P.D.- Es preferible proyectar del pc o laptop, hacia un tv smart de pantalla gigante, para que todos vean mejor.

Attachments


FRASE 2.jpg (278.68 KiB)


FRASE 1.jpg (301.58 KiB)

FRASES.rar (383.95 KiB)
]]>
no_email@example.com (LOUIS) http://hmgforum.com/viewtopic.php?f=15&t=7275&p=70988#p70988 Sat, 20 Apr 2024 13:24:42 -0500 http://hmgforum.com/viewtopic.php?f=15&t=7275&p=70988#p70988
<![CDATA[My HMG Projects :: Ajedrez-Chess :: Author mustafa]]> http://hmgforum.com/viewtopic.php?f=15&t=7540&p=70997#p70997 Jugando un poco con ChatGPT, se me ocurrió que
me montara un cronómetro, para poder jugar al Ajedrez.

¿El Tablero, es más complicado, mediante una rutina
encontrada del amigo Javier Tovar, mediante rutina
ON MOUSEDRAG MueveControl(), el problema está cuando
se tiene que matar a la pieza contrincante, que no
sé cómo se puede eliminar?

Espero que lo prueben, y si encuentran alguna solución

PD: ChatGPT ha intentado crear un código que cuando
una ficha tiene que comer a la otra, esta última
tendría que desaparecer del tablero, pero no lo ha conseguido
revisar Error_ChatGPT.txt

*-------------------------- Google -----------------------------*

Hello friends:
Playing around with ChatGPT, it occurred to me that
I will set up a stopwatch so I can play Chess.

Is the Board more complicated, through a routine
found by friend Javier Tovar, through routine
ON MOUSEDRAG MueveControl(), the problem is when
you have to kill the opposing piece, which does not
do I know how to remove it?

I hope you try it, and if you find a solution

PS: ChatGPT has tried to create a code that when
one Chess piece has to eat the other, the latter
It should disappear from the board, but it has not been able to do so
review Error_ChatGPT.txt

Saludos,Regars,Salam

Mustafa

Attachments


Pantallazo.jpg (124.92 KiB)

Ajedrez-Chess.zip (242.39 KiB)
]]>
no_email@example.com (mustafa) http://hmgforum.com/viewtopic.php?f=15&t=7540&p=70997#p70997 Wed, 24 Apr 2024 10:14:19 -0500 http://hmgforum.com/viewtopic.php?f=15&t=7540&p=70997#p70997