By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,786 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

How do you subclass a window or control in another application?

P: n/a
The other application is not necc a .Net application. May have been written
in C++ or whatever.

I have plenty of examples showing subclassing of a form within a vb.net app,
but nothing showing subclassing of a form outside of my vb.net app. Is it
the same? Can the .net .nativewindows class handle apps not written in
..Net?
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 2003-10-10, Jim Hubbard <1@2.com> wrote:
The other application is not necc a .Net application. May have been written
in C++ or whatever.

I have plenty of examples showing subclassing of a form within a vb.net app,
but nothing showing subclassing of a form outside of my vb.net app. Is it
the same? Can the .net .nativewindows class handle apps not written in
.Net?


You can't do process process hooking in .NET. Your going to need to
write a good old fashioned dll to do it. You'll want to take a look at
SetWindowsHookEx.

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2

P: n/a
So I'm stuck using something like Spyworks from Desaware or rolling my own
dll?

"Tom Shelton" <to*@mtogden.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
On 2003-10-10, Jim Hubbard <1@2.com> wrote:
The other application is not necc a .Net application. May have been written in C++ or whatever.

I have plenty of examples showing subclassing of a form within a vb.net app, but nothing showing subclassing of a form outside of my vb.net app. Is it the same? Can the .net .nativewindows class handle apps not written in
.Net?


You can't do process process hooking in .NET. Your going to need to
write a good old fashioned dll to do it. You'll want to take a look at
SetWindowsHookEx.

--
Tom Shelton
MVP [Visual Basic]

Nov 20 '05 #3

P: n/a
On 2003-10-10, Jim Hubbard <1@2.com> wrote:
So I'm stuck using something like Spyworks from Desaware or rolling my own
dll?


Pretty much. If your doing cross process work, then it has to be in a
standard dll.

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #4

P: n/a
Thanks for the help!

"Tom Shelton" <to*@mtogden.com> wrote in message
news:Ol**************@TK2MSFTNGP11.phx.gbl...
On 2003-10-10, Jim Hubbard <1@2.com> wrote:
So I'm stuck using something like Spyworks from Desaware or rolling my own dll?


Pretty much. If your doing cross process work, then it has to be in a
standard dll.

--
Tom Shelton
MVP [Visual Basic]

Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.