|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I tell if a WindowsForms10.BUTTON.... is a checkbox or radiobuttonI am spying on another process and I can tell that the window I am looking
at is a WindowsForms10.BUTTON.... but I don't see how to tell if this is a regular button, checkbox or radiobutton. I looked at the window style but this does not seem to use the styles BS_RADIOBUTTON, BS_CHECKBOX, etc. I need to similarly differentiate controls that show up as WindowsForms10.Window... such as picture box, group box Thanks, Bill >I looked at the window style but Did you use a tool such as Spy++ to check the window styles or some>this does not seem to use the styles BS_RADIOBUTTON, BS_CHECKBOX, etc. other way? The BS_ bit flags should be set, but Spy++ will not recognize them as such when the window class name isn't "Button". So you have to look at the numeric value and not just the name. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. Hi Mattias,
Yes, I used Spy++ Style Word results for .NET 2 controls using Spy++ Control StyleWord Button 0x56012F00 Checkbox 0x56012D25 or 0x56012D05 or 0x5601000B or 0x5601022B Radiobutton 0x56012D04 or 0x5601000B Notice that both Checkbox and RadioButton can return a style word of 0x5601000B - so the style word can't be used to tell the type I rechecked many times on different apps to make sure I am not making errors. Thanks, Bill Show quote "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message news:emkP8mchGHA.4284@TK2MSFTNGP05.phx.gbl... > >>I looked at the window style but >>this does not seem to use the styles BS_RADIOBUTTON, BS_CHECKBOX, etc. > > Did you use a tool such as Spy++ to check the window styles or some > other way? The BS_ bit flags should be set, but Spy++ will not > recognize them as such when the window class name isn't "Button". So > you have to look at the numeric value and not just the name. > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup. Hi Bill,
Thanks for your post! For managed .Net winform application, in order to get more detailed information of the controls, you may give the following "managed Spy++" a look: "Managed Spy--Deliver The Power Of Spy++ To Windows Forms With Our New Tool" http://msdn.microsoft.com/msdnmag/issues/06/04/ManagedSpy/ This tool is developed by one of the .Net winform developer. This article has the tool source code followed with it. Hope this helps! Best regards, Jeffrey Tan Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
|||||||||||||||||||||||