Focusing a window - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Focusing a window (/showthread.php?tid=82362) Focusing a window by MeEtc on 03-14-2008 at 10:09 PM
I'm trying to set a opened window to be focused if the user tries to open a second window instead, so that only one window can be open at the same time. The problem I'm having, is that the variable I'm trying to work with doesn't appear to be a PlusWnd object, but I'm sure it is. code:openwnd is a global variable. Now, when this window is open and another is attempted to be opened... code:When this runs, I get: code:Line 24 is the second Debug statement. So, whats going on with the openwnd variable? And how to I set focus to it? RE: Focusing a window by vikke on 03-14-2008 at 10:24 PM
I would use the "BringWindowToTop" function in the Win32 API to get the window to front. code: RE: Focusing a window by MeEtc on 03-14-2008 at 10:30 PM Still doesn't explain why openwnd.Handle is not defined RE: Focusing a window by Spunky on 03-14-2008 at 10:58 PM Yays, Fixed it RE: Focusing a window by MeEtc on 03-14-2008 at 10:59 PM I was setting openwnd to the wrong createwnd command RE: RE: Focusing a window by vikke on 03-14-2008 at 11:13 PM
quote:I have no idea of any other parts of your code, so it's impossible to know without guessing. Anyway I'm glad it sorted out! |