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)
-
2:14:01
Fresh and Fit
4 hours agoDr. Disrespect Moves To Rumble!
48.8K20 -
6:14:53
Akademiks
7 hours agoDrake Sued his Label for Botting Kendrick Lamar Streams to 'End Him'. Kendrick Drops new video!
44.8K10 -
0:46
Dr Disrespect
13 hours agoIt's not just a stream... it's an experience
315K1.67K -
5:45:38
80sKiid
8 hours ago $26.98 earnedFirst stream on RUMBLE!!!!!
90.8K5 -
3:56:31
JakeParker
8 hours ago $13.91 earnedJakeParker is LIVE on Rumble
50.5K -
8:09:23
SpartakusLIVE
9 hours ago $25.35 earnedThe Duke rallies squad for LAUGHS into the night with a SMATTERING of TOXIC banter
83.4K17 -
1:03:51
Flyover Conservatives
1 day agoGeneration Z’s Revolution: 17 Year Old Author on the Return of Faith, Family, and the End of Feminism - Hannah Faulkner; Economic Update - Dr. Kirk Elliott | FOC Show
46.2K2 -
1:12:43
Adam Does Movies
11 hours ago $20.94 earnedMoviegoers Are Singing Now! + Lilo & Stitch + Sonic 3 - LIVE!
81.5K7 -
1:26:05
Donald Trump Jr.
14 hours agoRegime Media Imploding: What’s Next for MSNBC? Plus Michael Knowles & Alex Marlow | TRIGGERED Ep.194
232K236 -
37:26
Glenn Greenwald
12 hours agoGlenn Takes Your Questions: On Trump's Cabinet, The G20 Summit, and More | SYSTEM UPDATE LOCALS SPECIAL
94.6K55