dhj Posted November 25, 2005 Posted November 25, 2005 I have a groupbox in one of my forms and in click event of that groupbox I have some code written. Once I changed the flatstyle to �system� click event of the groupbox is not working. And my other problem is, when I place a groupbox on top of another groupbox font of top most groupbox is getting upset. (This is also when the faltstyle is set to �system�) This is in my windows application. and I'm using vb.net. If anyone can give a solution I really appreciate. Thank you very much in advance Quote
karimgarza Posted November 28, 2005 Posted November 28, 2005 Hi, The click event of your groupbox does not work when you change it from FlatStyle.Standard to FlatStyle.System because the groupbox does not receive messages for mouse down events when the FlatStyle is set to system. You can see this happening using Spy++. The first image I attached is showing the messages received for a left click using FlatStyle.Standard and the second image shows the messages received using FlatStyle.System, also for a left click. Notice how only when you are setting it to standard is that we receive a message for the left click and not when is on System. I also found from the MSDN documentation that the click event is only supported for compatibility with other areas of the framework: .NET Framework Class Library GroupBox.Click Event This event supports the .NET Framework infrastructure and is not intended to be used directly from your code. Although this does not solve your problem, it does explain why you click event does not work when FlatStyle is changed to System. Thanks, kmg Quote You're either a one or a zero. Alive or dead.
dhj Posted November 29, 2005 Author Posted November 29, 2005 Thank you very much for your reply. i think i must find another method to fulfill my requirement :o any way thank you for your kind reply Hi, The click event of your groupbox does not work when you change it from FlatStyle.Standard to FlatStyle.System because the groupbox does not receive messages for mouse down events when the FlatStyle is set to system. You can see this happening using Spy++. The first image I attached is showing the messages received for a left click using FlatStyle.Standard and the second image shows the messages received using FlatStyle.System, also for a left click. Notice how only when you are setting it to standard is that we receive a message for the left click and not when is on System. I also found from the MSDN documentation that the click event is only supported for compatibility with other areas of the framework: Although this does not solve your problem, it does explain why you click event does not work when FlatStyle is changed to System. Thanks, kmg Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.