Splashscreen disappears

G

Guest

I added a Splashscreen to my Windows Forms project.
I specified it in Project - Application Tab - Splash screen.
When I launch the project the splash screen turns up, which is fine.
BUT then a NullReferenceException is thrown!
I turned on "Break when an Exception is thrown" but it will not stop on a
code line that is visible to me.

My application uses a frmMain as start form.
The frmMain code is enclosed by a Namespace.

When I enclosed the SplashScreen code in the same Namespace and modified
Project - Application Tab - Splash screen to point out the new full name,
then the problem disappears, but so does the SplashScreen .......!

As far as I can see there are no more settings I should have set to get it
working.
 
J

Jeffrey Tan[MSFT]

Hi jaklithn,

Thanks for your post.

In normal situation, I do not think the SplashScreen will generate
NullReferenceException. Can you post a little sample project to demonstrate
this problem? Then I can understand your scenario and problem much better.
Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
G

Guest

Now I have a zipped example project with the mentioned behaviour.
Can I send it to you somehow?
 
G

Guest

Actually the behaviour is quite easy to reproduce:

1) Create a new WindowsForms project (I use VB.Net)
2) Include the generated form class in a namespace tag, like Namespace
CompanyX.DepartmentY. When I do that I get a warning which means I need to
include the partial class of the designer file in the same namespace.
3) Set the form as startup form.
4) Launch the application: Works fine.
5) Add a splashscreen to the project and verify it is set as splashscreen.
6) Launch the application: NullReferenceException
7) Include the Splashscreen form in the same namespace (class + partial class)
8) Change the Splashscreen reference to pint out the Namespace Splashscreen
9) Launch the application: Works fine, except the Splashscreen never turns up!

Obviously the Namespace is the problem.
I guess my method to set the Namespace tag in the Designer file is not the
recommended way. I always set my Namespace tags in the code files to clarify
the structure. Is that not possible now when the designer code is separated
into another file?

I still think the mentioned Splashscreen behaviour is quite strange, and
need an explanation.
 
J

Jeffrey Tan[MSFT]

Hi jaklithn,

Thanks for your feedback.

I recommanded you to attach the sample project in the further reply, so
that it can benifit the entire community. If you can not attach in the
newsgroup. You can contact me with the email below:
(e-mail address removed)(remove "online.")

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
J

Jakob Lithner

I am not able to use NNTP protocol through the firewall on my work.
I am limited to MS Webpage there, so I had to wait until I was home to get
the file.

So I downloaded and ran your code, and on my home computer it works fine as
you said.
Very strange!
On monday I will try it on work and see if there is a difference .....
 
J

Jeffrey Tan[MSFT]

Ok, I will wait for your further test feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top