|
-
Feb 11th, 2005, 01:37 AM
#1
Thread Starter
Junior Member
.hide function and VB6
I am doing some coding in VB and it is my understanding that there is a .show and a .hide function which would show and hide a form respectively. The .show appears to work, but the .hide does not. I get the following error:
Compile Error: Method or data member not found
I am running Visual Basic 6 service pack 6.
Any help would be appreciated.
Thank you.
-
Feb 11th, 2005, 01:43 AM
#2
Re: .hide function and VB6
-
Feb 11th, 2005, 01:57 AM
#3
Thread Starter
Junior Member
Re: .hide function and VB6
 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.
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 02:00 AM
#4
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.
-
Feb 11th, 2005, 02:37 AM
#5
Re: .hide function and VB6
you might want to reinstall VB. sounds like something is mucked up.
-
Feb 11th, 2005, 12:37 PM
#6
Thread Starter
Junior Member
Re: .hide function and VB6
 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...
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 01:02 PM
#7
Thread Starter
Junior Member
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?
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 01:06 PM
#8
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?
-
Feb 11th, 2005, 01:10 PM
#9
Thread Starter
Junior Member
Re: .hide function and VB6
 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...
Last edited by mysteryman; Feb 11th, 2005 at 03:44 PM.
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 01:29 PM
#10
Re: .hide function and VB6
Very strange but Me.Hide works.
-
Feb 11th, 2005, 01:39 PM
#11
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 11th, 2005, 01:45 PM
#12
Thread Starter
Junior Member
Re: .hide function and VB6
 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.
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...
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 01:51 PM
#13
Thread Starter
Junior Member
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...
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 01:51 PM
#14
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.
-
Feb 11th, 2005, 02:09 PM
#15
Re: .hide function and VB6
's and a few Reps on that one for Joacim!
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 11th, 2005, 03:45 PM
#16
Thread Starter
Junior Member
Re: .hide function and VB6
Thank you very much. That was stupid of me to name stuff the same.
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
-
Feb 11th, 2005, 04:02 PM
#17
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.
-
Feb 11th, 2005, 04:05 PM
#18
Thread Starter
Junior Member
Re: .hide function and VB6
 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.
Business Manager / Founder
HyTek Hosting, LLC
www.hytekhosting.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|