Click here to Skip to main content
15,885,278 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionEmail Host Pin
The ANZAC19-Feb-07 18:47
The ANZAC19-Feb-07 18:47 
AnswerRe: Email Host Pin
Christian Graus19-Feb-07 19:07
protectorChristian Graus19-Feb-07 19:07 
GeneralRe: Email Host Pin
The ANZAC19-Feb-07 19:30
The ANZAC19-Feb-07 19:30 
GeneralRe: Email Host Pin
The ANZAC19-Feb-07 20:03
The ANZAC19-Feb-07 20:03 
QuestionDatagrid in vb.net Pin
Pertik Garg19-Feb-07 18:16
Pertik Garg19-Feb-07 18:16 
AnswerRe: Datagrid in vb.net Pin
GoodID19-Feb-07 21:10
GoodID19-Feb-07 21:10 
AnswerRe: Datagrid in vb.net Pin
NanaAM20-Feb-07 0:54
NanaAM20-Feb-07 0:54 
QuestionReset an integer Pin
rudemusik19-Feb-07 15:38
rudemusik19-Feb-07 15:38 
Hello all!

I can't beleive I can't get this, but here it goes. I want to reset a integer number that used for a time. So at the top I have

Public mysec As Integer = 15
Then I have this for my timer
Private Sub tmrGame_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrGame.Tick<br />
        Threading.Thread.SpinWait(1000)<br />
        mysec = mysec - 1<br />
        lblcdClock.Text = ":" & mysec<br />
        If mysec > 15 Then<br />
            mysec = 0<br />
        End If<br />
        If mysec = -1 Then<br />
            tmrGame.Stop()<br />
            lblcdClock.Text = ":" & 0<br />
            Threading.Thread.Sleep(2000)<br />
            lblcdClock.Text = ":" & 15<br />
               End If<br />
    End Sub


How can I reset "mysec" to 15 so when the time stops, and I start it agin, it start from 15? Using VS 2003.

Thanks!

Rudy
AnswerRe: Reset an integer Pin
Christian Graus19-Feb-07 19:10
protectorChristian Graus19-Feb-07 19:10 
GeneralRe: Reset an integer Pin
rudemusik20-Feb-07 13:20
rudemusik20-Feb-07 13:20 
GeneralRe: Reset an integer Pin
TwoFaced20-Feb-07 18:32
TwoFaced20-Feb-07 18:32 
GeneralRe: Reset an integer Pin
rudemusik21-Feb-07 5:31
rudemusik21-Feb-07 5:31 
AnswerRe: Reset an integer Pin
lucky.prem19-Feb-07 20:03
lucky.prem19-Feb-07 20:03 
GeneralRe: Reset an integer Pin
rudemusik20-Feb-07 13:28
rudemusik20-Feb-07 13:28 
QuestionRead last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:10
bodobe19-Feb-07 10:10 
AnswerRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:14
professionalMarcus J. Smith19-Feb-07 10:14 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:23
bodobe19-Feb-07 10:23 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:29
professionalMarcus J. Smith19-Feb-07 10:29 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe19-Feb-07 10:40
bodobe19-Feb-07 10:40 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith19-Feb-07 10:47
professionalMarcus J. Smith19-Feb-07 10:47 
AnswerRe: Read last line of logfile and close file immediately Pin
TwoFaced19-Feb-07 13:06
TwoFaced19-Feb-07 13:06 
GeneralRe: Read last line of logfile and close file immediately Pin
bodobe20-Feb-07 20:43
bodobe20-Feb-07 20:43 
GeneralRe: Read last line of logfile and close file immediately Pin
TwoFaced20-Feb-07 21:32
TwoFaced20-Feb-07 21:32 
GeneralRe: Read last line of logfile and close file immediately Pin
Marcus J. Smith23-Feb-07 5:20
professionalMarcus J. Smith23-Feb-07 5:20 
QuestionVB6.0 - Common Dialog "ShowSave" method to get a Folder? Pin
ChemmieBro19-Feb-07 9:55
ChemmieBro19-Feb-07 9:55 

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.