PDA

Click to See Complete Forum and Search --> : API in VB.Net


DaveAMS
Aug 24th, 2001, 02:28 PM
Where did you read this article? If it's online, could you post the URL?

The API isn't going anywhere, unless Microsoft revises their OS's. API dll's don't ship with Visual Basic, they aren't an add-on or an afterthought. These are the guts of the windows operating system. This is the same code that windows uses to do it's thing, made available to all of us. (Isn't Microsoft swell?)

It is entirely possible that VB.net is providing a new/different way to access the API dll's. (I haven't read much on it) I *hope* that they maintain reverse-compatibility with the declare statement.

Serge
Aug 24th, 2001, 02:40 PM
You can still easilly use APIs in VB.NET
Pretty much the sam way you do it now.

fntzlnd
Aug 24th, 2001, 10:36 PM
This is an article I found at allapi.net

VB.NET
The heavily discussed (and perhaps feared) VB.NET is on its way!
This is probably the biggest update to VB ever, so it's a good idea to take a head start.

API's belong to the past with VB.NET. You won't need most of them anymore, because the Common Language Runtime (CLR) provides this functionality and much more.

In this list, we're going to try to provide a .NET alternative for the API functions you used to use in VB5/6.
Do note that this list is based on preliminary documentation, so it is subject to change.

Also note that you still can use API functions in your .NET applications. Here's a little VB.NET example that explains how to call the GetTickCount function:

'Import the System class (for the Console)
Imports System
Public Module modmain
'Declare the function.
'Longs are converted to Integers in VB.NET
Declare Function GetTickCount Lib "kernel32" () as Integer
Sub Main()
'Call the function, convert the result to a string
'and show that string on the screen
Console.WriteLine(GetTickCount.ToString)
End Sub
End Module

Although API's are still supported, it is certainly not the best way to program in VB.NET.

fntzlnd
Aug 24th, 2001, 10:37 PM
Also, for those of you that have not used VB.net; I just installed Beta 2 on my Laptop and it is WAY different.... WAY different... and WAY awesome.

Heads Up.