Re: .hide function and VB6
Re: .hide function and VB6
Quote:
Originally Posted by Joacim Andersson
.show is in the drop down list, but .hide is not. Is there any way to add it. I have VB6 installed on both my workstation and laptop and neither have the .hide function.
Re: .hide function and VB6
That's strange. Are you sure it is a form that you are trying to hide? Anyway you can always set the Visible property instead which is the same thing.
Re: .hide function and VB6
you might want to reinstall VB. sounds like something is mucked up.
Re: .hide function and VB6
Quote:
Originally Posted by dglienna
you might want to reinstall VB. sounds like something is mucked up.
They are both fresh installed on two separate computers. I tried re-installing on one of them and that made no difference...
Re: .hide function and VB6
Actually, what I realized is that .hide now works but not for any of my forms in a project I was working on. If I add a new form within that project it does work. Any way I can fix this so that it works on all of the forms that I created previously?
Re: .hide function and VB6
Is it possible for you to zip your project and upload it here so we can have a look at it?
Re: .hide function and VB6
Quote:
Originally Posted by Joacim Andersson
Is it possible for you to zip your project and upload it here so we can have a look at it?
Sure thing. I have attached it to this post.
I am thinking that when I installed the service pack that it enabled the .hide function, but since this project was created prior to that, the forms have some old function list or something...
Re: .hide function and VB6
Very strange but Me.Hide works.
Re: .hide function and VB6
It has something to do with the Forms and how they were created. If you add a new Form1
to the project and
replace BankHome with Form1 as the startup object and add some buttons that do the same as
the BankHome, it works and .Hide is available. :confused:
Re: .hide function and VB6
Quote:
Originally Posted by RobDog888
It has something to do with the Forms and how they were created. If you add a new Form1
to the project and
replace BankHome with Form1 as the startup object and add some buttons that do the same as
the BankHome, it works and .Hide is available. :confused:
Yeah, I know. I think it is because the original VB did not have the .hide function and one of the service packs introduced it. The forms were created with the non-service pack version and new forms are created with the new functions all available. I just don't want to have to go back and re-create all of the forms in all of my projects that I am working on...
Re: .hide function and VB6
Actually, the service pack did not add the .hide function. I just tried on a computer where I did not yet install the service pack and it had the .hide function when I created a new form. Same problem still exists though. The .hide function is not working/available in my current projects, but when new forms are added it is there...
Re: .hide function and VB6
After being totally confused for some time I finally found the reason. Your main form is named BankHome but you have also named the label on this form to BankHome which confuses VB since the label doesn't have a Hide method. Simply give the label a different name and it works fine.
Re: .hide function and VB6
:thumb: 's and a few Reps on that one for Joacim!
Re: .hide function and VB6
Thank you very much. That was stupid of me to name stuff the same.
Re: .hide function and VB6
That's why most people use Hungerian notation when naming variables and objects. For example call a form frmBankHome and a label lblBankHome and so on.
Re: .hide function and VB6
Quote:
Originally Posted by Joacim Andersson
That's why most people use Hungerian notation when naming variables and objects. For example call a form frmBankHome and a label lblBankHome and so on.
Good idea. Thank you.