 |
|
|
|
| |
|
Total Source Downloaded: 139,694 |
| |
|
Total Snippet Views: 74,266 |
| |
|
New Member: chaitanya |
| |
|
|
|
|
|
|
|
| Site Information |
 |
Members |
471 |
 |
Total Downloads |
99 |
 |
Total Snippets |
90 |
|
|
|
|
|
|
|
 |
| Submit your source code and code snippets to Cy2online and
help build an archive of source code. Click here
register or login if you are a member.
|
 |
Submit Snippets |
|
|
 |
|
| Viewed: 3217 |
| Version: Framework 2.0 |
| Fade-in or Fade-out your Splash Screen |
| Import/Using Directives |
| None |
Imports System.Threading
Public Class Form1
Inherits System.Windows.Forms.Form
Private Shared _form As frmSplash = Nothing
Private Shared _mainForm As Form = Nothing
Private Shared _thread As System.Threading.Thread = Nothing
Public Shared ReadOnly Property Form() As frmSplash
Get
Return _form
End Get
End Property
Public Shared Sub ShowSplash(ByVal mainForm As Form)
If Not (_form Is Nothing) Or Not (_thread Is Nothing) Then
Return
End If
_mainForm = mainForm
If Not (_mainForm Is Nothing) Then
AddHandler _mainForm.Activated, _
AddressOf _mainForm_Activated
End If
_thread = New System.Threading.Thread( _
New System.Threading.ThreadStart(AddressOf StartThread))
_thread.Name = "SplashForm"
_thread.IsBackground = True
_thread.ApartmentState = System.Threading.ApartmentState.STA
_thread.Start()
End Sub
Public Shared Sub CloseSplash()
If Not (_form Is Nothing) And _form.IsDisposed = False Then
If _form.InvokeRequired Then
_form.Invoke(New MethodInvoker(AddressOf _form.Close))
Else
_form.Close()
End If
End If
If Not (_mainForm Is Nothing) Then
RemoveHandler _mainForm.Activated, _
AddressOf _mainForm_Activated
_mainForm.Activate()
End If
_form = Nothing
_thread = Nothing
_mainForm = Nothing
End Sub
Public Shared Sub ShowSplash()
ShowSplash(Nothing)
End Sub
_
Shared Sub Main()
Dim mainForm As New SplashScreenForm
SplashScreenForm.ShowSplash(mainForm)
Application.Run(mainForm)
End Sub
Private Shared Sub StartThread()
_form = New frmSplash
AddHandler _form.Click, AddressOf _form_Click
Application.Run(_form)
End Sub
Private Shared Sub _form_Click( _
ByVal sender As Object, ByVal e As EventArgs)
CloseSplash()
End Sub
Private Shared Sub _mainForm_Activated( _
ByVal sender As Object, ByVal e As EventArgs)
While (_mainForm.Opacity < 1)
_mainForm.Opacity += 0.08
System.Threading.Thread.Sleep(100)
End While
CloseSplash()
End Sub
End Class |
|
|
|
|
|
|
 |
| 1 |
Simple DataGridView Example - C# |
| This example demonstrates how to load data into the DataGridView control using string array's. |
| 2 |
A Custom Message Box - C# |
| This example source code demonstrates how you can develop your own messages box. |
| 3 |
Custom MessageBox 2 - C# |
| This example source code builds on a previous example of creating a custom MessageBox. New features in this example include different types of buttons and displaying an icon. Also uses different message beep tones for standard MessageBox's and warring MessageBox's. |
| 4 |
Connect To MSN Messenger Using The MSN Protocol - C# |
| This sample application demonstrates how to connect to MSN Messenger using the MSN Protocol. It also includes how to generate a Ticket that is used with the ChallengeString. This is a simple authentication example. |
| 5 |
Send Messages Using The Net Send Command - C# |
| This sample program demonstrates how to send messages in a network using the Windows Messenger service. |
|
|
|
|
|
|
CY2 Online2.net | CopyRight 2005 - 2007 | All Rights Reserved
|
|