Solved

vb.net enable a splash page to open once client opens app...

Posted on 2010-09-09
4
339 Views
Last Modified: 2013-11-27
How do I enable a vb.net to open once the client opens so as the app downloads...the splash dosplays...I have a bunch of .vb pages..yet I want my login to display first...how do I do that?
0
Comment
Question by:GlobaLevel
  • 3
4 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33643629
You need to display first the login form and then the slpash Screen?
0
 
LVL 18

Accepted Solution

by:
John (Yiannis) Toutountzoglou earned 500 total points
ID: 33643696
Hi..
In this case you can mange your Forms Like this
Public Class LoginForm
    Private WithEvents obj As Form
    Private Sub LoginForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
         'Here you check if the login is succesful...
         'If So then .....
               .
               .
               .
        If obj Is Nothing Then
            obj = New SplashScreen1
        End If
        obj.Show()
        Me.Hide()
        Dim StartTime As Date
        StartTime = Now
        While DateDiff("s", StartTime, Now) < 5
        End While
        obj.Close()
        If obj Is Nothing Then
            obj = New MainForm
            obj.Show()
        End If
    End Sub
    Private Sub obj_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles obj.FormClosed
        Me.obj = Nothing
    End Sub


End Class

'now if want to display the splash screen First...do this:
1.Solution Explorer-MyProject-Application 
you will see at the bottom of form a combo for the Slpash Screen..Select You Spalsh Screen and then press VIEW APPLICATION EVENTS
AND PUT THIS CODE AFTER Partial Feiends Class MyApplication:
 Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean

            ' Set the display time to 5000 milliseconds (5 seconds). 

            Me.MinimumSplashScreenDisplayTime = 5000

            Return MyBase.OnInitialize(commandLineArgs)

        End Function

Open in new window

0
 
LVL 10

Author Comment

by:GlobaLevel
ID: 33646694
the code above is good, however, how does the app kknow which form to bring up first when the app starts...in asp.net we right click and select 'use as start page'  this does not exist in vb.net exxpress...
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 33650599
In Solution Explore Select MyProject..
There You will find a seleciton called Start up Form ....Select the form you want and that's all
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Firing an ASP.NET event on selection of a JQuery datepicker 4 29
get combo value in class 5 14
Very Large data in MYSQL 7 73
Install IIS7.5 on Windows Sever 2012 R2 4 23
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 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