none
Me.hide error in 1 form RRS feed

  • Question

  • I have a strange error.

    A far as i know nothings changed , but now in 1 form me.hide is not working anymore ?

       Me.Hide()
       Form1.Show()

    Oke no problem till now. In all the other forms me.hide works but not in 1 of the forms.

    The error is 

    Property access must assign to the property or use its value.BC30545
     i am using vb2015 versie 
    Wednesday, September 26, 2018 7:22 PM

Answers

  • Maybe there is a control or variable that is called “Hide”? Rename it, or try a workaround: CType(Me, Form).Hide().


    • Marked as answer by KeesBlunder Thursday, September 27, 2018 5:35 PM
    Wednesday, September 26, 2018 7:47 PM

All replies

  • Where are you running these methods.

    Also why arent you closing the form instead of trying to hide it? I didnt even think that would work at all. Very odd


    Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi

    Wednesday, September 26, 2018 7:46 PM
  • Maybe there is a control or variable that is called “Hide”? Rename it, or try a workaround: CType(Me, Form).Hide().


    • Marked as answer by KeesBlunder Thursday, September 27, 2018 5:35 PM
    Wednesday, September 26, 2018 7:47 PM
  • Maybe there is a control or variable that is called “Hide”? Rename it, or try a workaround: CType(Me, Form).Hide().


    technically you shouldn't have to reference "Me" you could just type Hide

    Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi

    Wednesday, September 26, 2018 7:57 PM
  • Under Button.Click

    Hide give's the same error

    Thursday, September 27, 2018 10:31 AM
  • Thanks Viorel_,

    This is working , but don't know why the normal me.hide is not working

    Thursday, September 27, 2018 10:32 AM
  • Thanks for the hint Viorel_

    After 3 hours of seaching i found a button that i did not put there , maybe i put it by mistake with copy and paste from another project ?

    And the name is Hide !

    Pff i did not know that this name was a great inpackt on the project.

    Nice learning experience , now i know to backup my project more then i did.

    Thanks.

    Thursday, September 27, 2018 5:35 PM
  • So, anyway, why hide? I am just curious why you wouldn't close/dispose it and free the resources.

    Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi

    Thursday, September 27, 2018 7:33 PM
  • In 1 form i fill a lot a textboxen and datetimepickers with data and time's

    In other forms i use this data to fill some forms in Excel , Word then print etc.

    Save in database first is not always the option because i can't use a database at work.

    Me.hide i can read the data , use close then not .

    Friday, September 28, 2018 4:46 PM