Page 1 of 1

How can an Enter Keypress be used to access a method

PostPosted: 20 Nov 2018 23:37
by AngryDev
How can an Enter Keypress in a text box be used to access a method. I saw the thread below but it's written in Delphi. I need to see an example in C++. I'm very new to both C++ and the Rad Studio environment. Ultimately what I'd like to do is after a user types a password, I'd them to be able to just hit enter to enter the site. As well as clicking a login button. I can create an OnKeyPress event below. But I'm not sure what to do with it.

Code: Select all
void __fastcall TfrmMain::txtAgencyJQEventsKeyPress(TObject *Sender, TStringList *AParams)
{

}


Delphi Link = https://www.cgdevtools.com/cgforum/viewtopic.php?f=101&t=828

Thanks

Re: How can an Enter Keypress be used to access a method

PostPosted: 26 Nov 2018 17:50
by Alexander Bulei
Hi AngryDev,

Just follow the logic in that topic, but translating to c++.

Best Regards.

Re: How can an Enter Keypress be used to access a method

PostPosted: 30 Nov 2018 20:25
by AngryDev
Well that's just it. I don't know how. I can only find examples in Delphi. And I don't understand it. I have been developing in the .Net and VB6 world for years, but C++ is new for me.

Re: How can an Enter Keypress be used to access a method

PostPosted: 04 Dec 2018 16:53
by Alexander Bulei
Hi AngryDev,

Well, I can show the examples in delphi, I don't have rad studio....

Btw, we can't teach you the c++/delphi programming here :)

Best Regards.