|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
setting property on button failshi
i've tried to set the Visible property on a System.Windows.Forms.Button on the form_load() event. this method normaly process correctly. however as i played around with the software for testing reasons, suddenly this Visible property on the button could not be set anymore. i tried it in the IDE at runtime by watch windows and commandline window. i can set it, but it will be set back after assignment (watch the attachement to see what i mean). can anybody guess what the problem is or what i did wrong? thanx, jazper [attached file: cmd_wnd.jpg] Jazper Manto wrote:
> hi Could be something with inter-process messaging and security. After> > i've tried to set the Visible property on a > System.Windows.Forms.Button on the form_load() event. this method > normaly process correctly. however as i played around with the > software for testing reasons, suddenly this Visible property on the > button could not be set anymore. i tried it in the IDE at runtime by > watch windows and commandline window. i can set it, but it will be > set back after assignment (watch the attachement to see what i mean). > > can anybody guess what the problem is or what i did wrong? > thanx, jazper all, changing the visibility of a button is doing a SendMessage() under the hood with a proper HWnd but the IDE isn't owner of that. If you add a second button and when you click that button, it will set the visibility property of the btnSetTake button, does that work? FB -- ------------------------------------------------------------------------ Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com My .NET blog: http://weblogs.asp.net/fbouma Microsoft MVP (C#) ------------------------------------------------------------------------ hi frans
thank you for your answer. > If you add a second button and when you click that button, it will set yes, that worked.> the visibility property of the btnSetTake button, does that work? everything takes its time... eat something, smoke a cigarette and restart the computer. i really don't know what happen to that VS.net IDE. everything works fine again after a restart of the complete system. this is a sh*tty solution for a sh*tty problem. but it solved my problem :-) sorry that you've waisted your time with my request, frans. thanx again, jazper |
|||||||||||||||||||||||