What are you looking to do with this timer? Your post doesn't make any sense as "timer.now()" is meaningless. There is no "Now()" property or method on any of the Timer classes.
There are various types of timers in the .NET Framework, each is designed to handle different situations, but I don't think that's what you're trying to do.
If you're talking about starting a stopwatch and getting an elapsed time at various points in a process, then you use the Stopwatch class. To get your interval times, you just get the value in the Stopwatch.Elapsed, Stopwatch.EllapsedMilliseconds, or EllapsedTicks properties. You don't have to stop the stopwatch to do that.
I created an application for Windows CE 5.0 in VB. The class application AppCEClass is inherited from Microsoft.WindowsCE.Forms.MessageWindow. I have a problem to launch an application, because something like this does not work:
Public Shared Sub Main()
Windows does not recognize the class name and throw error AppCEClass() cannot be converted on System.Windows.Forms.Form.
I am doing program in VB for Windows CE 5.0. I need to catch messages from other programs in VB window. In VB is defined a function WndProc. But, this function does not work (or exist) on CE. Compiler cannot recognize it.
ProtectedOverridesSub WndProc(ByRef recWinMessage As Microsoft.WindowsCE.Forms.Message)
I tried to read an article, but I didn't find anything helpful. Problem is, that I am using VB for Windows CE and there is not supported WndProc. What can I do?
This is a fragment of code. What I am doing wrong? WndProc cannot be recognized od VB for Window CE.
<DllImport("coredll.dll", SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
<DllImport("coredll.dll", SetLastError:=True, CharSet:=CharSet.Auto)> Private Shared Function SendMessage( _
ByVal hwnd As IntPtr, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32
<DllImport("coredll.dll", SetLastError:=True)> _
Private Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As WndProc) As Integer
Public Shared Sub Main2()
Dim ip As IntPtr
ip = FindWindow(vbNullString, "Kvant 1.0")
If (ip <> 0) Then
SendMessage(ip, &H10, 0, 0)
Dim GWL_WNDPROC As Long = -4
Dim lpPrevWndProc As Integer
Public Function SubClass(ByVal lHwnd As Long) As Boolean
lpPrevWndProc = SetWindowLong(lHwnd, GWL_WNDPROC, AddressOf WndProc)
Protected Overrides Sub WndProc(ByRef recWinMessage As Microsoft.WindowsCE.Forms.Message)
Shared Sub Main()
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-18 7:44