Click here to Skip to main content
15,892,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDrag and drop a file onto form and read at runtime? (vb .net) Pin
daxfrost10-May-07 12:29
daxfrost10-May-07 12:29 
QuestionHow to add clock timer to listview column in vb6? Pin
method00710-May-07 7:36
method00710-May-07 7:36 
AnswerRe: How to add clock timer to listview column in vb6? Pin
nlarson1110-May-07 8:11
nlarson1110-May-07 8:11 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00710-May-07 9:31
method00710-May-07 9:31 
GeneralRe: How to add clock timer to listview column in vb6? Pin
nlarson1110-May-07 9:36
nlarson1110-May-07 9:36 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00710-May-07 9:55
method00710-May-07 9:55 
GeneralRe: How to add clock timer to listview column in vb6? Pin
nlarson1110-May-07 10:26
nlarson1110-May-07 10:26 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00710-May-07 11:04
method00710-May-07 11:04 
I placed "private mStartDate As Double = Now.Ticks: inside a module.

Then i added timer to the form an set its interval to 1000.Then i added following code:

<br />
Private Sub Form_Load()<br />
<br />
    <br />
     Timer2.Interval = 1000 ' <-- 10 seconds<br />
    Timer2.Enabled = True<br />
End Sub<br />
<br />
Private Sub Timer2_Timer()<br />
Static lngMin As Long<br />
<br />
    lngMin = lngMin + 1<br />
    <br />
    'every 2nd timer tick reload the listview<br />
    If lngMin Mod 2 Then<br />
      <br />
        Dim s As String = TimeSpan.FromTicks(Now.Ticks - mStartDate).ToString<br />
ListView1.ListItems(1).ListSubItems(4).Text = s.Substring(0, s.IndexOf("."))<br />
<br />
    End If<br />
<br />
End Sub<br />
<br />


then i get compile error :

Expected: end of statement

pointing at:

private mStartDate As Double = Now.Ticks
GeneralRe: How to add clock timer to listview column in vb6? Pin
nlarson1110-May-07 11:10
nlarson1110-May-07 11:10 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00710-May-07 11:18
method00710-May-07 11:18 
GeneralRe: How to add clock timer to listview column in vb6? [modified] Pin
nlarson1111-May-07 11:18
nlarson1111-May-07 11:18 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00711-May-07 19:48
method00711-May-07 19:48 
GeneralRe: How to add clock timer to listview column in vb6? Pin
nlarson1112-May-07 1:32
nlarson1112-May-07 1:32 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00712-May-07 1:40
method00712-May-07 1:40 
GeneralRe: How to add clock timer to listview column in vb6? Pin
nlarson1112-May-07 1:45
nlarson1112-May-07 1:45 
GeneralRe: How to add clock timer to listview column in vb6? Pin
method00712-May-07 1:49
method00712-May-07 1:49 
QuestionMilliseconds to Minutes Pin
Stigmurder10-May-07 6:19
Stigmurder10-May-07 6:19 
AnswerRe: Milliseconds to Minutes Pin
Dave Kreskowiak10-May-07 6:33
mveDave Kreskowiak10-May-07 6:33 
GeneralRe: Milliseconds to Minutes Pin
Stigmurder10-May-07 7:19
Stigmurder10-May-07 7:19 
JokeRe: Milliseconds to Minutes Pin
CPallini10-May-07 9:03
mveCPallini10-May-07 9:03 
GeneralRe: Milliseconds to Minutes Pin
Dave Kreskowiak10-May-07 10:42
mveDave Kreskowiak10-May-07 10:42 
QuestionVB6 Int() Function Pin
Marcus J. Smith10-May-07 5:05
professionalMarcus J. Smith10-May-07 5:05 
AnswerRe: VB6 Int() Function Pin
Dave Kreskowiak10-May-07 5:17
mveDave Kreskowiak10-May-07 5:17 
GeneralRe: VB6 Int() Function [modified] Pin
Marcus J. Smith10-May-07 5:26
professionalMarcus J. Smith10-May-07 5:26 
GeneralRe: VB6 Int() Function Pin
Dave Kreskowiak10-May-07 6:28
mveDave Kreskowiak10-May-07 6:28 

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.