Search found 153 matches

by KDJ
Tue Jun 20, 2017 8:03 pm
Forum: HMG General Help
Topic: How to call function from .dll library?
Replies: 27
Views: 708

Re: How to call function from .dll library?

Marek

We go back to C function. Try this:

DllFunction.zip
(3.79 KiB) Downloaded 15 times
by KDJ
Tue Jun 20, 2017 5:46 pm
Forum: HMG General Help
Topic: How to call function from .dll library?
Replies: 27
Views: 708

Re: How to call function from .dll library?

Marek

Can you share Dibalscop.dll for testing?
by KDJ
Mon Jun 19, 2017 8:20 pm
Forum: General Discussions
Topic: Internet connected or not
Replies: 22
Views: 577

Re: Internet connected or not

This is probably the simplest way with PINGing: FUNCTION Main() // https://msdn.microsoft.com/en-us/library/windows/desktop/aa384346(v=vs.85).aspx LOCAL lIsInternet := If(HMG_CallDLL("Wininet.dll", 0, "InternetCheckConnection", "http://www.google.com", 1 /*FLAG_ICC_FORCE_CONNECTION*/, 0) == 1, .T., ...
by KDJ
Mon Jun 19, 2017 6:44 pm
Forum: General Discussions
Topic: Internet connected or not
Replies: 22
Views: 577

Re: Internet connected or not

Is there an effective method to check the availability of the Internet without using PING?
by KDJ
Mon Jun 19, 2017 6:29 pm
Forum: HMG General Help
Topic: How to call function from .dll library?
Replies: 27
Views: 708

Re: How to call function from .dll library?

Marek

I prepared C++ function instead of pure C.
Try how it works.

DllFunction.zip
(4.91 KiB) Downloaded 27 times
by KDJ
Sun Jun 18, 2017 7:02 pm
Forum: HMG General Help
Topic: Textbox and Cursor Position
Replies: 14
Views: 419

Re: Textbox and Cursor Position

Franco

Functions:
_PushKey and HMG_PressKey (surces in h_hotkey.prg),
Keybd_Event (surce in c_controlmisc.c),
HMG_SendCharacter (surce in c_EventCB.c),
and other.

Read HMG documentation -> Advanced -> Read Keyboard and Mouse.
by KDJ
Sun Jun 18, 2017 3:43 pm
Forum: General Discussions
Topic: Internet connected or not
Replies: 22
Views: 577

Re: Internet connected or not

This is another way how to detect internet connection: #include "hmg.ch" FUNCTION Main() // https://msdn.microsoft.com/en-us/library/windows/desktop/aa384702(v=vs.85).aspx LOCAL nFlags := 0 LOCAL lIsInternet := If(HMG_CallDLL("Wininet.dll", 0, "InternetGetConnectedState", @nFlags, 0) == 1, .T., .F.)...
by KDJ
Sun Jun 18, 2017 10:59 am
Forum: HMG General Help
Topic: How to call function from .dll library?
Replies: 27
Views: 708

Re: How to call function from .dll library?

I am pleasantly surprised that I didn't make other mistakes.
by KDJ
Sat Jun 17, 2017 8:18 pm
Forum: HMG General Help
Topic: Textbox and Cursor Position
Replies: 14
Views: 419

Re: Textbox and Cursor Position

Karl wrote:
Sat Jun 17, 2017 5:16 am
franco wrote:
Fri Jun 16, 2017 10:24 pm
could you make the event work only when textbox is empty
you noticed the same as I
Karl and Franco

I do not quite understand. Please describe in more detail.
by KDJ
Sat Jun 17, 2017 7:55 pm
Forum: HMG General Help
Topic: How to call function from .dll library?
Replies: 27
Views: 708

Re: How to call function from .dll library?

Marek Try this. Compiled without errors, but I have no possibility to test. #include "hmg.ch" FUNCTION Main() LOCAL aScale := {} LOCAL aItem := {} LOCAL lShowWindow := .T. LOCAL nCloseTime := -1 aAdd(aScale, { 0, ; //masterAddress "192.168.1.2", ; //ipAddress 3001, ; //txPort 3000, ; //rxPort "500R...