FrançaisEnglishEspañol
PC SOFTForums homeLast messagesOnline repository
PC SOFT
Find...
Perform the searchSearch in...
Newsgroup dedicated to WINDEV (current version), in English
How to simulate ENTER key and Execute Exit code of Edit controls
Dec., 14th 2009 at 07:15 AM
Robert Zhong
<gu...st@news.pcsoft.fr>

Message 1/6
How to simulate ENTER key and Execute Exit code of Edit controls

Hi, All
I need to simulate a ENTER key and Execute Exit code of a edit control.
SendKey("{ENTER}",EditLastName_CO) does not trigger the EXIT code of the edit control.
I must miss something, please help
Robert Zhong


Dec., 14th 2009 at 07:15 AM
Novica Njagojevic
<gu...st@news.pcsoft.fr>

Message 2/6
Re: How to simulate ENTER key and Execute Exit code of Edit controls

Hi Robert,
use : ExecuteProcess(Btn_ButtonName,trtExit)
then sendkey is used to send actions to external apps like wordpad etc,to simulate keystrokes and other actions.


Dec., 14th 2009 at 07:15 AM
robert zhong
<gu...st@news.pcsoft.fr>

Message 3/6
Re: How to simulate ENTER key and Execute Exit code of Edit controls

Hi, Novica
I only want to capture ENTER key in my Exit code, Not TAB nor mouse movement. so in my exit code section, I have :
IF KeyPressed(VK_RETURN) THEN
// do things here
END
This works. Now I want simulate this Enter Key AND fire the exit code without pressing the keyboard.
hope I explain clearly.
Robert Zhong


Dec., 14th 2009 at 12:58 PM
Louis Verbraak
<gu...st@news.pcsoft.fr>

Message 4/6
Re: How to simulate ENTER key and Execute Exit code of Edit controls

Hello Robert,
You can add a validate-button or a button linked to ENTER to your window (outside the window) and there use ExecuteProcess.
HTH.


Dec., 14th 2009 at 02:21 PM
Harry
<gu...st@news.pcsoft.fr>

Message 5/6
Re: How to simulate ENTER key and Execute Exit code of Edit controls

Hi,
I think you must use SendKey("{TAB}",EditLastName_CO)
Regards, Harry


Dec., 15th 2009 at 07:18 AM
Georgio
<gu...st@news.pcsoft.fr>

Message 6/6
Re: How to simulate ENTER key and Execute Exit code of Edit controls

Robert,
Are you declaring the windows constants for the keyboard keys? ..
EXTERN "KeyConst.wl"
Georgio