Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Regarding Win Form Application: What is differenece between
C#
this.Opacity = 0;
,
C#
this.Visible = false;
and
C#
this.Hide();
?

Plz elaborate it?
Posted
Updated 16-Feb-14 20:18pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Feb-14 2:14am    
As most questions about "differences", this one is incorrect. How can it be possible to ask about "difference" between Boolean and double properties?..
—SA

Please see my comment to the question, which is quite incorrect. Why asking incorrect questions if you can always simply read about each property/method?

Opacity has nothing to do with visibility, not in any sense, it is pretty much like color component and ARGS color; not quite, but just read about it: http://msdn.microsoft.com/en-us/library/system.windows.forms.form.opacity%28v=vs.110%29.aspx[^].

And calling Hide() is the same as assignment false to Visible. Again, there is a clear statement which is put here: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.hide%28v=vs.110%29.aspx[^].

Please, don't ask such questions. This kind of laziness is too much. Read the documentation instead.

—SA
 
Share this answer
 
v2
Go through the following links:

1. Opacity[^] - This can be used to animate the form. e.g. Fading.
2. Visible[^] - This property defines the visibility of the form.
3. Hide()[^] - This is a method which updates the 'Visible' property of the form.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900