When a UIControl is Hidden does it lose its Functionality
If we hide a control with Control.Hide();
in C# (win-forms) does the Control lose 开发者_如何转开发its Functionality, in that way that Control's Stop's its Execution like if we Have an MP3 Player Control and if we Hide it does it Stop Sounding, or if we Populate Data in a DataGridView than if we Play with it's Visibility does GridView clear it's Data .
If the Control does lose ,what can i do to prevent it and if anyone knows why?
PS: Where is e Difference between Control.Visible = false;
and Control.Hide();
The control will not lose its functionality. It is still an object in memory and if you call any method on it, it will execute. Hiding it simply means it does not display on a form anymore.
In your example, hiding a control will not automatically stop the sound, unless that is built into the hide function.
As for you PS - from MSDN, Control.Hide
Method:
Hiding the control is equivalent to setting the Visible property to false. After the Hide method is called, the Visible property returns a value of false until the Show method is called.
精彩评论