So, you can artificially "bubble" some other event to the form. One little problem is that a form is normally covered by other controls, children of the form, so it won't get mouse events dispatched to it (in contrast to keyboard events, by the way). It might be a better solution for your problem.Īlternatively, if you want lot of control on the way the view is displayed, hosting a WPF control would probably give the best result. Selectable ( (v=vs.110).aspx) would probably be the one you want to change.īy the way, have you consider using a list view or some similar control. To modify control style, you can use Control.SetStyle ( (v=vs.110).aspx). Well, there could be tricks to detect clicks anywhere (transparent window, system hook.) but you really don't want to go that road if you don't have to as your application could then have a major impact on the stability of the system. ![]() Why would you keep the border if another Windows is activated using the keyboard and then the mouse is not used in that application? It would not be intuitive to your user that cliking on another application to activate it would remove the norder while using the keyboard would not. In practice, however detecting focus/activation change should be more than enough. ![]() Well, I think that you can detect click inside your application if the application grab mouse capture and you indirectly detect a click outside the application as it become inactive when another application is activated (but you won't reliably know for sure that it was a click (and not Alt+Tab for example). You cannot directly detect a click outside the control since event are always directed toward the control that was clicked. Well, you should consider detecting when the control become inactive (loose the focus).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |