Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 29-03-2006, 01:49 PM   #1 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default Splash screen using VB.Net


I am developing an application for my project using VB.NET. I want to add a splash-screen (like in Winamp and other softz) before the app launches to include the appz name and the names of the team members. How can I create such a splash-screen using VB.NET?
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 29-03-2006, 11:04 PM   #2 (permalink)
Indian by heart
 
planetcall's Avatar
 
Join Date: Nov 2003
Location: Bangalore
Posts: 343
Default

There are many ways to implement this. You may use timer , or a different thread. Also you may set some event on the splash form with the default timeout so that if user wants the splash to go soon....he may click on it.
__________________
प्रासादशिखरेऽपि सन्न काको गरुडायते ॥
No matter how high a fool may rise, he remains a fool -RigVeda
planetcall is offline  
Old 08-04-2006, 01:32 AM   #3 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default

thanx planet call..I implemented it using timer bt have another prob now....I set the interval to 4000(4 secs)...I m able to switch over to another form bt not able to close the splash screen after one timer tick.....how can I do that??

Also I wanted to know...is it possible that a particular sound file(wave) plays while my app runs....if yes then how is this possible?
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Old 08-04-2006, 02:18 PM   #4 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default

plz help me....anyone listening??
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Old 08-04-2006, 02:49 PM   #5 (permalink)
Wise Old Owl
 
siriusb's Avatar
 
Join Date: May 2005
Location: Chennai, India, Asia, the Earth, the Solar system, the Milky Way, the Local group, this Universe.
Posts: 1,171
Default

Here's a small example code to be put in a form named 'Splash'. Make this form the startup form and remove border and toolbox properties and make it 'TopMost'.
Code:
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        GoToNextForm()
        Timer1.Stop()
    End Sub

    Private Sub Splash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim f1 As New Form1
        f1.initUI()
    End Sub

    Private Sub Splash_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click
        GoToNextForm()
    End Sub

    Private Sub GoToNextForm()
        Me.Hide()
    End Sub
In the form1's initUI() method, at the end add a line of code to stop Splash's timer if it hasn't run out and hide the splash form, if it hasn't yet been hidden.

For sound, here's a msdn code
Code:
Public Class SoundClass
   Declare Auto Function PlaySound Lib "winmm.dll" (ByVal name _
      As String, ByVal hmod As Integer, ByVal flags As Integer) As Integer
   ' name specifies the sound file when the SND_FILENAME flag is set.
   ' hmod specifies an executable file handle.
   ' hmod must be Nothing if the SND_RESOURCE flag is not set.
   ' flags specifies which flags are set. 

   ' The PlaySound documentation lists all valid flags.
   Public Const SND_SYNC = &H0          ' play synchronously
   Public Const SND_ASYNC = &H1         ' play asynchronously
   Public Const SND_FILENAME = &H20000  ' name is file name
   Public Const SND_RESOURCE = &H40004  ' name is resource name or atom

   Public Sub PlaySoundFile(ByVal filename As String)
      ' Plays a sound from filename.
      PlaySound(filename, Nothing, SND_FILENAME Or SND_ASYNC)
   End Sub
End Class

Private Sub Button1_Click(ByVal sender As System.Object, _
      ByVal e As System.EventArgs) Handles Button1.Click
   Dim SoundInst As New SoundClass()
   SoundInst.PlaySoundFile("C:\ringout.wav")
End Sub
siriusb is offline  
Old 08-04-2006, 09:56 PM   #6 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default

@siriusb

Thnx for the code...bt still there's a prob...Wen I close the form1...the app still runs...I added an object of splash and closed it in initUI() bt still the app does not exits on clicking the close key(the X on top-right)...

How can I close the app now...
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Old 09-04-2006, 02:57 PM   #7 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default

Comeon GEEKS!!! Help me plzzzz.......
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Old 10-04-2006, 10:19 PM   #8 (permalink)
In The Zone
 
bizzare_blue's Avatar
 
Join Date: Aug 2004
Location: Lucknow
Posts: 246
Default

still no replies????
__________________
Bitten by the open-source bug...
bizzare_blue is offline  
Old 11-04-2006, 05:24 AM   #9 (permalink)
Human Spambot
 
Join Date: Nov 2004
Location: Madurai
Posts: 2,349
Default

Check out http://www.codeproject.com/Purgatory/SplashScreen.asp and http://www.codeproject.com/vb/net/vb2005ga.asp

For more links, type ["splash screen" vb.net] in google

Arun
sakumar79 is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Tenida
- by clinton
- by gohan89
- by icebags

Advertisement




All times are GMT +5.5. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2