FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Talking to your apps
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Talking to your apps
Posted: Tue Apr 02, 2024 03:36 PM
Enrico Maria Giordano wrote:It should work with both 32 and 64 bit.
got it work under BCC7 32 Bit, nice :D
greeting,

Jimmy
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Talking to your apps
Posted: Tue Apr 02, 2024 05:52 PM

Hello Friends:

It works fine for me.

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 866
Joined: Tue Oct 16, 2007 08:57 AM
Re: Talking to your apps
Posted: Tue Apr 02, 2024 07:29 PM

Hi

It's working.

Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Talking to your apps
Posted: Tue Apr 02, 2024 07:34 PM

According to my tests, the program works fine only with these compilers combinations:

  • Harbour MSC32

  • Harbour BCC64

  • xHarbour BCC32

  • xHarbour BCC64

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Talking to your apps
Posted: Fri Apr 05, 2024 02:51 PM
Solved! Now it works for all compilers combinations:
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

聽 聽local oDlg, oGet, cText := Space( 30 )

聽 聽DEFINE DIALOG oDlg

聽 聽@ 1, 1 GET oGet VAR cText
聽 聽oGet:bGotFocus = { || Listen() }

聽 聽ACTIVATE DIALOG oDlg CENTERED

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( LISTEN )
{
聽 聽 INPUT inputs[4];

聽 聽 ZeroMemory(inputs, sizeof(inputs));

聽 聽 // Pulsaci贸n de tecla Windows
聽 聽 inputs[0].type = INPUT_KEYBOARD;
聽 聽 inputs[0].ki.wVk = VK_LWIN;

聽 聽 // Pulsaci贸n de tecla H
聽 聽 inputs[1].type = INPUT_KEYBOARD;
聽 聽 inputs[1].ki.wVk = 'H';

聽 聽 // Liberaci贸n de tecla H
聽 聽 inputs[2].type = INPUT_KEYBOARD;
聽 聽 inputs[2].ki.wVk = 'H';
聽 聽 inputs[2].ki.dwFlags = KEYEVENTF_KEYUP;

聽 聽 // Liberaci贸n de tecla Windows
聽 聽 inputs[3].type = INPUT_KEYBOARD;
聽 聽 inputs[3].ki.wVk = VK_LWIN;
聽 聽 inputs[3].ki.dwFlags = KEYEVENTF_KEYUP;

聽 聽 // Env铆a las pulsaciones de teclas
聽 聽 SendInput(4, inputs, sizeof(INPUT)); 聽 聽
}

#pragma ENDDUMP
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Talking to your apps
Posted: Fri Apr 05, 2024 03:00 PM
excellent! many thanks Enrico! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion