Missing Visible property on forms

I'm new to VB. Why is the visible property missing on the forms property list


Answer this question

Missing Visible property on forms

  • RichardSw

    It was available in VB6 why Not now



  • steve thorn

    You asked why it was showing you in a book but not in the product.   The product in both versions 2003 and 2005, different appear.

    Therefore I would say the book was incorrect.

    As far as a reason why it works - I have given you a reason why I could see it not being supported at design time.   Either way in .NET both C# and VB this property is not visible at design time - they both consume from windows.system.forms and therefore its probably not in here for a  specific reasoning behind this.

    VB.NET needs to remain compatible with other .NET language, VB didn't have this requirement in VB6 as it had its own runtime, development environment etc. which wasnt a shared one.

    So to answer your question - it isnt there !!!, it never was there in .NET as far as I can tell from looking at various versions and its consistent with other .NET products.   It has no purpose at design time as its a runtime function and I woudl therefore be almost certain that its probably not there by design.

     

     


  • suppechasper

    It shouldnt be missing.

    Have you got the form selected. Are you looking in the right place - show the properties in alphabetical order and you'll find it easily,


  • Arthas_cool

    Lets not get into VB6 and .NET - it appears to be a by design issue and doesnt appear to be in any version of .NET languages C# or VB which uses windows forms.

    As its not been in 2003 or 2005 I would hazard the guess it was intentional and by design.


  • BahKoo

    I do show them alphabetically. Properties go from transparency key to widows state.

    The visible property is not listed for the form.



  • WallStreetVH

    what kind of weak answer is that

  • sbodla

    I looked in VB 2005 and VB 2003 and this behaviour of the Visible property is not present in either. So its consistent and hasn't changed in a while.

    I dont know of the publish date on the book but it could have been written on a early beta or something but it is definately available at runtime - which is what is important.

    Design time is really pretty unimportant.


  • t.Gnewuch

    I had previously formulated a reply to this but deleted it. However:

    For a form, the visible property at design time is unnecessary, and is meaningless.

    How on earth should it be used (As spotty pointed out).



  • MikeLing

    It was just a beginners question. So, let's all just chill out and ease up a little.

  • Chris the badger

    hi,

    do you think this property is good for forms this property is for controls i think

    if you want to hide a form you can use a code like this.hide;

    or form1.hide;

    and you can show it again

    form1.show

    or you can set the opacity property for making it transparent

    hope this helps



  • DSATISH

    Your first reply was:

    It shouldnt be missing.

    Have you got the form selected. Are you looking in the right place - show the properties in alphabetical order and you'll find it easily.

    Now you say:

    It's not there and never was.

    So, which answer is correct



  • JHB

    Its definately available at runtime.

    Some property are decorated with an attibute which means they dont show up in the properties window.

    Visible may have this on as it would be rather strange behaviour to relect on this at design time. Think you set the text property then the form changes and reflects this property instantly. If you set visible at design time would you expect the form to disappear instantly - therefore allowing not further work on it.

    So you could argue that it shouldnt be available at runtime.

    There are many classes which have weird properties not available at design time.


  • Andorkacska

    I like you had remembered it being there in VB1-6 as well. Hands Up I jumped the gun with an assumption it was there because I write the property in code all the time. However upon further investigation I find that its one of the properties that has probably intentionally been hidden - I'm found others like in the environment that are set for a reason. (Try adjusting the height on a masked edit and you'll find you cant - thats because there is a property that doesnt show up in the property window) But I digressed slightly

    So upon further investigation and installing back 2 other versions of VB (VB Express 2005, VSTS 2005, VB.NET 2003) . I find its not there, so I check in C# as well and its not there either. But in all these its modifiable at runtime from any version of the product.

    So arguing the toss - is not going to change the fact that its not there. If you dont want to show it then simply instantiate a form using the following and its not visible.

    dim x as new form.

    you have a form and its not visible, if you want to make it visible you have to purposely set it to visible or use the show method. If you automatically want the forms to be visible when you create them put a me.visible = true in the form constructor and it will happen whenever the form is created.

    So its not a great issue, Otherwise it probably would have been changed in the 4 years that VB.Net has been available.

    Is this causing you unbelievable pain in your code that its not available to be set in the development environment or is it just that your book says it should be and its not


  • Hannoman

    It should be available at design time. This is according to the book I'm reading "teach yourself visual basic.net in 21 days" It gives an example of hiding and showing a form using the visible property, setting it to true or false. But on by property list visible is not listed under forms.

  • Missing Visible property on forms