Dim SomeInteger As Integer = 2000000000 'Not Long!!! Dim FormPointer As IntPtr = New IntPtr(SomeInteger)Caution: in the .NET framework the old Long data type is now Integer (32-bit). In .NET framework Long data type is 64-bit, i.e. in all API function declarations you should use Integer instead of Long. For example:
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _ ByVal hwnd As Integer, ByVal nIndex As Integer) As Integer
Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000) br>
VB (.NET) - what other language do you need in the whole Universe?...