1

Working on a WPF application that integrates with the Lync Client, but does not replace the Lync Client or use UISupression.

When a call comes in the user can answer the call via our application using Click or Function key. The problem is that after answering the call Lync generates a conversation window which steals focus away from our application. This is a problem because any function keys the user might press (to put the call on hold for example) will go to the Lync Conversation window, not to this application.

I've seen this Microsoft article that allows you to get conversation windows and dock them, which seems like a viable solution, except that our application really doesn't have room to host those windows.

What can we do to prevent or work around this problem where the Lync Client Conversation windows steal focus from our application?

4 Answers 4

1

I'd say docking is definitely the way to go. You could create a form as part of your application, but separate from your main application UI, to dock the conversation window into. You could give this a single pixel border, or hide the border totally, so the Lync conversation window won't look as if it's docked - the user shouldn't notice any difference between the docked and non-docked window. The benefit to this approach being, you don't need to dedicate any of your main application's UI real estate to hosting a conversation window.

One thing to be aware of - if you're using Lync 2013, a potential problem with this approach is that docking a conversation window pulls it out of the tabbed conversation view - but this might not be a problem if you're only dealing with Audio calls as these get pulled out of the tabbed conversation view by default.

0

It would seem you are unable to do this according to MSDN

http://social.msdn.microsoft.com/Forums/lync/en-US/06db0465-6a86-4afb-8f0a-a5299d92a349/how-to-suppress-opening-the-lync-conversation-window?forum=communicatorsdk

Without using the UI Suppression Command

5
  • Unable to do what? I'm looking for any work around or even a hack if necessary.
    – HK1
    Feb 19, 2014 at 16:59
  • If you read the article it states that this is not possible without using the UISuppression method the lync window will become the active window what you could do is set the calling window as active by calling the method then doing this.show() or by using Form.TopMost = True Feb 19, 2014 at 17:09
  • Experimenting with docking as per the article I linked to. I think it might work although I've only setup a test application like that article was showing, which is not good enough for me to know yet. The idea is that we'll push those windows into Windows of our own where we have a little more control.
    – HK1
    Feb 19, 2014 at 21:12
  • Why dont you use UISuppression and rewrite the interface for Lync as then you can createe a small form for the main window as in the docking excercise and then change the visibility to false Feb 20, 2014 at 9:12
  • That sounds like a big job. I don't think it would be efficient to try to duplicate the Lync Client for just this particular problem. Once I just about have mine perfected they'll release a new version and I'll have to start over.
    – HK1
    Feb 20, 2014 at 20:40
0

Given that the conversation window is a problem: "Lync generates a conversation window which steals focus " - consider creating your own conversation window, as described here:

Building Lync IM Conversation Windows

0

This is a bit of a hack, but you could just move the ConversationWindow outside the boundaries of the screen.

Assuming multiple monitors,

Screen[] screenArray;
screenArray = Screen.AllScreens;
cw = LyncClient.GetAutomation().GetConversationWindow(lyncConversation);
cw.Move((screenArray[0].Bounds.Left - cw.Width), (screenArray[0].Bounds.Top - cw.Height));

For the focus problem, don't initialize the application until the movement above is done and you should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.