home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,796 of 10,840   
   George Bashore to Jack Sadie   
   Re: Very Newbie needs Windows start up r   
   26 Dec 05 19:38:46   
   
   From: gbashore@bcpl.net   
      
   Jack try this.   
   Replace PathAndFileName with the path and file name to your wav file for   
   each day of the week.   
   example Call sndPlaySound("C:\sounds\startup.wav", 1)   
   HTH   
   George   
      
      
      
   Option Explicit   
   Private Declare Function sndPlaySound Lib "winmm.dll" Alias _   
   "sndPlaySoundA" (ByVal FileName As String, _   
   ByVal Flags As Long) As Long   
   Dim myDate As String   
      
   Private Sub Form_Load()   
      
       myDate = Format(Now, "dddd")   
       Debug.Print myDate   
       Select Case myDate   
       Case "Monday"   
          Call sndPlaySound("PathAndFileName", 1)   
       Case "Tuesday"   
          Call sndPlaySound("PathAndFileName", 1)   
       Case "Wednesday"   
           Call sndPlaySound("PathAndFileName", 1)   
       Case "Thursday"   
           Call sndPlaySound("PathAndFileName", 1)   
       Case "Friday"   
           Call sndPlaySound("PathAndFileName", 1)   
       Case "Saturday"   
           Call sndPlaySound("PathAndFileName", 1)   
       Case "Sunday"   
           Call sndPlaySound("PathAndFileName", 1)   
       End Select   
   End Sub   
      
      
      
   "Jack Sadie"  wrote in message   
   news:bt6dnWQNkYlavi3enZ2dnUVZ8qmdnZ2d@pipex.net...   
   >I have found out how to substitute my own wav sound for the Microsoft   
   >default sound, but now I want to go a step further.   
   >   
   > I want to create 7 different wave files and have a different one open   
   > according to the day of the week - the "monday.wav" opening on Mondays and   
   > the "tuesday.wav" on Tuesdays and so on.   
   >   
   > It looks to me as if I need to have a routine created which I don't have   
   > the expertise to do. And if I had a vb routine I wouldn't know how to   
   > employ it on my computer.   
   >   
   > Can any kind person assist or point me in the right direction if this is   
   > the wrong ng.   
   > Thanks so much   
   > --   
   > Regards, Jack Sadie   
   > jaxalad-buying@yahooREMOVE.co.uk   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca