Program Loading

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a project that I need help with. The program relies on info from a
remote server. The problem that I have is when the program loads I have a
module with some public variables that are being declared which require
access to the server in order to execute. How can I make logging on to the
server the first thing that happens when the program is loaded?

Thanks,
DCS Tech
 
Are you talking about logging onto a database server?
If so, during the form load event, your dataadapter connections will connect and retrieve
data during their .fill operations.

You can also declare a sub main in some object as a startup. Look for this feature by
right clicking on the project name in the solution explorer, selecting 'properties' and
then change the startup object.

In a windows form, look for the area that looks like this:
#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub



Hope this helps.
 
Thanks for the help. I am not using a dataadapter but the sub main idea works.
 

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

Back
Top