|
-
Sep 2nd, 2002, 09:41 PM
#1
Thread Starter
Junior Member
Help with Splash Screen and Timer
Hi all,
I need your assistence with a Splash Screen and A timer. I would like the timer to control how long the Splash Screen is Visable. I am using VB.net so I am not sure if the code for VB6 would work. Below is the code for my MDI Parent and if anyone could perhaps show me or tell me where the requested code is supposed to be I would greatly appriciate it. By the way the name of my Splash Screen form is "WelcomeScreen"
Public Class Main
Inherits System.Windows.Forms.Form
#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
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'OpenFileDialog1
'
Me.OpenFileDialog1.Filter = "txt files (*.txt)|*.txt|doc files (*.doc)|*.doc|All files (*.*)|*.*"
Me.OpenFileDialog1.InitialDirectory = "C:"
Me.OpenFileDialog1.Title = "Open"
'
'SaveFileDialog1
'
Me.SaveFileDialog1.CheckFileExists = True
Me.SaveFileDialog1.CreatePrompt = True
Me.SaveFileDialog1.FileName = "doc1"
Me.SaveFileDialog1.Filter = "txt files (*.txt)|*.txt|doc files (*.doc)|*.doc|All files (*.*)|*.*"
Me.SaveFileDialog1.InitialDirectory = "C:"
Me.SaveFileDialog1.Title = "Save"
'
'PrintPreviewDialog1
'
Me.PrintPreviewDialog1.AutoScrollMargin = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.AutoScrollMinSize = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.ClientSize = New System.Drawing.Size(400, 300)
Me.PrintPreviewDialog1.Document = Me.PrintDocument1
Me.PrintPreviewDialog1.Enabled = True
Me.PrintPreviewDialog1.Icon = CType(resources.GetObject("PrintPreviewDialog1.Icon"), System.Drawing.Icon)
Me.PrintPreviewDialog1.Location = New System.Drawing.Point(376, 15)
Me.PrintPreviewDialog1.MaximumSize = New System.Drawing.Size(0, 0)
Me.PrintPreviewDialog1.Name = "PrintPreviewDialog1"
Me.PrintPreviewDialog1.Opacity = 1
Me.PrintPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty
Me.PrintPreviewDialog1.Visible = False
'
'PrintDocument1
'
Me.PrintDocument1.DocumentName = CType(configurationAppSettings.GetValue("PrintDocument1.DocumentName", GetType(System.String)), String)
'
'PrintDialog1
'
Me.PrintDialog1.AllowPrintToFile = CType(configurationAppSettings.GetValue("PrintDialog1.AllowPrintToFile", GetType(System.Boolean)), Boolean)
Me.PrintDialog1.AllowSelection = CType(configurationAppSettings.GetValue("PrintDialog1.AllowSelection", GetType(System.Boolean)), Boolean)
Me.PrintDialog1.AllowSomePages = CType(configurationAppSettings.GetValue("PrintDialog1.AllowSomePages", GetType(System.Boolean)), Boolean)
Me.PrintDialog1.Document = Me.PrintDocument1
'
'PageSetupDialog1
'
Me.PageSetupDialog1.AllowMargins = CType(configurationAppSettings.GetValue("PageSetupDialog1.AllowMargins", GetType(System.Boolean)), Boolean)
Me.PageSetupDialog1.AllowOrientation = CType(configurationAppSettings.GetValue("PageSetupDialog1.AllowOrientation", GetType(System.Boolean)), Boolean)
Me.PageSetupDialog1.AllowPaper = CType(configurationAppSettings.GetValue("PageSetupDialog1.AllowPaper", GetType(System.Boolean)), Boolean)
Me.PageSetupDialog1.AllowPrinter = CType(configurationAppSettings.GetValue("PageSetupDialog1.AllowPrinter", GetType(System.Boolean)), Boolean)
'
'MenuItemALPHAROSTER
'
Me.MenuItemALPHAROSTER.Index = 0
Me.MenuItemALPHAROSTER.Text = "Alpha Roster"
'
'MenuItemUNITSTRENGTH
'
Me.MenuItemUNITSTRENGTH.Index = 1
Me.MenuItemUNITSTRENGTH.Text = "Unit Strength"
'
'Main
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.Green
Me.ClientSize = New System.Drawing.Size(792, 573)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "Main"
Me.Text = "Main"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
End Sub
#End Region
Private StreamToPrint As IO.StreamReader
Private Sub MenuItemCascade_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItemCascade.Click
Me.LayoutMdi(MdiLayout.Cascade)
End Sub
Private Sub MenuItemClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItemClose.Click
Dim frm As Form
For Each frm In Me.MdiChildren
frm.Close()
Next
End Sub
Private Sub MAINForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ctl As Control
Dim ctlMDI As MdiClient
' Loop through all of the form's controls looking
' for the control of type MdiClient.
For Each ctl In Me.Controls
Try
' Attempt to cast the control to type MdiClient.
ctlMDI = CType(ctl, MdiClient)
' Set the BackColor of the MdiClient control.
ctlMDI.BackColor = Me.BackColor
Catch exc As InvalidCastException
' Catch and ignore the error if casting failed.
End Try
Next
End Sub
Private Sub MenuItemOpen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItemOpen.Click
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.InitialDirectory = "c:\"
openFileDialog1.Filter = "txt files (*.txt)|*.txt|doc files (*.doc)|*.doc|All files (*.*)|*.*"
openFileDialog1.FilterIndex = 1
openFileDialog1.RestoreDirectory = True
If openFileDialog1.ShowDialog() = DialogResult.OK Then
openFileDialog1.OpenFile()
End If
End Sub
Private Sub MenuItemPrintPreview_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItemPrintPreview.Click
PrintPreviewDialog1.ShowDialog()
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|