Welcome Guest [Log In] [Register]

Image and video hosting by TinyPic







Image and video hosting by TinyPic


Image and video hosting by TinyPic
Image and video hosting by TinyPic




[The Last Pures IRC Channel]
#TLP

[The Last Pures - Quick Links]
[The Last Pures - Rules]
[The Last Pures - Introduction]
[The Last Pures - Junior Application]
[The Last Pures - Member Application]

[Public Clan Chat]
TLP CC

[Community]
Runescape Community
Pure Warfare


Add Reply
  • Pages:
  • 1
hi retard here
Topic Started: Sep 24 2009, 01:03:58 AM (260 Views)
Tim
7-4

i'm having many troubles with an extremely easy programming language visual basic


I need to make a Function that will convert minutes+seconds into a HH:MM:SS format and it will continuously add those hours/minutes/seconds into a label

that label in my program being named lblTotal

doubt i'll get any help from here but hell

here is what i have so far if you need to see:

Code:
 
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPush.Click
       'Button will add the Song name (txtBox1), and the length in both minutes (txtBox2)and seconds (txtBox3)
       'All of these will be added into lblPlay
       'The minutes and seconds will also be added and converted in lblTotal, compiling the playlist length.
       Dim strSong As String
       Dim strSongLengthandTitle As String
       Dim intSongMinutes As Integer
       Dim intSongSeconds As Integer
       Dim intPlayHours As Integer
       Dim intTotalMins As Integer
       Dim intTotalSecs As Integer
       Dim intTotalHours As Integer

       'lblPlaylist

       strSong = txtBox1.Text
       strSongLengthandTitle = txtBox1.Text & "-" & txtBox2.Text & ":" & txtBox3.Text
       lblPlaylist.Text = lblPlaylist.Text & vbCrLf & strSongLengthandTitle

       'lblTotal

       intSongMinutes = CInt(txtBox2.Text)
       intSongSeconds = CInt(txtBox3.Text)

       If intSongSeconds >= 60 Then
           intSongMinutes = 1
           intSongSeconds = intSongSeconds - 1

       End If

       If intSongMinutes >= 60 Then
           intPlayHours = 1
           intSongMinutes = intSongMinutes - 1
       End If

       intTotalSecs = intSongSeconds


           lblTotal.Text = intPlayHours & ":" & intSongMinutes & " : " & intSongSeconds

Posted Image

I knew that you wouldn't change, but I bit my tongue and swore,
Resigned myself to carry on despite you.
But you would not match my stride and cried,
"Foul! Foul! How could you expect me to care about somebody else?"
And after all, who would expect anything else from you?


lmao wats up friend - SKOTTY
Offline Profile Quote Post Goto Top
 
Xgotkillsx


nice ddos program
Posted Image

Offline Profile Quote Post Goto Top
 
Nick
Member Avatar
orlando

im so confused
[img]http://i.imgur.com/FZuOW.jpg[/img]
Offline Profile Quote Post Goto Top
 
`Blitz
Member Avatar
"My Only Fear of Death is Coming Back Re-incarnated"

xgotkillsx
Sep 24 2009, 01:06 AM
nice ddos program

nice ddos tim.

“Only God can judge me, so I'm gone either love me, or leave me alone.”
- Jay-Z

Posted Image
Posted ImagePosted ImagePosted Image
Offline Profile Quote Post Goto Top
 
Tim
7-4

um ty

Posted Image

I knew that you wouldn't change, but I bit my tongue and swore,
Resigned myself to carry on despite you.
But you would not match my stride and cried,
"Foul! Foul! How could you expect me to care about somebody else?"
And after all, who would expect anything else from you?


lmao wats up friend - SKOTTY
Offline Profile Quote Post Goto Top
 
Clyde
Member Avatar
Dew Work Son

wat is tat loolll
Offline Profile Quote Post Goto Top
 
Big Alex 67
Eleven Defense Lord

Xbl Nick
Sep 24 2009, 01:07 AM
im so confused

you see my first exterm i sent you on xbl :p

Attack Big Alex 67 (Level-85+10) / 2 more options

Posted Image
Offline Profile Quote Post Goto Top
 
Nick
Member Avatar
orlando

Big Alex 67
Sep 23 2009, 08:12 PM
Xbl Nick
Sep 24 2009, 01:07 AM
im so confused

you see my first exterm i sent you on xbl :p

yuppp.... lots of 1 shots
[img]http://i.imgur.com/FZuOW.jpg[/img]
Offline Profile Quote Post Goto Top
 
Scotty
Member Avatar


f(x)=Ax² + Bx + C where x is in the set of all real #s
Posted Image
hello friend lmao - tim
Offline Profile Quote Post Goto Top
 
Scotty
Member Avatar


or it might be a²+b²=c² i forget
Posted Image
hello friend lmao - tim
Offline Profile Quote Post Goto Top
 
Farmer Jeff
Member Avatar
MooMooMugi

OWM=genuis
Tlp's Elite F2p Unit[img]http://img220.imageshack.us/img220/4622/86806766tj3.gif[/img]
ILY Alex & Tyler :)

I play SCII and LoL religiously, come @ me

Offline Profile Quote Post Goto Top
 
13lo0d Magix
Member Avatar


Visual Basic 6.0?

God I took that stuff last year so fucking boring and gay.
Posted Image

Posted Image

.
Offline Profile Quote Post Goto Top
 
Tim
7-4

13lo0d Magix
Sep 23 2009, 08:21 PM
Visual Basic 6.0?

God I took that stuff last year so fucking boring and gay.

yup

it is, i fucking hate it but this class is sort of a necessity for me

or a little helpful at the least

you remember anything?

Posted Image

I knew that you wouldn't change, but I bit my tongue and swore,
Resigned myself to carry on despite you.
But you would not match my stride and cried,
"Foul! Foul! How could you expect me to care about somebody else?"
And after all, who would expect anything else from you?


lmao wats up friend - SKOTTY
Offline Profile Quote Post Goto Top
 
Big Alex 67
Eleven Defense Lord

Xbl Nick
Sep 24 2009, 01:14 AM
Big Alex 67
Sep 23 2009, 08:12 PM
Xbl Nick
Sep 24 2009, 01:07 AM
im so confused

you see my first exterm i sent you on xbl :p

yuppp.... lots of 1 shots

i know, twas so fucking funny

Attack Big Alex 67 (Level-85+10) / 2 more options

Posted Image
Offline Profile Quote Post Goto Top
 
Subaruspeed
Member Avatar
2011 wrx

its something randomize timer and make it loop i forget how 2 do it try this...?


Private Sub Form_Activate
Randomize Timer
For x=1 to 100
Print Rnd
Next x
End Sub
I BUY ALL BULK MILLS .40 CENTS EACH /QUERY MAZDASPEED



[img]http://img225.imageshack.us/img225/6788/110925142410.png[/img]

maxed.jpg


[img]http://img853.imageshack.us/img853/338/tomlaiddd.png[/img]

IN MY CAR i GOT 2 VTEC I CALL IT DUBTEC

[img]http://i.imgur.com/S1gJz.png[/img]
Offline Profile Quote Post Goto Top
 
Tim
7-4

laid backk
Sep 23 2009, 09:21 PM
its something randomize timer and make it loop i forget how 2 do it try this...?


Private Sub Form_Activate
Randomize Timer
For x=1 to 100
Print  Rnd
Next x
End Sub

wat why would i use a randomized timer for adding minutes and seconds to a label

wouldn't work anyways i want the button that i'm coding under to do the work not another object

Posted Image

I knew that you wouldn't change, but I bit my tongue and swore,
Resigned myself to carry on despite you.
But you would not match my stride and cried,
"Foul! Foul! How could you expect me to care about somebody else?"
And after all, who would expect anything else from you?


lmao wats up friend - SKOTTY
Offline Profile Quote Post Goto Top
 
Casey
Member Avatar
Casey

hey halo idiats stop hijacking thread rofal

[img]http://i21.photobucket.com/albums/b254/Jimbo007/FordXR6/DonatorXR.jpg[/img]


Selling sum1--better 70usd

Offline Profile Quote Post Goto Top
 
Subaruspeed
Member Avatar
2011 wrx

Tim|Owned
Sep 24 2009, 02:31 AM
laid backk
Sep 23 2009, 09:21 PM
its something randomize timer and make it loop i forget how 2 do it try this...?


Private Sub Form_Activate
Randomize Timer
For x=1 to 100
Print  Rnd
Next x
End Sub

wat why would i use a randomized timer for adding minutes and seconds to a label

wouldn't work anyways i want the button that i'm coding under to do the work not another object

this will let you count down or make a timer
I BUY ALL BULK MILLS .40 CENTS EACH /QUERY MAZDASPEED



[img]http://img225.imageshack.us/img225/6788/110925142410.png[/img]

maxed.jpg


[img]http://img853.imageshack.us/img853/338/tomlaiddd.png[/img]

IN MY CAR i GOT 2 VTEC I CALL IT DUBTEC

[img]http://i.imgur.com/S1gJz.png[/img]
Offline Profile Quote Post Goto Top
 
Tim
7-4

laid backk
Sep 23 2009, 09:42 PM
Tim|Owned
Sep 24 2009, 02:31 AM
laid backk
Sep 23 2009, 09:21 PM
its something randomize timer and make it loop i forget how 2 do it try this...?


Private Sub Form_Activate
Randomize Timer
For x=1 to 100
Print  Rnd
Next x
End Sub

wat why would i use a randomized timer for adding minutes and seconds to a label

wouldn't work anyways i want the button that i'm coding under to do the work not another object

this will let you count down or make a timer

ya i don't wanna make a timer/count down lol i want the minutes+seconds a user inputs to be added into a lblTotal where they are then converted into a HH:MM:SS format, and those minutes and seconds keep on adding up


so let's say they put in 1:30

it will show up as 00:01:30

they put in 1:30 again

lblTotal will now be

00:03:00

and it keeps going

Posted Image

I knew that you wouldn't change, but I bit my tongue and swore,
Resigned myself to carry on despite you.
But you would not match my stride and cried,
"Foul! Foul! How could you expect me to care about somebody else?"
And after all, who would expect anything else from you?


lmao wats up friend - SKOTTY
Offline Profile Quote Post Goto Top
 
Subaruspeed
Member Avatar
2011 wrx

Tim|Owned
Sep 24 2009, 02:45 AM
laid backk
Sep 23 2009, 09:42 PM
Tim|Owned
Sep 24 2009, 02:31 AM
laid backk
Sep 23 2009, 09:21 PM
its something randomize timer and make it loop i forget how 2 do it try this...?


Private Sub Form_Activate
Randomize Timer
For x=1 to 100
Print  Rnd
Next x
End Sub

wat why would i use a randomized timer for adding minutes and seconds to a label

wouldn't work anyways i want the button that i'm coding under to do the work not another object

this will let you count down or make a timer

ya i don't wanna make a timer/count down lol i want the minutes+seconds a user inputs to be added into a lblTotal where they are then converted into a HH:MM:SS format, and those minutes and seconds keep on adding up


so let's say they put in 1:30

it will show up as 00:01:30

they put in 1:30 again

lblTotal will now be

00:03:00

and it keeps going

Private Function SecondsToTime(byval dSeconds as Double) _
as String
SecondsToTime = Format(DateAdd("s", dSeconds, "00:00:00"), "HH:mm:ss")
End Function
I BUY ALL BULK MILLS .40 CENTS EACH /QUERY MAZDASPEED



[img]http://img225.imageshack.us/img225/6788/110925142410.png[/img]

maxed.jpg


[img]http://img853.imageshack.us/img853/338/tomlaiddd.png[/img]

IN MY CAR i GOT 2 VTEC I CALL IT DUBTEC

[img]http://i.imgur.com/S1gJz.png[/img]
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Fully Featured & Customizable Free Forums
Learn More · Register Now
Go to Next Page
« Previous Topic · Old Debate · Next Topic »
Add Reply
  • Pages:
  • 1