hi
i do start a multiple Form with Browse/Grid and DBF.
when try to use same DBF i want to switch to that Form and setfocus to Browse/Grid
under Xbase++ i have have SetAppFocus() and SetAppWindow() and i know "setfocus" but what about "setWindow"
i know FindWindow() & Co but i hope there is a HMG Command ... who can help please.
switch to other Form from same App
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
switch to other Form from same App
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: switch to other Form from same App
while i did not found what i need i have re-write some Xbase++ Code to HMG Syntax using HMG_CallDLL()
cTitle is the exact Name on Titlebar ( can´t find without Titlebar )
if success Window appear in front
Syntax : DoFindWin( cTitle )cTitle is the exact Name on Titlebar ( can´t find without Titlebar )
if success Window appear in front
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: switch to other Form from same App
hi,
can someone please teach me how to write a HB_FUNC() from those HMG_CallDLL()
can someone please teach me how to write a HB_FUNC() from those HMG_CallDLL()
have fun
Jimmy
Jimmy
Re: switch to other Form from same App
Suppose we would like to create function SETFOCUS
Refer link for c++ code for SetFocus function
https://docs.microsoft.com/en-us/window ... r-setfocus
Now refer line no. 358 of c:\hmg\source\c_controlmisc.c
Now compare code, how to create function in HMG
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: switch to other Form from same App
hi
thx for Tip
i have look for HB_FUNC( SetFocus ) but it does not have right Parameter ( Hwnd = Number )
i search for Title of Window so it must be a String ... not sure if "A" or "W" is need
i guess it must be something like this
but how to translate next line
how to "init" nWin
thx for Tip
i have look for HB_FUNC( SetFocus ) but it does not have right Parameter ( Hwnd = Number )
i search for Title of Window so it must be a String ... not sure if "A" or "W" is need
i guess it must be something like this
Code: Select all
TCHAR *cTitle = (TCHAR *) HMG_parc (1)
Code: Select all
nWin := HMG_CallDLL( "User32.dll", DLL_OSAPI, "FindWindow", 0, cTitle)
nWin = FindWindow( 0, cTitle)
have fun
Jimmy
Jimmy
Re: switch to other Form from same App
Jimmy
Refer link it may help you to
Find running program from the windows title / process, once found kill said program
http://hmgforum.com/viewtopic.php?f=5&t ... 513#p39513
Refer link it may help you to
Find running program from the windows title / process, once found kill said program
http://hmgforum.com/viewtopic.php?f=5&t ... 513#p39513
- Attachments
-
- Untitled.png (21.32 KiB) Viewed 2047 times
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
- AUGE_OHR
- Posts: 2060
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: switch to other Form from same App
hi,
thx for help.
it is not the Function itself, which is working, it is HB_FUNC() Syntax and Parameter Type like HMG_parc / hb_parc
thx for help.
it is not the Function itself, which is working, it is HB_FUNC() Syntax and Parameter Type like HMG_parc / hb_parc
have fun
Jimmy
Jimmy