[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


VB2005 express: When program is started, form is visible.

Posted on 2007-08-09
Medium Priority
Last Modified: 2013-11-27
OK, I really become frustrated with this VB 2005 express:

I use Me.Visible = False to hide form to systry when user click on entry in listbox, and this works fine.

But, when I put Me.Visible=False in Form_Load and start program, form is normaly visible. WTF?!? And I don't get any error...

Can someone explaint to me why this doesn't work?!?
Question by:Cro0707
LVL 16

Accepted Solution

TSmooth earned 500 total points
ID: 19662380
This happens because the form's load event is fired BEFORE the form is shown and the show method being called displays the form. I don't know the best practice for hiding the form immediately but you can add "Me.Visible = False" into the Form's "Shown" event.
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 19662528
Another way is to set the Forms Opacity property to ZERO at design-time.

Then, from code at run-time, you can set it to 1 to make it visible.

***Note that in the IDE, the Opacity property goes from 0 to 100, but at run-time it goes from 0 to 1.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Screencast - Getting to Know the Pipeline

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question