Windows API in VB.Net

Dear All,

Q1)

In VB6, there are Win32API viewer for helping us to writing Windows API application.
In VB.Net, I can't find that tools now. If I want to write some program with WinAPI, how should I do

Q2)

After installed Platform SDK, I can use the new and platform api in VC++ program. I want to know How to use them in VB.Net

Thanks,

Kevin Tang.



Answer this question

Windows API in VB.Net

  • gayathri_100

    Then for the question 2.

    After download and install Platform SDK, it provide more API for VC++.Net.

    Then how to use them in VB.Net


  • Mike Bohlander

    I did find another site that was suggested here in a different post: http://www.pinvoke.net/index.aspx to be very helpful.
  • Eric Liprandi

    I strongly recommend this:

    http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html

    Please note that there are some considerations that you'll have to take into account.

    At the time these defintions were developed a Long was a 32 bit entity and an integer was a 16 bit entity (VB6).

    In the definitions... where you see Long you almost invariably want to change these to Integers.

    Also there are anytypes in these defintions as there were in all vb6 defintions. Every so often when you encounter these you're going to have to do a little more research for VS2005 to find a more specific datatype.



  • Gerhard Schneider - MSFT

    In general, just declare the API functions in the section below the "Windows Forms Designer generated code", and above your code/variables.

    Then you simply call them like you would any subroutine or function that you wrote yourself.

    Example: Check if another window is running or not

    Declaration:

  • sands_of_time

    A good site for checking what you need to change when upgrading code to .NET:

    http://www.thescarms.com/vbasic/VB6vsVBNet.asp

    Lists things like datatypes (Integer --> Short, and Long --> Integer) as well as other considerations.


  • Haplo Peart

    I would suggest that you look for the functionality you want in the framework before using an API. A lot of APIs have been built into the framework, it's just a matter of finding them. For example, the timGetTime API can be replaced with the My.Computer.Clock.TickCount. Again, just a suggestion.

    Thanks.


  • Lee Keel

  • JOJOthePYRO

    allapi.net used to be the place.
  • Windows API in VB.Net