473,830 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very, very, very new user needs help.

I am using Windows XP and I have found out how to substitute my own wav
sound for the Microsoft default sound when my computer starts, but now I
want to go a step further. I have created 7 different wave files

(C:\Start sound\day1.wav to C:\Start sound\day7.wav respectively)

and want to have a different one open according to the day of the week - the
"day1.wav" opening on Mondays and the "day2.wav" on Tuesdays and so on.

I have downloaded Visual Basic Express edition but I need to have a routine
created which I don't have the expertise to do.
I was very kindly given the following routine in a VB6 ng but because it
won't work in the Express Edition, they advised me to try a dotnet group for
the correct code. I have included it below because it just might be easily
amended by someone who is familiar but it may need to be completely
re-composed.

Can any kind person assist or point me in the right direction if this is the
wrong ng.
Thanks so much.
Option Explicit
Private Declare Function sndPlaySound Lib "winmm.dll" Alias _
"sndPlaySou ndA" (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("C :\start sound\day1.wav" , 1)
Case "Tuesday"
Call sndPlaySound("C :\start sound\day2.wav" , 1)
Case "Wednesday"
Call sndPlaySound("C :\start sound\day3.wav" , 1)
Case "Thursday"
Call sndPlaySound("C :\start sound\day4.wav" , 1)
Case "Friday"
Call sndPlaySound("C :\start sound\day5.wav" , 1)
Case "Saturday"
Call sndPlaySound("C :\start sound\day6.wav" , 1)
Case "Sunday"
Call sndPlaySound("C :\start sound\day7.wav" , 1)
End Select
End Sub
--
Regards, Jack Sadie
ja************@ yahooREMOVE.co. uk

Dec 29 '05
10 1209
"Jack Sadie" <ja*******@btin ternet.com> schrieb
Tried to add application to start menu, but trouble is I don't
really know which file to add. Could it be one called
WindowsApplicat ion1.vbproj ? That's the one I used.

I thought you know that applications are Exe files. Add a link to
WindowsApplicat ion1.exe (it's in the 'bin' sub folder of your project) to
the start menu, but before doing this I suggest to solve the problem. If it
doesn't work in the IDE, it also won't from the start menu.
Changed line as requested - no message true or false.
I missed an important point. Change the line
Private Sub Form_Load()
to
Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArg s) _
Handles MyBase.Load

Now it should work. Don't forget to build the exe before adding it to the
start menu, but this is done anyway if you first test it in the IDE.
Rebooted but still no sound. I think I may delete all and start again
taking more trouble to record file names and their location.
In any case I'm leaving London tomorrow for a couple of days to Stratford
on Avon to see some plays at the Shakespeare Theatre.


Have a nice time. :-)
Armin

Dec 31 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
9756
by: Steven O. | last post by:
I am seeking some kind of tool that I can use for GUI prototyping. I know how to use Visual Basic, but since a lot of software is being coded in Java or C++, I'd like to learn a Java or C++ -based tool. Back when I took my Java and C++ classes (two or three years ago), the available tools -- at least the ones I could find -- were still not as easy, not as "drag-and-drop", as Visual Basic. Has that changed? Is there some software out...
3
1683
by: Martin Lacoste | last post by:
Wondering if people have suggestions as to good reference sources for Access 2000 for an (almost..) intermediate user? It appears as though books along the lines of 'Access for Dummies' are way too basic for my needs. Or would I be best to continue to root around the internet and this newsgroup? I really would like a book I can refer to, however... To give a better idea as to the level I'm looking at.. - queries are generally not a...
16
2426
by: Durumdara | last post by:
Hi ! I have a problem. I have a little tool that can get data about filesystems and wrote it in python. The main user asked me a GUI for this software. This user is needed a portable program, so I create this kind of the software with Py2Exe.
8
6616
by: John | last post by:
Is there any special code I have to write to log event to Security Event Log? The following code give me "Very Easy Question, How to write log to SECURTY Event Log? Please help" Error // Create an EventLog instance and assign its source. EventLog myLog = new EventLog(); myLog.Source = "Security"; // Write an informational entry to the event log. myLog.WriteEntry("Writing warning to event log.",
10
5896
by: Peter Duniho | last post by:
This is kind of a question about C# and kind of one about the framework. Hopefully, there's an answer in there somewhere. :) I'm curious about the status of 32-bit vs 64-bit in C# and the framework classes. The specific example I'm running into is with respect to byte arrays and the BitConverter class. In C# you can create arrays larger than 2^32, using the overloaded methods that take 64-bit parameters. But as near as I can tell,...
1
1609
by: flutetones | last post by:
http://67.189.52.24/~metafusionserver/public_html/training.php Here is a link to my server. I have an issue that doen't make sense. What's hapening is this . . . What's going right . . .
13
1721
by: Jack B | last post by:
I'm using Access 2002 to create a database for a small opera company that my wife is involved in, and I'm more than a bit rusty because I haven't created a new Access database since about 1999. So, I will probably have quite a few questions as I go through this, and hopefully this group will help me out. I will be creating this database for someone else to enter the data. I have a patron table with name, address, email, etc., and I...
1
1562
by: shmodi | last post by:
Hi All, I am new here and want to get some help for speeding up and resolving IE issue while creating tree using ajax. My tree contains radio buttons at each level and I am getting all tree data from database. To speed up, what I am doing is to have tree in session at server side and whenever ajax needs the tree , it sends appropriate tree key request and get the tree object from server. My problem starts while processing huge tree....
1
1463
by: 6655326 | last post by:
Newbi needs a very small help, thank you very much. Hello everyone and thank you very much for your time. I Have a small db for invoicing and on my form (with a subform) there is a CANCEL button which will just cancel what had been selected or entered in the form ... here is the code behind the cancel button...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10771
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10487
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9313
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7745
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.