terabin Posted July 13, 2011 Author Share Posted July 13, 2011 Can someone teach me how to do it?I used this code:``` If GetKeyState (vbKeyReturn) <0 Then'Enter to talk frmMain.txtMyChat.Visible = Not frmMain.txtMyChat.Visibleend If```but when the txtMyChat is visible, the player has to click on it to write, and whenever he writes is off again …there is a way it just hit enter and write? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 13, 2011 Share Posted July 13, 2011 Try this instead:```If GetKeyState (vbKeyReturn) <0 Then'Enter to talk frmMain.txtMyChat.Visible = Not frmMain.txtMyChat.Visible If frmMain.txtMyChat.Visible = True Then frmMain.txtMyChat.SetFocus End IfEnd If``` Link to comment Share on other sites More sharing options...
terabin Posted July 13, 2011 Author Share Posted July 13, 2011 thanks, you saved me O.o Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now