Re: How do I find and use the window handle of an external application?
- From: erewhon@xxxxxxxxxx (J French)
- Date: Wed, 12 Apr 2006 10:47:24 GMT
On Wed, 12 Apr 2006 01:42:26 +0200, "Vic Joseph"
<vic_ngreply@xxxxxxxxx> wrote:
It's all right for you guys to laugh, but here I am practically a beginner
in modern programming and I'm still in trouble. (I did some programming in
Assembler about thirty years ago, but since then I have had a life.) Most of
the things I can find on the Web are simply too complicated for my 8-bit
brain. All I want to do is find the height and width of a particular window
and its client area, preferably in two or less lines of code. (More
laughter?)
The laughter is actually bitterness
- MS are trashing our code assets, and when we protest they release PR
stuff that suggests we are a bunch of whingeing plonkers
What you want is very easy in VB5 or VB6
- first you Find the Window - the FindWindow API is good for that
- then you check it is the right one
- then you use GetClientRect
I could run this up for you in a few minutes using VB Classic
- as could most people here
- it would be a bit more than two lines, but not that much code
However I've no idea how to do it in B# (the proper name for VFred)
- but I do know from the basic principles of Windows that you do not
need to SubClass/Hook anything to get what you want
- if nothing else, knowing that is a blind alley will help you.
Try these NGs
news://msnews.microsoft.com/microsoft.public.dotnet.general
news://msnews.microsoft.com/microsoft.public.dotnet.languages.vb
news://msnews.microsoft.com/microsoft.public.vsnet.general
news://msnews.microsoft.com/microsoft.public.vstudio.general
news://msnews.microsoft.com/microsoft.public.vstudio.setup
news://msnews.microsoft.public.dotnet.languages.vb.upgrade
news://msnews.microsoft.public.dotnet.languages.vb.controls
news://msnews.microsoft.public.dotnet.languages.vb.data
.
- Follow-Ups:
- References:
- How do I find and use the window handle of an external application?
- From: Vic Joseph
- Re: How do I find and use the window handle of an external application?
- From: Ken Halter
- Re: How do I find and use the window handle of an external application?
- From: Vic Joseph
- Re: How do I find and use the window handle of an external application?
- From: Karl E. Peterson
- Re: How do I find and use the window handle of an external application?
- From: Ken Halter
- Re: How do I find and use the window handle of an external application?
- From: Karl E. Peterson
- Re: How do I find and use the window handle of an external application?
- From: Vic Joseph
- How do I find and use the window handle of an external application?
- Prev by Date: Re: Round text
- Next by Date: Re: How do I find and use the window handle of an external application?
- Previous by thread: Re: How do I find and use the window handle of an external application?
- Next by thread: Re: How do I find and use the window handle of an external application?
- Index(es):