vb .net private declaration

Posted on 2004-11-23
Last Modified: 2008-01-09
i want to use the following code to get the time in microseconds,
i am using it from

but when i declare the below following lines in my module console application,

      Declare Function QueryPerformanceCounter Lib "Kernel32" _
                                 (X As Currency) As Boolean
      Declare Function QueryPerformanceFrequency Lib "Kernel32" _
                                 (X As Currency) As Boolean

it gives the following error
Module1.vb(9): 'System.Currency' is not accessible in this context because it is 'Private'.

can anyone please help

let me post my code below for convinience
Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Text
Imports System.Threading
Module Module1

/////i want to declare here

    Declare Function GetTickCount Lib "kernel32" () As Integer

    Dim sendtime As Integer
    Dim temp As Integer
    Dim t As New Thread(AddressOf sendform)
    'Declare Another Thread and assign it to Bye
    Dim b As New Thread(AddressOf receiveform)
    Dim BeginTime As DateTime

blah blah blah
blah blah blah
blah blah blah

End Module


Question by:prashanth_gurijala
    LVL 5

    Accepted Solution

    The Currency datatype is not supported by VB.NET. Use Decimal or Long in VB.NET. I hope that will solve your problem.


    Author Comment

     but the above example in the windows msdn is in visual basic
    i am not sure hows that possible,
    thanx in advance,
    LVL 85

    Assisted Solution

    by:Mike Tomlinson
    The example you are referencing is for VB6 and below, not VB.Net.


    Author Comment

    thanx guys...

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    no14 challenge 14 46
    map interface methods 3 46
    Delphi Mdi application Child forms get behind control 7 71
    python sqlite question 11 23
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now