none
Very bad advice for Windows Forms

    General discussion

  • The question how to get inputs from the keyboard in a form which has a button? is getting bad advice. The person asking the question obviously does not understand how Windows works. They are trying to use Windows Forms for a game but they are totally unfamiliar with the use of the keyboard in Windows.

    I even reported one post (from a moderator) as abusive because it is such bad advice. I hope that is appropriate. The post suggests using the key preview event to get keyboard messages for the form. Yet the person only has a picture control and a button in the form. My reply is to use an appropriate control. I think the question should be clarified; it is not clear what the person is actually trying to do. They should first be guided to use an appropriate control.

    There is also a reply in that thread suggesting to use a message loop. I won't say what I really think about that. I really, really hope that the question gets the attention of experts that will guide the people in the right direction; currently there is too much lousy advice in that thread.



    Sam Hobbs
    SimpleSamples.Info

    Friday, March 30, 2018 7:23 PM

All replies

  • It's fine (in my opinion) to use the abuse like that but only the moderators are going to see it. May be better to reply to the bad-advice post explaining what is wrong with it (assuming it is worth the trouble)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.


    Friday, March 30, 2018 8:35 PM
    Moderator
  • Thank you. Yes I did the best I could to explain the problem. I assume that any further attempt from me is futile. Hopefully it is just a matter of time for the issue to get the attention of someone that can straighten them out.


    Sam Hobbs
    SimpleSamples.Info

    Friday, March 30, 2018 8:50 PM
  • Hopefully it is just a matter of time for the issue to get the attention of someone that can straighten them out.

    Looks like you're doing just that. Hopefully the OP will reply back with more requirement details. (assuming it isn't just another drive-by)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, March 30, 2018 8:57 PM
    Moderator