Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Here I go again.... (windows states)


Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2002, 09:51 AM
Alvein's Avatar
Alvein Alvein is offline
Junior Contributor
 
Join Date: Aug 2002
Location: Iceland
Posts: 276
Unhappy Here I go again.... (windows states)


Hello....

I'm trying to make an app to detect when another apps are minimizing and maximizing. I made a custom window proc to detect the APPACTIVATE message, but sometimes it don't works. Some says I have to install a custom hook procedure, but reading on MSDN, I noted to detect systems messages from another threads, I must define my hook proc inside a DLL, and that's unaceptable for my requirements. Am I wrong, or what do you think I should do then?

I hope somebody can help me.

Thanx.
Reply With Quote
  #2  
Old 11-26-2002, 12:15 PM
reboot's Avatar
reboot reboot is offline
Keeper of foo

Retired Moderator
* Guru *
 
Join Date: Nov 2001
Location: Graceland
Posts: 15,612
Default

If that's unacceptable, I suppose you'll have to give up. That's how you do it.
__________________
~ Quod non mortiferum, fortiorem me facit ~

Avatar by lebb
Reply With Quote
  #3  
Old 11-26-2002, 02:01 PM
Gamer X's Avatar
Gamer X Gamer X is offline
Senior Contributor
 
Join Date: Jul 2001
Location: /dev/meow
Posts: 1,180
Default

Well, I was able to do something similar just now with the GetWindowPlacement API. I used a timer (though a loop would be better) that changed a label to Notepad's window status (min,max,norm). This code could easily be adapted to look through all open windows.

It's a bit of a stretch, but a viable alternative to a DLL.

Note: I just discovered this in trying to find an answer for this question, so I don't have experience with it, and may be doing something wrong. It looks allright to me though.

Attatched is what I got to work.

Arigato,
Gamer X
Attached Files
File Type: zip chkwinst.zip (1.6 KB, 5 views)
__________________
Webmaster, Senior Programmer, and all the rest at Gamer X Creations (currently offline)

Life would be much easier if I had the source code . . .
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->