Premium Only Content

Learn Visual Basic 6 VB6 Alarm Clock Part 2
Welcome to part 2 of project 2 making a alarm clock ..
My name is Gym and today were going to be moving on with the coding part of our second project
Ok lets got on with it,, this line of code is only 1 of 2 most complicated lines in the whole program,, and ill try to explain to you what its saying.
If Time = (Text1.Text) & ":" & (Text2.Text) & ":00 " & (Text3.Text) Then
we use brackets because then it means the object text1..
if we used quotation marks then it means that exact thing written,, in other words it would only sound the alarm when the time read text1.text..
lol and I'm not shore what hr of the day that is..lol.
Ok after the then its timer4.enabled = true and timer4.intervull = the length of you wav file you have selected,, now remember that 1 second = 1000 so if you have file is 3 secs long you want the interval to be 3000.. to find out the leant of your wav file right mouse click then properties .
then finish i of with end if
Ok now in Timer 3 we want to right
if option1 ="1" then
Text3.text = "AM" 'in capitals
else
Text3.text = "PM" 'in capitals
Okays now in form load we need to have timer 3 switched on from load up so instead of typing it all out again just copy timer 1 enabled with interval and past it below and change t it from timer 1 to timer 3
Now we have to do the on and off button so in the on button we right timer2 enabled = true and then interval =1 and then we want the caption to change in our status label so we right label 2 caption = "Alarm is on" don't forget the quotations
Then in the off button we need it to say timer 2 enabled = false and then
Label 2 caption = "alarm is off"
and we also what to have that button to not only turn off the timer that tells wether the times mach we want to use it to turn off our wav file once it has sounded so we right timer4. Enable = false
Ok now here is the hardest bit of them all... we want to use the drop down box to find general and then make shore it sees dilacerations,,,
And in their we going to right
Private Declare Function Playwave Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Call Playwave("Alarm.WAV", 3)
-
LIVE
Rallied
5 hours ago $1.77 earnedWarzone Challenges All Night
285 watching -
2:45:52
DLDAfterDark
6 hours ago $8.18 earnedWhat Are We Missing From The Charlie Kirk Incident? Feat. TN Tactical - After Hours Armory Live!
29.4K7 -
16:23
True Crime | Unsolved Cases | Mysterious Stories
1 month ago $2.81 earnedThe Strange Disappearance of Mekayla Bali | (Mini-Documentary)
24.1K4 -
10:03
nospeedlimitgermany
12 days ago $5.20 earnedVW Golf 5 R32 | 250 PS | Top Speed Drive German Autobahn No Speed Limit POV
29.4K5 -
1:35
Memology 101
1 day ago $2.93 earnedChicago Mayor Johnson calls LAW ENFORCEMENT a "SICKNESS" he will "ERADICATE"
24.1K39 -
10:17
Advanced Level Diagnostics
13 days ago $4.18 earned2007 Chevy Express - Replaced Everything But The Code Remains!
31.9K -
1:01:11
The Mel K Show
6 hours agoMel K & Harley Schlanger | History Repeats: A Wake-Up Call for Humanity | 9-20-25
96.8K28 -
2:13:52
Mally_Mouse
15 hours ago🌶️ 🥵Spicy BITE Saturday!! 🥵🌶️- Let's Play: Lockdown Protocol (New Updates!)
93.8K6 -
12:57
Culture Apothecary with Alex Clark
1 day agoMy Last 6 Years With Charlie Kirk | In Memoriam with Alex Clark
41.4K10 -
2:48:55
Barry Cunningham
12 hours agoPRESIDENT TRUMP WILL ENSURE THAT CHARLIE KIRK DID NOT DIE IN VAIN!
76.6K125