Splash Screen in DLL

B

Bernie

I have a dll that is my library of standard code I use in many applications.
I have my about box and splash screen in that dll. The about box is easy
enough to code to the Help|About menu, but I can't figure out where to put
the splash screen.

In the project properties, the drop down box for the splash screen doesn't
let you slect a screen out of a dll in the project. I tried adding it into
MyApplication_Startup but the form never completely displays.

The application requires some database access to load the main form. I want
the splash screen to mask this process while the app access the database.
I've found many solutions that use a timer for the splash screen, but I
prefer the method where the screen stays displayed as long as it's needed.

Where can I program in a Splash Screen from a DLL?

Thanks,
Bernie
 
A

Armin Zingler

Bernie said:
I have a dll that is my library of standard code I use in many applications.
I have my about box and splash screen in that dll. The about box is easy
enough to code to the Help|About menu, but I can't figure out where to put
the splash screen.

In the project properties, the drop down box for the splash screen doesn't
let you slect a screen out of a dll in the project. I tried adding it into
MyApplication_Startup but the form never completely displays.

The application requires some database access to load the main form. I want
the splash screen to mask this process while the app access the database.
I've found many solutions that use a timer for the splash screen, but I
prefer the method where the screen stays displayed as long as it's needed.

Where can I program in a Splash Screen from a DLL?

The built-in splash screen is just for dummies for a limited number of
purposes. Congrats, you have just found a limit.

Instead, inside Sub Main, start a new Thread showing the splash screen.
Use ShowDialog or Application.run(form) for that purpose.
 
B

Bernie

Armin,

Thanks for the quick reply. Where can I get access to Main?

In Application.Designer.vb I go to MyApplication and I can see Main in the
drop down but when I select Main, I get an error dialog saying "The
definition of the object is hidden."

How do I get access under to hood to add something to main?

Bernie
 
A

Armin Zingler

Bernie said:
Armin,

Thanks for the quick reply. Where can I get access to Main?

In Application.Designer.vb I go to MyApplication and I can see Main in the
drop down but when I select Main, I get an error dialog saying "The
definition of the object is hidden."

How do I get access under to hood to add something to main?

Put this in a class:

shared sub main
'code code code
end sub



Set Sub main as the startup object in the project properties. Before, you
must disable the "Application Framework" to be able to do this.
 

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