Click here to Skip to main content
15,900,108 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Is DateTime.Now property precise Pin
econy11-Apr-13 9:46
econy11-Apr-13 9:46 
GeneralRe: Is DateTime.Now property precise Pin
Kenneth Haugland11-Apr-13 9:52
mvaKenneth Haugland11-Apr-13 9:52 
AnswerRe: Is DateTime.Now property precise Pin
Eddy Vluggen11-Apr-13 9:42
professionalEddy Vluggen11-Apr-13 9:42 
GeneralRe: Is DateTime.Now property precise Pin
econy11-Apr-13 9:50
econy11-Apr-13 9:50 
GeneralRe: Is DateTime.Now property precise Pin
Eddy Vluggen11-Apr-13 9:52
professionalEddy Vluggen11-Apr-13 9:52 
AnswerRe: Is DateTime.Now property precise [solved] Pin
Dave Kreskowiak11-Apr-13 10:27
mveDave Kreskowiak11-Apr-13 10:27 
AnswerRe: Is DateTime.Now property precise [solved] Pin
Alan N11-Apr-13 13:23
Alan N11-Apr-13 13:23 
QuestionHow to create a new project to run a class [solved] Pin
econy11-Apr-13 8:47
econy11-Apr-13 8:47 
Read MSDN example:
VB
Imports System
Imports System.Diagnostics
Imports System.Threading

Class Program
    Shared Sub Main(ByVal args() As String)
        Dim stopWatch As New Stopwatch()
        stopWatch.Start()
        Thread.Sleep(10000)
        stopWatch.Stop()
        ' Get the elapsed time as a TimeSpan value. 
        Dim ts As TimeSpan = stopWatch.Elapsed
        ' Format and display the TimeSpan value. 
        Dim elapsedTime As String = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10)
        Console.WriteLine( "RunTime " + elapsedTime)
    End Sub 'Main
End Class 'Program


Then I try to create a new console project to test the example, when I build it, I got an error message: SubMain was not found in "testStopWatch.Module1".

According to the example, it should be a console project, but dont know why VSTUDIO need a module.

modified 11-Apr-13 15:34pm.

AnswerRe: How to create a new project to run a class Pin
Kenneth Haugland11-Apr-13 9:20
mvaKenneth Haugland11-Apr-13 9:20 
AnswerRe: How to create a new project to run a class Pin
Eddy Vluggen11-Apr-13 9:21
professionalEddy Vluggen11-Apr-13 9:21 
GeneralRe: How to create a new project to run a class Pin
Kenneth Haugland11-Apr-13 9:27
mvaKenneth Haugland11-Apr-13 9:27 
GeneralRe: How to create a new project to run a class Pin
Eddy Vluggen11-Apr-13 9:30
professionalEddy Vluggen11-Apr-13 9:30 
GeneralRe: How to create a new project to run a class Pin
Kenneth Haugland11-Apr-13 9:32
mvaKenneth Haugland11-Apr-13 9:32 
GeneralRe: How to create a new project to run a class Pin
Eddy Vluggen11-Apr-13 9:37
professionalEddy Vluggen11-Apr-13 9:37 
GeneralRe: How to create a new project to run a class Pin
Kenneth Haugland11-Apr-13 9:45
mvaKenneth Haugland11-Apr-13 9:45 
GeneralRe: How to create a new project to run a class Pin
Eddy Vluggen11-Apr-13 9:51
professionalEddy Vluggen11-Apr-13 9:51 
GeneralRe: How to create a new project to run a class Pin
econy11-Apr-13 9:33
econy11-Apr-13 9:33 
QuestionVB.Net timer function [solved] Pin
econy11-Apr-13 7:32
econy11-Apr-13 7:32 
AnswerRe: VB.Net timer function Pin
Eddy Vluggen11-Apr-13 8:07
professionalEddy Vluggen11-Apr-13 8:07 
AnswerRe: VB.Net timer function Pin
Richard Deeming11-Apr-13 8:09
mveRichard Deeming11-Apr-13 8:09 
AnswerRe: VB.Net timer function Pin
Dave Kreskowiak11-Apr-13 8:15
mveDave Kreskowiak11-Apr-13 8:15 
GeneralRe: VB.Net timer function Pin
econy11-Apr-13 8:27
econy11-Apr-13 8:27 
QuestionVB 2010 How to Find, counts and move selected same items on List View ? Pin
Yazid Aura Robbani11-Apr-13 6:33
professionalYazid Aura Robbani11-Apr-13 6:33 
QuestionRe: VB 2010 How to Find, counts and move selected same items on List View ? Pin
Eddy Vluggen11-Apr-13 8:09
professionalEddy Vluggen11-Apr-13 8:09 
QuestionHow to launch application from Microsoft.WindowsCE.Forms.MessageWindow Pin
Member 989133411-Apr-13 2:54
Member 989133411-Apr-13 2:54 

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.