i am creating a vb application & having problems in splash screen.
I added a splash screen but wenever i run the application, it stays for less den a second.
WHat should i do. Please help me.
Thnx in advance.




Posted 28 April 2010 - 07:48 AM
Public NotInheritable Class welcum
'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information.
'TODO: Customize the application's assembly information in the "Application" pane of the project
' properties dialog (under the "Project" menu).
'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
'Copyright info
Copyright.Text = My.Application.Info.Copyright
End Sub
End Class
Posted 28 April 2010 - 08:08 AM
Public NotInheritable Class welcum
'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information.
'TODO: Customize the application's assembly information in the "Application" pane of the project
' properties dialog (under the "Project" menu).
'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
'Copyright info
Copyright.Text = My.Application.Info.Copyright
'HERE SLEEP THE PROGRAM FOR 1 second (1000 milliseconds)'
System.Threading.Thread.Sleep(1000)
End Sub
End Class
This post has been edited by NoBrain: 28 April 2010 - 08:09 AM
Posted 28 April 2010 - 09:45 AM
Posted 28 April 2010 - 10:39 AM
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateSplashScreen() My.Application.MinimumSplashScreenDisplayTime = 10000 End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateSplashScreen() ' Display Splash Screen for a least 10000 ms (10 Secs) ' My.Application.MinimumSplashScreenDisplayTime = 10000 Me.SplashScreen = Global.WindowsApplication1.Form2 End Sub
Posted 28 April 2010 - 08:21 PM
------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.1433
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.ImuFrnz.frmMain
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateSplashScreen()
Me.SplashScreen = Global.ImuFrnz.welcum
' Display Splash Screen for a least 5000 ms (5 Secs) '
My.Application.MinimumSplashScreenDisplayTime = 5000
Me.SplashScreen = Global.ImuFrnz.welcum
End Sub
End Class
End Namespace
Public Class frmMain
Private Sub GETLOSTToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GETLOSTToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New FrmShutDown
FRM.Show()
End Sub
Private Sub PersonalInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PersonalInformationToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New frmPILogin
FRM.Show()
End Sub
Private Sub AboutToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem1.Click
Dim FRM As New AboutID
FRM.Show()
End Sub
Private Sub AboutDeveloperToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutDeveloperToolStripMenuItem.Click
Dim FRM As New AboutImraan
FRM.Show()
End Sub
Private Sub MyIDPasswordsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyIDPasswordsToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New frmIdLogin
FRM.MdiParent = Me
'FRM.WindowState = FormWindowState.Maximized
FRM.Show()
Me.Enabled = False
frmIdLogin.Show()
End Sub
Private Sub tmrDateShow_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrDateShow.Tick
lbltime.Text = Now
End Sub
Private Sub SchoolBuddiezToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SchoolBuddiezToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New frmSkulFrnz
FRM.Show()
End Sub
Private Sub CITCDudesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CITCDudesToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New frmCITCfrnz
FRM.Show()
End Sub
Private Sub HostelDudesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HostelDudesToolStripMenuItem.Click
On Error Resume Next
ActiveMdiChild.Dispose()
Dim FRM As New frmBVMfrnz
FRM.Show()
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Posted 28 April 2010 - 10:06 PM
This post has been edited by imraan: 28 April 2010 - 10:08 PM
Posted 10 June 2010 - 02:05 AM
Public NotInheritable Class SplashScreen1
' When the splash Screen is closed the Form1 will showing
Private Sub SplashScreen1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
Dim fr As New Form1
fr.Show()
End Sub
'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information.
'TODO: Customize the application's assembly information in the "Application" pane of the project
' properties dialog (under the "Project" menu).
'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If
'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
'Copyright info
Copyright.Text = My.Application.Info.Copyright
End Sub
' The timer event fires after 4 sec and closes the splash screen.
' In the splash screen closed event, you saw before will open the next
' form, Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Enabled = False
DialogResult = DialogResult.OK
Me.Close()
End Sub
End Class
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
