Icon in title of windowed mode

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
dulapore
GamingTools Subscriber
Posts: 2
Joined: Mon Jan 12, 2009 11:36 am

Icon in title of windowed mode

Post by dulapore » Wed Jan 14, 2009 11:17 am

Is there any way to modify the Icon used in the title of the windowed mode? I play from work some, and it would be nice not to worry about someone recognizing the minimized tray icon. I don't have to worry about the text since it gets renamed to is1 etc.

I have it set to auto hide the taskbar, but when I get an IM message, Windows blinks and the taskbar pops up.

eccentric
GamingTools Subscriber
Posts: 7
Joined: Sat Aug 30, 2008 6:18 pm

Post by eccentric » Tue Feb 03, 2009 6:20 pm

My desire is similar; I would like to change the title of windowed mode from .NET interface but resorting to PInvoke Win32 calls is locking up my code. Generally it's bad mojo to access a window from a different thread from the owner but I always thought SetWindowText() should work anyway...

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Tue Feb 03, 2009 6:51 pm

The title can be changed with the WindowText command, and this can be used from Inner Space's .NET API, assuming that's what you're using. If you do your calls in an OnFrame event handler, you are in the application's main thread and should cause no problems. SetWindowText probably should work indeed, and I would similarly assume that using the WindowText command from a non-main thread should work fine as well.

The icon is kind of a different beast, sorry for not responding on that one yet.

eccentric
GamingTools Subscriber
Posts: 7
Joined: Sat Aug 30, 2008 6:18 pm

Post by eccentric » Wed Feb 04, 2009 3:05 am

I found the function to do this:

LavishScript.ExecuteCommand("windowtext blahblahblah")

Even though it works find with other commands, it also locks up on windowtext!

eccentric
GamingTools Subscriber
Posts: 7
Joined: Sat Aug 30, 2008 6:18 pm

Post by eccentric » Wed Feb 04, 2009 3:18 am

fine* (I can't edit my post)

I restarted InnerSpace and no new files were patched, so I assume I have the latest file versions.

Again, the windowtext command works fine in the console directly, but when called from the .NET function it locks up the game client. Other commands seem to work fine in the .NET function.

I looked in these files in the Visual Studio object browser and could not find any event with "Frame" in its name:

Lavish.Innerspace.dll
Lavish.LavishNav.dll
Lavish.LavishVMRuntime.dll

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Wed Feb 04, 2009 10:16 am

It's a named LavishScript event, not an actual .NET event :)

Code: Select all

LavishScript.Events.AttachEventTarget(LavishScript.Events.RegisterEvent("OnFrame"),OnFrame);

.
.
.

void OnFrame(object sender, LSEventArgs e)
{
    // do stuff. this will execute every frame. try not to use any delays, etc.    
}

eccentric
GamingTools Subscriber
Posts: 7
Joined: Sat Aug 30, 2008 6:18 pm

Post by eccentric » Wed Feb 04, 2009 11:51 am

Calling windowtext from OnFrame doesn't crash the client. Thank you sir!

Post Reply