Click here to Skip to main content
15,898,134 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Variables not declared in private subs Pin
Christian Graus4-Oct-09 10:25
protectorChristian Graus4-Oct-09 10:25 
AnswerRe: Variables not declared in private subs Pin
The Man from U.N.C.L.E.5-Oct-09 7:01
The Man from U.N.C.L.E.5-Oct-09 7:01 
GeneralRe: Variables not declared in private subs Pin
Sezotove5-Oct-09 8:22
Sezotove5-Oct-09 8:22 
QuestionCalculating avarge time ?? Pin
Bob Beaubien3-Oct-09 5:59
Bob Beaubien3-Oct-09 5:59 
AnswerRe: Calculating avarge time ?? Pin
Abhishek Sur3-Oct-09 6:48
professionalAbhishek Sur3-Oct-09 6:48 
AnswerRe: Calculating avarge time ?? Pin
Dave Kreskowiak3-Oct-09 9:56
mveDave Kreskowiak3-Oct-09 9:56 
GeneralRe: Calculating avarge time ?? Pin
Bob Beaubien3-Oct-09 15:39
Bob Beaubien3-Oct-09 15:39 
GeneralRe: Calculating avarge time ?? Pin
Dave Kreskowiak4-Oct-09 2:20
mveDave Kreskowiak4-Oct-09 2:20 
You convert a string in a TextBox to a TimeSpan using:
Dim timeIntervals(5) As TimeSpan
' 5 hours, 21 minutes, 40 seconds
TimeSpan.TryParse("5:21:40", timeIntervals(0))

You can add all of the time intervals together like this:
Dim avgTime As New TimeSpan
For i As Integer = 0 to 4
    avgTime = avgTime.Add(time(i))
Next

And then average the times:
avgTime = New TimeSpan(avgTime.Ticks / 5)



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




QuestionButton more then one click Pin
Bob Beaubien2-Oct-09 18:45
Bob Beaubien2-Oct-09 18:45 
AnswerRe: Button more then one click Pin
dan!sh 2-Oct-09 19:26
professional dan!sh 2-Oct-09 19:26 
AnswerRe: Button more then one click Pin
Abhishek Sur3-Oct-09 6:58
professionalAbhishek Sur3-Oct-09 6:58 
QuestionDate Value into the Database!!! Pin
jeshra2792-Oct-09 9:06
jeshra2792-Oct-09 9:06 
AnswerRe: Date Value into the Database!!! Pin
drinkmasters2-Oct-09 9:18
drinkmasters2-Oct-09 9:18 
AnswerRe: Date Value into the Database!!! Pin
Luc Pattyn2-Oct-09 9:34
sitebuilderLuc Pattyn2-Oct-09 9:34 
AnswerRe: Date Value into the Database!!! Pin
Henry Minute2-Oct-09 10:15
Henry Minute2-Oct-09 10:15 
AnswerRe: Date Value into the Database!!! Pin
Christian Graus2-Oct-09 11:18
protectorChristian Graus2-Oct-09 11:18 
AnswerRe: Date Value into the Database!!! Pin
Md. Marufuzzaman4-Oct-09 4:13
professionalMd. Marufuzzaman4-Oct-09 4:13 
QuestionReading a file on a network drive Pin
rbc10252-Oct-09 4:05
rbc10252-Oct-09 4:05 
AnswerRe: Reading a file on a network drive Pin
Ian Shlasko2-Oct-09 4:17
Ian Shlasko2-Oct-09 4:17 
GeneralRe: Reading a file on a network drive Pin
rbc10252-Oct-09 16:13
rbc10252-Oct-09 16:13 
GeneralRe: Reading a file on a network drive Pin
Md. Marufuzzaman4-Oct-09 4:17
professionalMd. Marufuzzaman4-Oct-09 4:17 
AnswerRe: Reading a file on a network drive Pin
Dave Kreskowiak2-Oct-09 4:25
mveDave Kreskowiak2-Oct-09 4:25 
GeneralRe: Reading a file on a network drive Pin
rbc10252-Oct-09 16:10
rbc10252-Oct-09 16:10 
QuestionHow can I list a directory into a listBox and view its content OnClick inside the listBox? Pin
waner michaud2-Oct-09 3:35
waner michaud2-Oct-09 3:35 
AnswerRe: How can I list a directory into a listBox and view its content OnClick inside the listBox? Pin
Dave Kreskowiak2-Oct-09 4:22
mveDave Kreskowiak2-Oct-09 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.