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
The Trish Regan Show
44 minutes agoBREAKING: NFL Picks Anti-Trump Rapper Bad Bunny for Super Bowl—Risking MASSIVE Fan Boycott!
341 watching -
45:18
Stephen Gardner
1 hour ago🚨EXPOSED: Real reason Trump preparing for war - Tulsi Gabbard WARNS Trump!!
2.67K19 -
4:23:04
Right Side Broadcasting Network
7 hours agoLIVE REPLAY: President Trump Participates in a Press Conference With Prime Minister Netanyahu - 9/29/25
66.8K34 -
1:09:19
The White House
4 hours agoPresident Trump Participates in a Bilateral Meeting with the Prime Minister of the State of Israel
11.6K26 -
1:25:35
Russell Brand
3 hours agoMichigan Church Shooting Sparks Trump Warning Of ‘TARGETED ATTACK On Christians’ - SF641
151K43 -
1:59:24
The Charlie Kirk Show
3 hours agoRemembering Charlie's Martyrdom and Continuing His Revival | Driscoll, McPherson | 9.29.2025
172K44 -
1:34:24
Sean Unpaved
3 hours agoEuropeans Too Good, Lamar's Limp-Off, & the MLB's Playoff Party: Weekend Sports Review
30K4 -
1:15:02
Mark Kaye
4 hours ago🔴 TRUMP Furious Over Bad Bunny Super Bowl Halftime Show
31.8K3 -
46:58
MattMorseTV
4 hours ago $10.07 earned🔴COURT DATE for Kirk's ASSASSIN.🔴
59K30 -
2:11:40
Nerdrotic
4 hours ago $4.42 earnedOne Woke After Another | JK Rowling NUKES Emma Watson - Nerdrotic Nooner 520
58.9K8