What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » ShowWindow does not work in Windows 7

Pages: (2): « First [ 1 ] 2 » Last »
ShowWindow does not work in Windows 7
Author: Message:
RicardO.sys
New Member
*

Avatar
RicardO.sys

Posts: 6
33 / Male / Flag
Joined: Aug 2008
O.P. ShowWindow does not work in Windows 7
I have a script that works perfectly in Windows XP, but does not work in Windows 7.
Here's the problem with the code.

code:
Interop.Call("User32.dll", "ShowWindow", ChatWnd.Handle, 0);

I'm using the event

code:
OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)

what should I do to make this function working again?
12-18-2011 12:14 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ShowWindow does not work in Windows 7
What error are you getting in the debugger because it works here without a problem.
12-19-2011 01:07 AM
Profile E-Mail PM Find Quote Report
RicardO.sys
New Member
*

Avatar
RicardO.sys

Posts: 6
33 / Male / Flag
Joined: Aug 2008
O.P. RE: ShowWindow does not work in Windows 7
does not appear any error in the debugger ...
can it be for some of the system security policy ?
or also something about the conversations are in tab instead of separate windows ?
12-19-2011 02:48 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ShowWindow does not work in Windows 7
Post the full code and let me have a look at it.

ShowWindow does work in Windows 7 and there isn't a security policy that will affect the function of an API.

When you post the code use the following tags:
[code=js][/code]
12-19-2011 03:12 PM
Profile E-Mail PM Find Quote Report
RicardO.sys
New Member
*

Avatar
RicardO.sys

Posts: 6
33 / Male / Flag
Joined: Aug 2008
O.P. RE: ShowWindow does not work in Windows 7
Javascript code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
  Interop.Call("User32.dll", "ShowWindow", ChatWnd.Handle, 0);
}


I've tried a few variations and nothing.
the window gets to hang for a few 10s, but after this time it unlocks and not some.

* sorry the english, is the google translator rsrsrs
12-19-2011 03:31 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ShowWindow does not work in Windows 7
Try something along these lines since you are using tabbed chats.

Javascript code:
var SW_HIDE = 0;
var GA_PARENT = 1;
 
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
    Interop.Call('user32', 'ShowWindow', Interop.Call('user32', 'GetAncestor', ChatWnd.Handle, GA_PARENT), SW_HIDE);
}

12-19-2011 03:36 PM
Profile E-Mail PM Find Quote Report
RicardO.sys
New Member
*

Avatar
RicardO.sys

Posts: 6
33 / Male / Flag
Joined: Aug 2008
O.P. RE: RE: ShowWindow does not work in Windows 7
quote:
Originally posted by matty
Try something along these lines since you are using tabbed chats.

Javascript code:
var SW_HIDE = 0;
var GA_PARENT = 1;
 
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
    Interop.Call('user32', 'ShowWindow', Interop.Call('user32', 'GetAncestor', ChatWnd.Handle, GA_PARENT), SW_HIDE);
}



the window is stuck and will not display anything, it's just the mold and does not disappear
12-19-2011 03:46 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ShowWindow does not work in Windows 7
quote:
Originally posted by RicardO.sys
quote:
Originally posted by matty
Try something along these lines since you are using tabbed chats.

Javascript code:
var SW_HIDE = 0;
var GA_PARENT = 1;
 
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {
    Interop.Call('user32', 'ShowWindow', Interop.Call('user32', 'GetAncestor', ChatWnd.Handle, GA_PARENT), SW_HIDE);
}



the window is stuck and will not display anything, it's just the mold and does not disappear
Ok then it is a limitation of tabbed chats. However... you could try and mimic the menu press to undock the window and then hide it. That is really your only option in this scenario I do believe.
12-19-2011 03:48 PM
Profile E-Mail PM Find Quote Report
RicardO.sys
New Member
*

Avatar
RicardO.sys

Posts: 6
33 / Male / Flag
Joined: Aug 2008
O.P. RE: ShowWindow does not work in Windows 7
Thank you friend, changing value the variable GA_PARENT to 2, it worked \o/
12-19-2011 03:59 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ShowWindow does not work in Windows 7
quote:
Originally posted by RicardO.sys
Thank you friend, changing value the variable GA_PARENT to 2, it worked \o/
Ok that is great.

The different values GetAncestor accepts can be located here: http://msdn.microsoft.com/en-us/library/windows/d...3502(v=vs.85).aspx.

The reason you were having a problem is because in a tabbed chat grouping the ChatWindow has a different parent.
12-19-2011 04:03 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On