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)
-
19:29
ScammerRevolts
14 hours agoHe Tried To Scam Me... So I Reset His Phone
20.5K4 -
16:08
RealitySurvival
1 day agoTop 12 Things Preppers Should Teach Their Children!
19.6K1 -
13:21
World Nomac
14 hours agoExtreme Bungee Jump in AlUla Saudi Arabia 🇸🇦
24.2K3 -
2:47:57
Fresh and Fit
9 hours agoMost Embarrassing Rejections Women Have Faced... w/ SNEAKO
121K159 -
3:30:25
Akademiks
10 hours agoHappy. Birthday Kendrick Lamar. Kodak Black robbed Stevewilldoit? Sosa Returns to CHIRAQ. Carti OTW?
81.2K30 -
1:22:53
Steve-O's Wild Ride! Podcast
4 days ago $0.28 earnedDoes Gene Simmons Regret Humping Thousands Of Chicks? - Wild Ride #219
36.4K40 -
33:55
Athlete & Artist Show
3 days agoS4E6: OILERS ARE DONZO, Boychuk Re-Signs In Berlin
45.1K3 -
1:59:38
Kim Iversen
13 hours agoIs The US Gearing Up For WW3? Possible Ebola 2014 Lab Leak Cover-Up Linked To Possible Covid Lab Leak Cover Up
101K226 -
32:18
Candace Owens
11 hours agoSo...Is Brigitte Macron A Man? | Candace Ep 6
49.1K131 -
43:47
Man in America
13 hours agoALERT: Putin's Plan BACKFIRES as WW3 Economic War Intensifies w/ Dr. Kirk Elliott
63.4K14