?
Solved

vb .net private declaration

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

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q172/3/38.asp&NoWebContent=1


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
Imports System.management
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


__________________________________________________________

thanx,
prashanth
0
Comment
Question by:prashanth_gurijala
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
KarcOrigin earned 1200 total points
ID: 12661341
Hi,
The Currency datatype is not supported by VB.NET. Use Decimal or Long in VB.NET. I hope that will solve your problem.

Cheers!
0
 

Author Comment

by:prashanth_gurijala
ID: 12661370
Thanx,
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q172/3/38.asp&NoWebContent=1
 but the above example in the windows msdn is in visual basic
i am not sure hows that possible,
thanx in advance,
prashanth
0
 
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 800 total points
ID: 12661730
The example you are referencing is for VB6 and below, not VB.Net.

~IM
0
 

Author Comment

by:prashanth_gurijala
ID: 12661828
thanx guys...
--prashanth
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
Starting up a Project

864 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