GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.Plasma2002b wrote:idejsecrofkrad wrote: Private Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As Long
this will only work for my application only though, will it not? i mean, i cant get windows that my app didnt create.
IE: trying to get anything if my app's forms arnt active will only return a value of 0
I Made an AwayBox stand alone clone
Moderators: Big-O Ryan, Big-O Mark
- Master Jedi
- Guru
- Posts: 1161
- Joined: Sat Jun 15, 2002 10:34 pm
- Contact:
- Master Jedi
- Guru
- Posts: 1161
- Joined: Sat Jun 15, 2002 10:34 pm
- Contact:
Harra is mostly right about that. I meant nothing against you. It's just that Plasma has put a lot of work into his AMM and, as is rather obvious from all the code I've posted in this thread, I've done what I can to help him in his endeavor. As is the case with many other programmers, I hate to succumb.The J3w wrote:i just didnt like the comment made by idejsecrofkradbut yeah whatever, Good Luck Plasma with your programBy the time you come out with yours, Plasma's will be 100 times better, even if I have to write the code myself.
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
OK, aparently you know more about VB than i do, and ill openly admit that..... and ill just come out and say i cant figure out the GetActiveWindow thing. I can get it to tell me the handles of windows from my own application, but nothing else.... im only getting zero'sidejsecrofkrad wrote: GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.
As to the version of VB im running, when i boot it up, it says Enterprise edition. (6.0 of course) Now, the question is, is that a better or a worse version of vb from pro edition?
- Master Jedi
- Guru
- Posts: 1161
- Joined: Sat Jun 15, 2002 10:34 pm
- Contact:
hmm...you're right. It's not working for me either. I'll see what I can find out.Plasma2002b wrote:OK, aparently you know more about VB than i do, and ill openly admit that..... and ill just come out and say i cant figure out the GetActiveWindow thing. I can get it to tell me the handles of windows from my own application, but nothing else.... im only getting zero'sidejsecrofkrad wrote: GetActiveWindow should return the handle of whatever window has the focus, even if it's the start menu/task bar/system tray/other things that can have focus and aren't considered windows. In other words, it should work no matter what has the focus unless nothing has focus (which only happens when the NoDesktop system policy is enabled, all windows are closed, and a 3rd party program destroys, not hides, the taskbar). Are you using a version of VB less than VB Professional? Plain old VB and VB learning edition have limited functionality.
As to the version of VB im running, when i boot it up, it says Enterprise edition. (6.0 of course) Now, the question is, is that a better or a worse version of vb from pro edition?
- Master Jedi
- Guru
- Posts: 1161
- Joined: Sat Jun 15, 2002 10:34 pm
- Contact:
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
well..... things are pretty much back to standing now..... but i found out why i couldnt get it to work before.
basically it comes down to the fact that the program is based on the aim:goaway link, and heres whats happening...
i try to send out the command to go away, then get rid of the away window. but whats happening is that the window state command gets through before the aim:goaway link gets exectued. not in the code, but rather in the fact that AIM acts slower than my program. So what happens is that AMM sets the LAST away window to whatever state, and THEN AIM gets the new aim:goaway link and reinitiates the window. So whatever was done to the last away window, AIM just recovers it instantly.
I was thinkin on how i could for instance 'wait' until the new away message gets executed.... but im not sure how i would be able to tell....
im workin on a way that could set the title of the away box to something different every time, but this way would be very impracticle because any html in the away messages dont get shown.... so im lookin into alternatives here......
but if ya have any other ideas im open.
basically it comes down to the fact that the program is based on the aim:goaway link, and heres whats happening...
i try to send out the command to go away, then get rid of the away window. but whats happening is that the window state command gets through before the aim:goaway link gets exectued. not in the code, but rather in the fact that AIM acts slower than my program. So what happens is that AMM sets the LAST away window to whatever state, and THEN AIM gets the new aim:goaway link and reinitiates the window. So whatever was done to the last away window, AIM just recovers it instantly.
I was thinkin on how i could for instance 'wait' until the new away message gets executed.... but im not sure how i would be able to tell....
im workin on a way that could set the title of the away box to something different every time, but this way would be very impracticle because any html in the away messages dont get shown.... so im lookin into alternatives here......
but if ya have any other ideas im open.
- Master Jedi
- Guru
- Posts: 1161
- Joined: Sat Jun 15, 2002 10:34 pm
- Contact:
Ok...this is going to be tough. You're going to have to hook the window using either SetWindowsHookEx (UnhookWindowsHookEx or something like that to unhook) or SetWindowLong. You need to capture whatever message the window is recieving that makes it show again. This is really tough and I can't begin to post the code here. Plus I don't know what message you need your procedure to 'eat'.Plasma2002b wrote:well..... things are pretty much back to standing now..... but i found out why i couldnt get it to work before.
basically it comes down to the fact that the program is based on the aim:goaway link, and heres whats happening...
i try to send out the command to go away, then get rid of the away window. but whats happening is that the window state command gets through before the aim:goaway link gets exectued. not in the code, but rather in the fact that AIM acts slower than my program. So what happens is that AMM sets the LAST away window to whatever state, and THEN AIM gets the new aim:goaway link and reinitiates the window. So whatever was done to the last away window, AIM just recovers it instantly.
I was thinkin on how i could for instance 'wait' until the new away message gets executed.... but im not sure how i would be able to tell....
im workin on a way that could set the title of the away box to something different every time, but this way would be very impracticle because any html in the away messages dont get shown.... so im lookin into alternatives here......
but if ya have any other ideas im open.
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
DONE!idejsecrofkrad wrote: I don't see it as a feature on the list, so I'm going to suggest scheduled away messages. i.e. I tell it to put up the message ":-P" on January 22 at 3:52 am and it does exactly that.
lol.... version 2 is up now..... has just a couple features like the ability to edit the away message files with a click of a button, and also scheduled away messages.
the away message scheduler is really simply done. I was thinkin that i can add onto it later.
But yeah..... if yall wanna download v2, then just go to
http://www.schwippy.com/amm/
tell me if anything is broken or turned off again, lol..... i think i got it all this time tho
Last edited by Plasma2002b on Fri Jan 24, 2003 4:26 pm, edited 2 times in total.
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
- Plasma2002b
- Extreme Groupie
- Posts: 976
- Joined: Thu Jul 18, 2002 11:36 pm
- Location: Riverside, Ca
- Contact:
Ok..... seems my ISP just likes to mess with my head.... they boot me off for a few minutes or so and yeah.....
anyways....
http://www.schwippy.com/amm/
thats the site.... i put a link to upgrade instead of install all over again.
and kool, i dunno why it would say version 1 very odd..... try the upgrade maybe tho
anyways....
http://www.schwippy.com/amm/
thats the site.... i put a link to upgrade instead of install all over again.
and kool, i dunno why it would say version 1 very odd..... try the upgrade maybe tho
Who is online
Users browsing this forum: Bing [Bot] and 1 guest