From: Armin Zingler on
Am 09.03.2010 14:06, schrieb Marc Hillman:
> So how does one find the .dot version of (say) FindWindow?

The dotdot version? ;) Well, experience. If you know the
class library, you know (almost) where to look for it.
Or I try to imagine the dotnet name of the function and
use "symbol search" in the IDE. Or ask somebody.

With "FindWindow" I think it's not anywhere in the class lib.
Therefore I declare it. I guess it's not there because
dotnet is more like a high level application development
approach (I'm not going to discuss this). That also means
using the built-in IPC methods (which doesn't include finding a
window from a different application), and why find a window
in your own application? Did you lose it before? You work with
references, so...
Don't know if I made myself clear.

Also look at:
http://msdn.microsoft.com/en-us/library/aa302340.aspx

Unfortunatelly there doesn't seem to be an updated version.



--
Armin
From: Herfried K. Wagner [MVP] on
Marc --

Am 09.03.2010 11:45, schrieb Marc Hillman:
> What is the easiest/recommended way to access the Win32 API from VB
> Studio Express? I assumed it would be a simple matter of Imports Win32,
> or something similar and the whole API would be exposed. Surely I don't
> have to Declare every API function I call individually? I just want to
> do things like FindWindow, GetForegroundWindow and SendMessage. There
> are also a gazillion constants like WM_CHAR et al, that I would have
> thought were predefined somewhere.

This tool may help:

clrinterop - Release: PInvoke Interop Assistant
<URL:http://clrinterop.codeplex.com/releases/view/14120>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
First  |  Prev  | 
Pages: 1 2
Prev: Some concepts of OOP.
Next: withevents and arrays