Have I gone mad?

sjn78

Well-known member
Joined
May 4, 2003
Messages
255
Location
Australia
I am pretty sure that I added a DLL as a reference to a project once and I could user the DLL and get to its functions. I have VB.Net Standard 2002 if that is any help.

Im pretty sure I added User32.dll to it and then I could do something like this,

Start typing User32. and then the intellisense would kick in giving me a list of functions.

Should this happen or I might be thinking of something I did in another language.
 
I think it should work like that, could you tell me how you did it ? Is it Add reference then browse and select user32.dll ?

usually I use API functions like this:

Private Declare Function DestroyWindow Lib "user32" (ByVal hndw As Integer) As Boolean


first declare then use it.... I have never tried anything else so no help I guess.
 
Last edited by a moderator:
I tried adding it like you first stated, but you get the error its not a valid dll or something.

But I thought I did add it as a reference at some stage and it worked.

Must of been dreaming!
 
You cant reference standard DLLs like that. You have to import the functions like stated above or using the DllImport attribute.
 
This only works with ActiveX Dlls (or the newer .NET ones of course). Youre probably jsut confused with these older ones...
 
Back
Top