﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - ISFocusManager.GetFocusedElement()</title><link>http://www.intersoftsolutions.com/Community/ClientUI/ISFocusManagerGetFocusedElement/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>ISFocusManager.GetFocusedElement()</title><link>http://www.intersoftsolutions.com/Community/ClientUI/ISFocusManagerGetFocusedElement/</link><pubDate>Sun, 02 Jan 2011 22:29:37 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;Based on the first post, the GetFocusedElement API is invoked from the CloseCurrentWindow method. Does the save button click handler is set to the CloseCurrentWindow method? if not perhaps there is some earlier method that could cause the save button to lost focus. Do you mind providing us a simple runnable sample so we could invetigate the issue further? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>ISFocusManager.GetFocusedElement()</title><link>http://www.intersoftsolutions.com/Community/ClientUI/ISFocusManagerGetFocusedElement/</link><pubDate>Fri, 31 Dec 2010 16:07:38 GMT</pubDate><dc:creator>BillGower</dc:creator><description>&lt;p&gt;hmmm what is strange is that the users clicks on the Save button to get to this point. Shouldn't the save button still have the focus at this point?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Bill&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>ISFocusManager.GetFocusedElement()</title><link>http://www.intersoftsolutions.com/Community/ClientUI/ISFocusManagerGetFocusedElement/</link><pubDate>Sun, 26 Dec 2010 23:04:51 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;The GetFocusedElement method return the currently focused element during the execution of the method. If the return value is null, it means there is no element is being focused. Perhaps the focus has already been lost or the control is disabled. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Do you mind providing us with a simple runable sample? This way we could try to replicate and analyse the issue further.  &lt;br /&gt;&lt;/p&gt;</description></item><item><title>ISFocusManager.GetFocusedElement()</title><link>http://www.intersoftsolutions.com/Community/ClientUI/ISFocusManagerGetFocusedElement/</link><pubDate>Fri, 24 Dec 2010 14:46:12 GMT</pubDate><dc:creator>BillGower</dc:creator><description>&lt;p&gt;I am guessing that this method returns the control on the form that has the focus at the time the call is made. Is this true? Why would it ever be null? I have two UXDialogBoxes out of dozens where it returns null. In both forms, I am clicking the Save button at the time and my successful save method calls this method after setting the DialogResult to DialogResult.OK.&lt;/p&gt;
&lt;p&gt;Here is the code showing how I am using it.&lt;/p&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;internal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;static&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;void&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; CloseCurrentWindow() 

&lt;p&gt;{&lt;/p&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;FrameworkElement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; element = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;ISFocusManager&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.GetFocusedElement() &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;as&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;FrameworkElement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;; 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;IWindow&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; window = &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #2b91af; font-size: 13px"&gt;UXWindow&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;.GetWindowHost(element);&amp;nbsp;&lt;strong&gt; In only two dialog boxes element is null&lt;/strong&gt; 

&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;if&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt; (window != &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;&lt;span style="font-family: consolas; color: #0000ff; font-size: 13px"&gt;null&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;&lt;span style="font-family: consolas; font-size: 13px"&gt;) 

&lt;p&gt;window.Close();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;</description></item></channel></rss>