Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: SAVING PRINTDOCUMENT/PRINT PREVIEW ?? Pin
Christian Graus9-Mar-08 23:34
protectorChristian Graus9-Mar-08 23:34 
GeneralRe: SAVING PRINTDOCUMENT/PRINT PREVIEW ?? Pin
vbbeg13-Mar-08 4:25
vbbeg13-Mar-08 4:25 
QuestionVS 2005 resources problem? Pin
Benny_Lava9-Mar-08 21:25
Benny_Lava9-Mar-08 21:25 
GeneralRe: VS 2005 resources problem? Pin
Christian Graus10-Mar-08 10:19
protectorChristian Graus10-Mar-08 10:19 
GeneralRich Text Box, cursor follow input Pin
Jeffness9-Mar-08 20:51
Jeffness9-Mar-08 20:51 
GeneralRe: Rich Text Box, cursor follow input Pin
Dave Kreskowiak11-Mar-08 7:53
mveDave Kreskowiak11-Mar-08 7:53 
Questionhow to put a time counter in my vb.net project? Pin
Rharzkie9-Mar-08 20:43
Rharzkie9-Mar-08 20:43 
AnswerRe: how to put a time counter in my vb.net project? Pin
John_Adams9-Mar-08 21:04
John_Adams9-Mar-08 21:04 
Hi,

Please try the following code snippet which uses a Timer Control (Timer1), one label (lblLogin) and two button (btnLogin and btnBreak). Drag and drop above mention .Net control and give name accordingly (as mentioned in the parenthesis) and paste the following code snippet:
-------------------------------------------------------------------------
BEGIN CODE

Public Class Form1

Dim tmr1 As Integer
Dim timerString As String
Dim seconds, minutes, hours As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Me.lbldate.Text = Format(Now(), "dddd, MMM dd yyyy")
'Me.btnLogin.Enabled = False
Me.AcceptButton = btnLogin
Me.Timer1.Start()
'
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'Me.lblLogin.Text = Format(Now(), "hh:mm:ss")

'tmr1 = tmr1 + 1
'timerString = tmr1
seconds += 1
If seconds = 60 Then
minutes += 1
seconds = 0
End If
If minutes = 60 Then
hours += 1
minutes = 0
End If
timerString = hours & ":"
timerString = timerString & minutes & ":"
timerString = timerString & seconds
Me.lblLogin.Text = timerString

End Sub

Private Sub btnBreak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBreak.Click

Me.Timer1.Stop()
End Sub

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click

Me.Timer1.Start()
End Sub

END CODE
-------------------------------------------------------------------------

I hope this helps Smile | :) .

Regards,
John Adams
ComponentOne LLC

GeneralRe: how to put a time counter in my vb.net project? Pin
Rharzkie9-Mar-08 23:00
Rharzkie9-Mar-08 23:00 
GeneralRe: how to put a time counter in my vb.net project? Pin
Guffa9-Mar-08 23:05
Guffa9-Mar-08 23:05 
GeneralRe: how to put a time counter in my vb.net project? Pin
Rharzkie9-Mar-08 23:31
Rharzkie9-Mar-08 23:31 
Questionhelp. to include flash in vb.net form? Pin
jomet9-Mar-08 17:29
jomet9-Mar-08 17:29 
AnswerRe: help. to include flash in vb.net form? Pin
C1AllenS9-Mar-08 19:02
C1AllenS9-Mar-08 19:02 
GeneralRe: help. to include flash in vb.net form? Pin
jomet9-Mar-08 21:55
jomet9-Mar-08 21:55 
GeneralRe: help. to include flash in vb.net form? Pin
jomet9-Mar-08 22:02
jomet9-Mar-08 22:02 
Generalstoring images into DB Pin
Aamir Mustafa9-Mar-08 2:30
Aamir Mustafa9-Mar-08 2:30 
GeneralRe: storing images into DB Pin
pmarfleet9-Mar-08 4:05
pmarfleet9-Mar-08 4:05 
GeneralRe: storing images into DB Pin
Christian Graus9-Mar-08 11:11
protectorChristian Graus9-Mar-08 11:11 
GeneralRe: storing images into DB Pin
Paul Conrad9-Mar-08 11:53
professionalPaul Conrad9-Mar-08 11:53 
GeneralRe: storing images into DB Pin
Paul Conrad9-Mar-08 11:51
professionalPaul Conrad9-Mar-08 11:51 
GeneralPlease help: BlueTooth and visual studio.net Pin
Jason Wucinski8-Mar-08 22:35
Jason Wucinski8-Mar-08 22:35 
GeneralRe: Please help: BlueTooth and visual studio.net Pin
Christian Graus8-Mar-08 22:46
protectorChristian Graus8-Mar-08 22:46 
GeneralRe: Please help: BlueTooth and visual studio.net Pin
Jason Wucinski8-Mar-08 22:56
Jason Wucinski8-Mar-08 22:56 
GeneralRe: Please help: BlueTooth and visual studio.net Pin
Christian Graus8-Mar-08 23:54
protectorChristian Graus8-Mar-08 23:54 
GeneralRe: Please help: BlueTooth and visual studio.net Pin
Jason Wucinski9-Mar-08 1:51
Jason Wucinski9-Mar-08 1:51 

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.